@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

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

html {
    margin: 0;
    padding: 0;
    background: #0a0a2e;
    scroll-behavior: smooth;
}

html.dark-mode {
    background: #000;
}

body {
    font-family: 'Space Mono', monospace;
    background: linear-gradient(180deg, 
        #0a0a2e 0%, 
        #1e1e52 20%, 
        #3d2852 40%, 
        #6b3654 60%, 
        #a84a5f 80%, 
        #ff6b6b 100%);
    min-height: 100vh;
    color: #ffd4a3;
    overflow-x: hidden;
    position: relative;
    padding-bottom: 80px;
    margin: 0;
}

/* Animated stars */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    -webkit-animation: twinkle 3s infinite;
    animation: twinkle 3s infinite;
}

@-webkit-keyframes twinkle {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

@keyframes twinkle {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Sun at bottom of page */
.sun {
    position: absolute;
    width: 150px;
    height: 75px;
    background: radial-gradient(circle at center bottom, #ffeb3b, #ff9800);
    background: -webkit-radial-gradient(center bottom, circle, #ffeb3b, #ff9800);
    border-radius: 150px 150px 0 0;
    bottom: 0;
    left: 50%;
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
    z-index: 1;
    box-shadow: 0 0 100px #ff9800;
    -webkit-animation: sunGlow 3s ease-in-out infinite;
    animation: sunGlow 3s ease-in-out infinite;
    cursor: pointer;
    -webkit-transition: all 0.5s ease;
    transition: all 0.5s ease;
    pointer-events: auto;
}

.sun:hover {
    box-shadow: 0 0 150px #ffeb3b;
}

@-webkit-keyframes sunGlow {
    0%, 100% { box-shadow: 0 0 100px #ff9800; }
    50% { box-shadow: 0 0 150px #ffeb3b, 0 0 200px #ff9800; }
}

@keyframes sunGlow {
    0%, 100% { box-shadow: 0 0 100px #ff9800; }
    50% { box-shadow: 0 0 150px #ffeb3b, 0 0 200px #ff9800; }
}

/* Moon state in dark mode */
body.dark-mode .sun {
    background: 
        radial-gradient(ellipse 18px 22px at 65% 30%, rgba(150, 150, 150, 0.8) 0%, rgba(180, 180, 180, 0.4) 35%, transparent 70%),
        radial-gradient(ellipse 14px 11px at 55% 55%, rgba(140, 140, 140, 0.7) 0%, rgba(170, 170, 170, 0.3) 40%, transparent 65%),
        radial-gradient(ellipse 9px 7px at 70% 70%, rgba(130, 130, 130, 0.6) 0%, transparent 60%),
        radial-gradient(ellipse 12px 15px at 45% 25%, rgba(145, 145, 145, 0.5) 0%, transparent 55%),
        radial-gradient(ellipse 6px 8px at 75% 45%, rgba(135, 135, 135, 0.6) 0%, transparent 50%),
        radial-gradient(ellipse 7px 5px at 50% 75%, rgba(125, 125, 125, 0.5) 0%, transparent 45%),
        linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 30%, #d8d8d8 60%, #c8c8c8 100%);
    background: 
        -webkit-radial-gradient(65% 30%, ellipse 18px 22px, rgba(150, 150, 150, 0.8) 0%, rgba(180, 180, 180, 0.4) 35%, transparent 70%),
        -webkit-radial-gradient(55% 55%, ellipse 14px 11px, rgba(140, 140, 140, 0.7) 0%, rgba(170, 170, 170, 0.3) 40%, transparent 65%),
        -webkit-radial-gradient(70% 70%, ellipse 9px 7px, rgba(130, 130, 130, 0.6) 0%, transparent 60%),
        -webkit-radial-gradient(45% 25%, ellipse 12px 15px, rgba(145, 145, 145, 0.5) 0%, transparent 55%),
        -webkit-radial-gradient(75% 45%, ellipse 6px 8px, rgba(135, 135, 135, 0.6) 0%, transparent 50%),
        -webkit-radial-gradient(50% 75%, ellipse 7px 5px, rgba(125, 125, 125, 0.5) 0%, transparent 45%),
        -webkit-linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 30%, #d8d8d8 60%, #c8c8c8 100%);
    border-radius: 150px 150px 0 0;
    width: 150px;
    height: 75px;
    box-shadow: 
        0 0 60px rgba(232, 232, 232, 0.5),
        inset -8px -8px 15px rgba(0, 0, 0, 0.15),
        inset 3px 3px 8px rgba(255, 255, 255, 0.2) !important;
    -webkit-animation: moonGlow 3s ease-in-out infinite;
    animation: moonGlow 3s ease-in-out infinite;
    bottom: 0;
}

@-webkit-keyframes moonGlow {
    0%, 100% { box-shadow: 0 0 50px rgba(232, 232, 232, 0.6); }
    50% { box-shadow: 0 0 80px rgba(255, 255, 255, 0.8); }
}

@keyframes moonGlow {
    0%, 100% { box-shadow: 0 0 50px rgba(232, 232, 232, 0.6); }
    50% { box-shadow: 0 0 80px rgba(255, 255, 255, 0.8); }
}

/* Dark mode styles */
body.dark-mode {
    background: #000 !important;
    -webkit-transition: background 0.5s ease;
    transition: background 0.5s ease;
    margin: 0;
    padding-bottom: 80px;
}

body.dark-mode * {
    -webkit-transition: all 0.5s ease;
    transition: all 0.5s ease;
}

body.dark-mode .ascii-header {
    color: #888 !important;
    text-shadow: 0 0 10px #666;
    -webkit-animation: none;
    animation: none;
}

body.dark-mode .tagline,
body.dark-mode .terminal-content,
body.dark-mode p,
body.dark-mode .event-desc,
body.dark-mode .event-title {
    color: #b0b0b0 !important;
}

body.dark-mode .prompt,
body.dark-mode .event-date,
body.dark-mode h2 {
    color: #666 !important;
}

body.dark-mode .terminal-window {
    background: rgba(0, 0, 0, 0.9);
    border-color: #444 !important;
    box-shadow: 0 0 30px rgba(100, 100, 100, 0.2);
}

body.dark-mode .section {
    background: rgba(0, 0, 0, 0.8);
    border-color: #444 !important;
}

body.dark-mode .event-card {
    background: rgba(20, 20, 20, 0.8);
    border-color: #444 !important;
}

body.dark-mode .event-card:hover {
    border-color: #666 !important;
    box-shadow: 0 0 20px rgba(150, 150, 150, 0.3);
}

body.dark-mode .cta-section {
    background: rgba(20, 20, 20, 0.8);
    border-color: #444 !important;
}

body.dark-mode .join-btn {
    background: #333;
    color: #999 !important;
}

body.dark-mode .join-btn:hover {
    background: #444;
    box-shadow: 0 0 20px rgba(150, 150, 150, 0.4);
}

body.dark-mode .footer {
    color: #666 !important;
}

body.dark-mode .footer a {
    color: #999 !important;
}

body.dark-mode .footer a:hover {
    color: #ccc !important;
}

body.dark-mode .star {
    opacity: 0;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

.ascii-header {
    color: #ffeb3b;
    font-size: 10px;
    line-height: 1;
    white-space: pre;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 0 20px #ff9800;
    -webkit-animation: glow 6s ease-in-out infinite;
    animation: glow 6s ease-in-out infinite;
}

@-webkit-keyframes glow {
    0%, 5% { text-shadow: 0 0 20px #ff9800; }
    8% { text-shadow: 0 0 30px #ffeb3b, 0 0 40px #ff9800; }
    15%, 100% { text-shadow: 0 0 20px #ff9800; }
}

@keyframes glow {
    0%, 5% { text-shadow: 0 0 20px #ff9800; }
    8% { text-shadow: 0 0 30px #ffeb3b, 0 0 40px #ff9800; }
    15%, 100% { text-shadow: 0 0 20px #ff9800; }
}

.tagline {
    text-align: center;
    font-size: 18px;
    color: #ffd4a3;
    margin-bottom: 20px;
    letter-spacing: 3px;
    -webkit-animation: fadeIn 2s ease-in;
    animation: fadeIn 2s ease-in;
}

@-webkit-keyframes fadeIn {
    from { opacity: 0; -webkit-transform: translateY(20px); transform: translateY(20px); }
    to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.terminal-window {
    background: rgba(10, 10, 46, 0.9);
    border: 2px solid #ff6b6b;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.3);
    position: relative;
    overflow: hidden;
}

.terminal-window::before {
    content: "● ● ●";
    position: absolute;
    top: 10px;
    left: 15px;
    color: #ff6b6b;
    font-size: 12px;
    letter-spacing: 5px;
}

.terminal-content {
    margin-top: 20px;
}

.prompt {
    color: #ff6b6b;
    margin-right: 10px;
}

.typing {
    color: #ffd4a3;
    border-right: 2px solid #ffd4a3;
    -webkit-animation: blink 1s infinite;
    animation: blink 1s infinite;
}

@-webkit-keyframes blink {
    0%, 49% { border-color: transparent; }
    50%, 100% { border-color: #ffd4a3; }
}

@keyframes blink {
    0%, 49% { border-color: transparent; }
    50%, 100% { border-color: #ffd4a3; }
}

h2 {
    color: #ffeb3b;
    font-size: 24px;
    margin: 40px 0 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section {
    margin: 30px 0;
    padding: 20px;
    background: rgba(10, 10, 46, 0.6);
    border-left: 3px solid #ff6b6b;
}

.event-card {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid #ff6b6b;
    border-radius: 5px;
    padding: 20px;
    margin: 15px 0;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 44px;
}

.event-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 235, 59, 0.2), transparent);
    background: -webkit-linear-gradient(90deg, transparent, rgba(255, 235, 59, 0.2), transparent);
    -webkit-transition: left 0.5s ease;
    transition: left 0.5s ease;
}

.event-card:hover::before {
    left: 100%;
}

.event-card:hover {
    -webkit-transform: translateX(10px);
    -ms-transform: translateX(10px);
    transform: translateX(10px);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
    border-color: #ffeb3b;
}

.event-date {
    color: #ff6b6b;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
}

.event-title {
    color: #ffd4a3;
    font-size: 18px;
    margin-bottom: 8px;
}

.event-desc {
    color: rgba(255, 212, 163, 0.8);
    font-size: 14px;
}

.cta-section {
    text-align: center;
    margin: 60px 0;
    padding: 40px;
    background: rgba(255, 107, 107, 0.1);
    border: 2px dashed #ff6b6b;
    border-radius: 10px;
}

.join-btn {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, #ff6b6b, #ffeb3b);
    background: -webkit-linear-gradient(135deg, #ff6b6b, #ffeb3b);
    color: #0a0a2e;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    border-radius: 5px;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 20px;
    border: none;
    cursor: pointer;
    font-family: 'Space Mono', monospace;
    min-height: 44px;
    min-width: 44px;
}

.join-btn:hover {
    -webkit-transform: scale(1.05);
    -ms-transform: scale(1.05);
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 235, 59, 0.6);
}

.footer {
    text-align: center;
    margin-top: 80px;
    padding: 20px;
    color: rgba(255, 212, 163, 0.6);
    font-size: 12px;
}

.footer a {
    color: #ff6b6b;
    text-decoration: none;
    -webkit-transition: color 0.3s ease;
    transition: color 0.3s ease;
    min-height: 44px;
    min-width: 44px;
    display: inline-block;
    line-height: 44px;
}

.footer a:hover {
    color: #ffeb3b;
}

.cursor {
    -webkit-animation: blink 1s infinite;
    animation: blink 1s infinite;
}

/* Sun hint arrow and text */
.sun-hint {
    position: absolute;
    bottom: 18px;
    left: calc(50% + 85px);
    pointer-events: none;
    -webkit-animation: subtleFade 8s ease-in-out forwards;
    animation: subtleFade 8s ease-in-out forwards;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.sun-hint-arrow {
    font-size: 32px;
    color: #ffeb3b;
    text-shadow: 0 0 10px rgba(255, 235, 59, 0.3);
    font-family: cursive;
    -webkit-transform: scaleX(-1);
    -ms-transform: scaleX(-1);
    transform: scaleX(-1);
}

.sun-hint-text {
    background: rgba(255, 235, 59, 0.9);
    color: #0a0a2e;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 0 10px rgba(255, 235, 59, 0.3);
}

@-webkit-keyframes subtleFade {
    0% { opacity: 0; }
    10%, 40% { opacity: 1; }
    50% { opacity: 0; }
    60%, 90% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes subtleFade {
    0% { opacity: 0; }
    10%, 40% { opacity: 1; }
    50% { opacity: 0; }
    60%, 90% { opacity: 1; }
    100% { opacity: 0; }
}

body.dark-mode .sun-hint-text {
    background: rgba(200, 200, 200, 0.9);
    color: #000;
    box-shadow: 0 0 10px rgba(200, 200, 200, 0.3);
}

body.dark-mode .sun-hint-arrow {
    color: #c8c8c8;
    text-shadow: 0 0 10px rgba(200, 200, 200, 0.5);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    -webkit-animation: fadeIn 0.3s ease;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: block;
}

.modal-content {
    background: linear-gradient(135deg, #1e1e52 0%, #3d2852 100%);
    margin: 15% auto;
    padding: 30px;
    border: 2px solid #ff6b6b;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 0 40px rgba(255, 107, 107, 0.4);
    position: relative;
    -webkit-animation: slideIn 0.3s ease;
    animation: slideIn 0.3s ease;
}

@-webkit-keyframes slideIn {
    from {
        -webkit-transform: translateY(-50px);
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        -webkit-transform: translateY(0);
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    color: #ff6b6b;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    -webkit-transition: color 0.3s ease;
    transition: color 0.3s ease;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.close-modal:hover {
    color: #ffeb3b;
}

.modal-title {
    color: #ffeb3b;
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.modal-text {
    color: #ffd4a3;
    line-height: 1.6;
    margin-bottom: 20px;
}

body.dark-mode .modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-color: #666;
}

body.dark-mode .modal-text {
    color: #b0b0b0;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    .ascii-header {
        font-size: 6px;
        margin-bottom: 20px;
    }
    
    .tagline {
        font-size: 14px;
        letter-spacing: 1px;
        padding: 0 10px;
    }
    
    .terminal-window {
        padding: 15px;
        margin: 20px 0;
        font-size: 14px;
    }
    
    .terminal-window::before {
        font-size: 10px;
        top: 8px;
        left: 10px;
    }
    
    .terminal-content {
        margin-top: 15px;
        font-size: 13px;
    }
    
    h2 {
        font-size: 20px;
        margin: 30px 0 15px;
    }
    
    .section {
        padding: 15px;
        margin: 20px 0;
    }
    
    .event-card {
        padding: 15px;
        margin: 10px 0;
    }
    
    .event-card:hover {
        -webkit-transform: none;
        -ms-transform: none;
        transform: none;
    }
    
    .event-title {
        font-size: 16px;
    }
    
    .event-desc {
        font-size: 13px;
    }
    
    .cta-section {
        padding: 25px 15px;
        margin: 40px 0;
    }
    
    .join-btn {
        padding: 12px 30px;
        font-size: 16px;
        letter-spacing: 1px;
    }
    
    .footer {
        margin-top: 50px;
        padding: 15px;
        font-size: 11px;
    }
    
    .sun {
        width: 100px;
        height: 50px;
    }
    
    body.dark-mode .sun {
        width: 100px;
        height: 50px;
    }
    
    .sun-hint {
        bottom: 12px;
        left: calc(50% + 60px);
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        gap: 4px;
    }
    
    .sun-hint-arrow {
        font-size: 24px;
    }
    
    .sun-hint-text {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20% auto;
        padding: 20px;
    }
    
    .modal-title {
        font-size: 20px;
    }
}

@media screen and (max-width: 480px) {
    .ascii-header {
        font-size: 5px;
    }
    
    .tagline {
        font-size: 12px;
    }
    
    .terminal-window {
        font-size: 12px;
        padding: 12px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    .join-btn {
        padding: 10px 25px;
        font-size: 14px;
    }
    
    .sun {
        width: 80px;
        height: 40px;
    }
    
    body.dark-mode .sun {
        width: 80px;
        height: 40px;
    }
    
    .sun-hint {
        display: none;
    }
}

/* Lazy loading styles */
img[loading="lazy"] {
    opacity: 0;
    -webkit-transition: opacity 0.3s ease;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

/* Focus styles for accessibility */
a:focus,
button:focus,
.event-card:focus {
    outline: 2px solid #ffeb3b;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .stars,
    .sun,
    .sun-hint {
        display: none;
    }
    
    .terminal-window,
    .section,
    .event-card,
    .cta-section {
        border: 1px solid #000;
        background: white;
    }
}