/* ============================================
   OMGPOP NETWORK - Retro Gaming Website
   Light Blue Gradient & Pixel Aesthetic
   ============================================ */

/* Root Variables */
:root {
    --primary-light: #87CEEB;
    --primary-dark: #4A90E2;
    --accent-color: #FFD700;
    --text-color: #1A1A2E;
    --bg-light: #E3F2FD;
    --border-color: #1A1A2E;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --pixel-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 
                    inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Press Start 2P', cursive;
    color: var(--text-color);
    line-height: 1.6;
    background: linear-gradient(135deg, #87CEEB 0%, #4A90E2 50%, #ADD8E6 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   NAVIGATION BAR
   ============================================ */

.navbar {
    background: rgba(74, 144, 226, 0.95);
    border-bottom: 3px solid var(--text-color);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.navbar-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    gap: 1.5rem;
}

.navbar-logo {
    flex-shrink: 0;
}

.navbar-logo a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    display: block;
}

.navbar-logo a:hover {
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.navbar-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-left: auto;
    margin-right: 0;
}

.navbar-item {
    position: relative;
    display: flex;
    align-items: center;
    padding-bottom: 0.2rem;
}

.navbar-link,
.navbar-parent {
    color: white;
    text-decoration: none;
    font-size: 0.6rem;
    letter-spacing: 0.05em;
    padding: 0.45rem 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
}

.navbar-parent {
    border: 2px solid transparent;
}

.navbar-parent::after {
    content: '▾';
    margin-left: 0.45rem;
    font-size: 0.8rem;
}

.navbar-submenu {
    position: absolute;
    top: calc(100% + 0.2rem);
    left: 0;
    display: none;
    flex-direction: column;
    min-width: 170px;
    background: rgba(74, 144, 226, 0.98);
    border: 3px solid var(--text-color);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    z-index: 1001;
}

.navbar-submenu a {
    color: white;
    text-decoration: none;
    font-size: 0.55rem;
    letter-spacing: 0.05em;
    padding: 0.7rem 0.9rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.navbar-submenu a:last-child {
    border-bottom: none;
}

.navbar-item:hover .navbar-submenu,
.navbar-item.open .navbar-submenu,
.navbar-item.active .navbar-submenu {
    display: flex;
}

.navbar-link:hover,
.navbar-parent:hover,
.navbar-submenu a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.navbar-link:hover {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

.navbar-divider {
    width: 2px;
    height: 24px;
    background: rgba(255, 255, 255, 0.35);
    align-self: center;
}

.navbar-user {
    color: white;
    cursor: default;
    opacity: 0.95;
}

.navbar-user:hover {
    color: white;
    border-color: transparent;
    transform: none;
}

.navbar-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
}

.navbar-login,
.navbar-logout {
    background: var(--accent-color);
    color: var(--text-color);
    border: 2px solid var(--text-color);
    border-radius: 4px;
    font-weight: bold;
}

.navbar-login:hover,
.navbar-logout:hover {
    background: white;
    color: var(--text-color);
    transform: translate(-2px, -2px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
    border-color: var(--text-color);
}

.navbar-login:hover {
    background: white;
    transform: translate(-2px, -2px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
    border-color: var(--text-color);
}

.navbar-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    width: 2rem;
    height: 2rem;
    position: relative;
}

.navbar-toggle:hover {
    transform: scale(1.1);
}

.navbar-toggle span {
    display: block;
    width: 1.5rem;
    height: 2px;
    background-color: white;
    margin: 0.35rem 0;
    transition: all 0.3s ease;
}

.navbar-toggle:hover span {
    background-color: var(--accent-color);
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem 0;
    }

    .navbar-container {
        flex-direction: row;
        gap: 1rem;
        padding: 0 1.5rem;
        align-items: center;
        justify-content: space-between;
    }

    .navbar-logo {
        width: auto;
        text-align: left;
        flex: 1;
    }

    .navbar-toggle {
        display: block;
    }

    .navbar-menu {
        display: none;
        flex-direction: column;
        gap: 0.8rem;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(74, 144, 226, 0.95);
        border-bottom: 3px solid var(--text-color);
        padding: 1rem 1.5rem;
        border-top: 2px solid var(--text-color);
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar-item {
        width: 100%;
        display: block;
    }

    .navbar-parent,
    .navbar-link {
        width: 100%;
        text-align: center;
        display: flex;
        justify-content: center;
    }

    .navbar-submenu {
        position: static;
        width: 100%;
        margin-top: 0.4rem;
    }

    .navbar-logo a {
        font-size: 0.8rem;
    }

    .navbar-link,
    .navbar-parent {
        font-size: 0.6rem;
        padding: 0.5rem 1rem;
    }

    .navbar-submenu a {
        font-size: 0.55rem;
    }

    .navbar-login {
        width: 100%;
    }
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.content-wrapper {
    text-align: center;
    width: 100%;
    animation: fadeInScale 0.8s ease-out;
}

/* ============================================
   TYPOGRAPHY & HEADING
   ============================================ */

h1 {
    font-size: clamp(2rem, 8vw, 4rem);
    margin-bottom: 2rem;
    color: var(--text-color);
    text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2),
                 8px 8px 0px rgba(0, 0, 0, 0.1);
    line-height: 1.4;
    letter-spacing: 0.1em;
}

.welcome-text {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

/* ============================================
   TYPING EFFECT ANIMATION
   ============================================ */

.typing-text {
    display: inline-block;
    border-right: 3px solid var(--text-color);
    animation: typing 2.5s steps(40, end), blink-caret 0.75s step-end infinite;
    overflow: hidden;
    white-space: nowrap;
    min-height: 2em;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-right-color: var(--text-color);
    }
    50% {
        border-right-color: transparent;
    }
}

/* ============================================
   DECORATIVE ELEMENTS
   ============================================ */

.pixel-divider {
    width: 60%;
    height: 12px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    margin: 2rem auto;
    border-top: 2px solid var(--text-color);
    border-bottom: 2px solid var(--text-color);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: clamp(0.75rem, 3vw, 1.5rem);
    color: var(--text-color);
    margin: 1.5rem 0;
    letter-spacing: 0.2em;
    position: relative;
}

.smoke-reveal {
    animation: smokeReveal 2s ease-out 2.6s both;
    opacity: 0;
}

@keyframes smokeReveal {
    0% {
        opacity: 0;
        clip-path: polygon(
            0% 50%,
            2% 30%,
            5% 45%,
            8% 25%,
            12% 40%,
            15% 35%,
            18% 48%,
            22% 30%,
            25% 45%,
            28% 32%,
            32% 50%,
            35% 28%,
            38% 42%,
            42% 35%,
            45% 48%,
            48% 30%,
            52% 45%,
            55% 32%,
            58% 50%,
            62% 28%,
            65% 42%,
            68% 35%,
            72% 48%,
            75% 30%,
            78% 45%,
            82% 32%,
            85% 50%,
            88% 28%,
            92% 42%,
            95% 35%,
            98% 48%,
            100% 50%
        );
        filter: blur(15px) opacity(0);
    }
    50% {
        opacity: 0.7;
        filter: blur(8px) opacity(0.5);
    }
    100% {
        opacity: 1;
        clip-path: polygon(
            0% 0%,
            100% 0%,
            100% 100%,
            0% 100%
        );
        filter: blur(0px) opacity(1);
    }
}

/* ============================================
   COUNTDOWN TIMER
   ============================================ */

.countdown-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(74, 144, 226, 0.1);
    border: 3px solid var(--accent-color);
    border-radius: 8px;
    animation: fadeIn 1.2s ease-out 3s both;
}

.countdown-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.countdown-label {
    font-size: clamp(0.55rem, 1.5vw, 0.8rem);
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin: 0;
}

.countdown-timer {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
    font-family: 'Press Start 2P', cursive;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    background: rgba(135, 206, 235, 0.2);
    padding: 0.6rem;
    border: 2px solid var(--accent-color);
    border-radius: 4px;
    min-width: 65px;
}

.countdown-number {
    font-size: clamp(1rem, 3vw, 1.8rem);
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    letter-spacing: 0.1em;
}

.countdown-label-small {
    font-size: clamp(0.3rem, 1vw, 0.5rem);
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.countdown-separator {
    font-size: clamp(0.9rem, 2vw, 1.4rem);
    color: var(--accent-color);
    font-weight: bold;
    margin: 0 0.2rem;
}

.next-event-name {
    font-size: clamp(0.5rem, 1.5vw, 0.75rem);
    color: var(--text-color);
    text-align: center;
    margin: 0;
    max-width: 90%;
    word-break: break-word;
}

/* ============================================
   BUTTONS - PIXEL STYLE
   ============================================ */

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
    animation: fadeIn 1.2s ease-out 4.5s both;
}

.pixel-btn {
    padding: 1rem 2rem;
    font-size: clamp(0.7rem, 2vw, 1rem);
    font-family: 'Press Start 2P', cursive;
    letter-spacing: 0.1em;
    border: 3px solid var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    font-weight: bold;
    position: relative;
    overflow: hidden;
    box-shadow: var(--pixel-shadow), var(--shadow);
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.pixel-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transition: left 0.3s ease;
    z-index: -1;
}

.pixel-btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.3), var(--pixel-shadow);
}

.btn-primary:active {
    transform: translate(0px, 0px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2), var(--pixel-shadow);
}

.btn-secondary {
    background: var(--accent-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.3), var(--pixel-shadow);
}

.btn-secondary:active {
    transform: translate(0px, 0px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2), var(--pixel-shadow);
}

/* Link styling for buttons */
a.pixel-btn {
    color: white;
}

a.pixel-btn.btn-secondary {
    color: var(--text-color);
}

/* ============================================
   PIXEL DECORATIONS
   ============================================ */

.pixel-decoration {
    position: fixed;
    pointer-events: none;
    opacity: 0.15;
    background: var(--text-color);
    animation: float 6s ease-in-out infinite;
}

.decoration-1 {
    width: 40px;
    height: 40px;
    top: 5%;
    left: 5%;
    animation-delay: 0s;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.decoration-2 {
    width: 60px;
    height: 20px;
    top: 80%;
    right: 5%;
    animation-delay: 1s;
}

.decoration-3 {
    width: 20px;
    height: 60px;
    top: 50%;
    right: 2%;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet Devices */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }

    h1 {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
        margin-bottom: 1.5rem;
    }

    .cta-buttons {
        gap: 1rem;
        margin-top: 2rem;
    }

    .pixel-btn {
        padding: 0.75rem 1.5rem;
    }

    .countdown-unit {
        min-width: 60px;
        padding: 0.5rem;
    }

    .countdown-number {
        font-size: 1.2rem;
    }

    .countdown-separator {
        font-size: 0.8rem;
    }

    .pixel-decoration {
        display: none;
    }
}

/* Mobile Devices */
@media (max-width: 480px) {
    .container {
        padding: 1rem;
        min-height: auto;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    h1 {
        font-size: clamp(1rem, 5vw, 1.75rem);
        margin-bottom: 1rem;
        text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
    }

    .pixel-divider {
        width: 80%;
        height: 8px;
        margin: 1rem auto;
    }

    .subtitle {
        font-size: clamp(0.6rem, 2vw, 0.9rem);
        margin: 1rem 0;
    }

    .smoke-reveal {
        animation: mobileSubtitleReveal 0.45s ease-out 2.6s both;
        filter: none;
        clip-path: none;
        opacity: 1;
    }

    @keyframes mobileSubtitleReveal {
        from {
            opacity: 0;
            transform: translateY(6px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .countdown-section {
        margin: 1rem 0;
        padding: 0.75rem;
    }

    .countdown-timer {
        gap: 0.4rem;
    }

    .countdown-unit {
        min-width: 50px;
        padding: 0.4rem;
    }

    .countdown-number {
        font-size: 0.9rem;
    }

    .countdown-label-small {
        font-size: 0.25rem;
    }

    .countdown-separator {
        font-size: 0.7rem;
        margin: 0 0.15rem;
    }

    .next-event-name {
        font-size: 0.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1.5rem;
    }

    .pixel-btn {
        width: 100%;
        padding: 0.6rem 1rem;
        font-size: 0.65rem;
    }
}

/* Small phones */
@media (max-width: 360px) {
    h1 {
        font-size: 0.9rem;
    }

    .subtitle {
        font-size: 0.55rem;
    }

    .pixel-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.55rem;
    }
}

/* ============================================
   PERFORMANCE & ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .pixel-decoration {
        display: none;
    }
}
