@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

:root {
    --primary: #ff4081;
    --secondary: #3f51b5;
    --accent: #4caf50;
    --background: #121212;
    --surface: #1e1e1e;
    --text: #ffffff;
    --text-secondary: #b0b0b0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'VT323', monospace;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        linear-gradient(rgba(18, 18, 18, 0.9), rgba(18, 18, 18, 0.9)),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><rect width="1" height="1" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 20px 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

/* Glitch effect for the title */
.glitch {
    font-family: 'Press Start 2P', cursive;
    font-size: 3rem;
    position: relative;
    color: var(--text);
    text-shadow: 0.05em 0 0 var(--primary), -0.05em -0.025em 0 var(--secondary);
    animation: glitch 1s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--primary);
    animation: glitch-1 0.8s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--secondary);
    animation: glitch-2 0.8s infinite;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 var(--primary), -0.05em -0.025em 0 var(--secondary);
    }
    14% {
        text-shadow: 0.05em 0 0 var(--primary), -0.05em -0.025em 0 var(--secondary);
    }
    15% {
        text-shadow: -0.05em -0.025em 0 var(--primary), 0.025em 0.025em 0 var(--secondary);
    }
    49% {
        text-shadow: -0.05em -0.025em 0 var(--primary), 0.025em 0.025em 0 var(--secondary);
    }
    50% {
        text-shadow: 0.025em 0.05em 0 var(--primary), 0.05em 0 0 var(--secondary);
    }
    99% {
        text-shadow: 0.025em 0.05em 0 var(--primary), 0.05em 0 0 var(--secondary);
    }
    100% {
        text-shadow: -0.025em 0 0 var(--primary), -0.025em -0.025em 0 var(--secondary);
    }
}

@keyframes glitch-1 {
    0% {
        clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    }
    10% {
        clip-path: polygon(0 15%, 100% 15%, 100% 35%, 0 35%);
    }
    20% {
        clip-path: polygon(0 10%, 100% 10%, 100% 40%, 0 40%);
    }
    30% {
        clip-path: polygon(0 30%, 100% 30%, 100% 65%, 0 65%);
    }
    40% {
        clip-path: polygon(0 10%, 100% 10%, 100% 20%, 0 20%);
    }
    50% {
        clip-path: polygon(0 40%, 100% 40%, 100% 70%, 0 70%);
    }
    60% {
        clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    }
    100% {
        clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    }
}

@keyframes glitch-2 {
    0% {
        clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    }
    15% {
        clip-path: polygon(0 65%, 100% 65%, 100% 85%, 0 85%);
    }
    25% {
        clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
    }
    35% {
        clip-path: polygon(0 85%, 100% 85%, 100% 95%, 0 95%);
    }
    45% {
        clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
    }
    55% {
        clip-path: polygon(0 70%, 100% 70%, 100% 95%, 0 95%);
    }
    65% {
        clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    }
    100% {
        clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    }
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-content h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 2rem;
    line-height: 1.4;
    color: var(--primary);
}

.hero-content p {
    font-size: 1.5rem;
    line-height: 1.6;
}

.highlight {
    color: var(--primary);
    font-weight: bold;
    text-shadow: 0 0 5px var(--primary);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.primary-btn {
    background-color: var(--primary);
    color: var(--background);
    border: none;
    padding: 0.8rem 1.5rem;
    font-family: 'VT323', monospace;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(255, 64, 129, 0.3);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(255, 64, 129, 0.4);
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.card {
    background-color: var(--surface);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-top: 3px solid var(--primary);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.card p {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* About Section */
.about-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background-color: var(--surface);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

section h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    text-align: center;
}

.about-section p {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

#pixel-canvas {
    width: 100%;
    height: 400px;
    background-color: var(--surface);
    border: 2px solid var(--primary);
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(255, 64, 129, 0.3);
    overflow: hidden;
    position: relative;
}

.interactive-elements {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.physics-playground,
.generative-art {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#physics-container,
#generative-container {
    width: 100%;
    height: 200px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

/* Timeline Section */
.timeline-section {
    margin-bottom: 3rem;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--surface);
    border: 4px solid var(--primary);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

.timeline-date {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.timeline-content {
    padding: 1.5rem;
    background-color: var(--surface);
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

/* Sponsors Section */
.sponsors-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background-color: var(--surface);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.sponsor-item {
    background-color: rgba(0, 0, 0, 0.2);
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    font-size: 1.3rem;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px dashed var(--text-secondary);
}

.sponsor-item:hover {
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(255, 64, 129, 0.2);
}

.sponsor-cta {
    text-align: center;
    font-size: 1.2rem;
    margin-top: 1rem;
}

.sponsor-cta a {
    color: var(--primary);
    text-decoration: none;
}

.sponsor-cta a:hover {
    text-decoration: underline;
}

/* Judges Section */
.judges-section {
    margin-bottom: 3rem;
}

.judges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.judge-card {
    background-color: var(--surface);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: transform 0.3s ease;
}

.judge-card:hover {
    transform: translateY(-5px);
}

.judge-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--primary);
    margin: 0 auto 1rem;
    position: relative;
    overflow: hidden;
}

.judge-avatar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><rect width="10" height="10" fill="rgba(255,255,255,0.2)"/><rect x="10" y="10" width="10" height="10" fill="rgba(255,255,255,0.2)"/></svg>');
    background-size: 20px 20px;
    opacity: 0.5;
}

.judge-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.judge-card p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* FAQ Section */
.faq-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background-color: var(--surface);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.faq-item {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 4px;
    border-left: 3px solid var(--primary);
}

.faq-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--primary);
}

.faq-item p {
    font-size: 1.1rem;
}

/* Contact Section */
.contact-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background-color: var(--surface);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.8rem;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--text-secondary);
    color: var(--text);
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    margin-top: 4rem;
    background-color: var(--surface);
    padding: 3rem 2rem 1rem;
    border-top: 4px solid var(--primary);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.footer-logo p {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Modal */
#modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#modal.hidden {
    display: none !important;
}

.modal-content {
    background-color: var(--surface);
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid var(--primary);
    box-shadow: 0 0 30px rgba(255, 64, 129, 0.5);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.close-modal:hover {
    color: var(--primary);
}

.hidden {
    display: none;
}

/* Registration Form */
.registration-form {
    margin-top: 1.5rem;
}

/* LLM Animation Container */
.llm-animation-container {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    background-color: #121212;
    position: relative;
}

.llm-animation-container canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* Add a subtle glow effect to the animation container */
.llm-animation-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 20px rgba(255, 64, 129, 0.3);
    pointer-events: none;
    border-radius: 8px;
    z-index: 1;
}

/* Add a scanline effect for retro feel */
.llm-animation-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.05) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    opacity: 0.2;
    z-index: 2;
    animation: scanline 10s linear infinite;
}

@keyframes scanline {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 100%;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .glitch {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .hero-section {
        grid-template-columns: 1fr;
    }
    
    .hero-content {
        order: 1;
    }
    
    #pixel-canvas {
        order: 0;
        height: 300px;
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-item:nth-child(odd)::after,
    .timeline-item:nth-child(even)::after {
        left: 21px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .cta-buttons {
        flex-direction: column;
    }
    
    .info-cards,
    .interactive-elements,
    .sponsors-grid,
    .judges-grid,
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation for buttons */
button {
    background-color: var(--surface);
    color: var(--text);
    border: 2px solid var(--primary);
    padding: 0.5rem 1rem;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

button:hover {
    background-color: var(--primary);
    color: var(--background);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 64, 129, 0.3);
}

button.active {
    background-color: var(--primary);
    color: var(--background);
}

/* Pixel animation for loading states */
@keyframes pixel-animation {
    0% {
        box-shadow: 0 0 0 0 var(--primary);
    }
    50% {
        box-shadow: 0 0 10px 5px var(--primary);
    }
    100% {
        box-shadow: 0 0 0 0 var(--primary);
    }
}

.loading {
    animation: pixel-animation 1.5s infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}
