/* General Body Styles */
body {
    margin: 0;
    font-family: 'Quicksand', sans-serif;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
    position: relative;
    background: linear-gradient(45deg, #001a33, #003366);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

:root {
  --color-bg1: rgb(0, 40, 80);
  --color-bg2: rgb(0, 80, 160);
  --color1: 0, 102, 255;
  --color2: 0, 102, 255;
  --color3: 0, 102, 255;
  --color4: 0, 102, 255;
  --color5: 0, 102, 255;
  --color-interactive: 0, 102, 255;
  --circle-size: 80%;
  --blending: hard-light;
}

@keyframes moveInCircle {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(180deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes moveVertical {
  0% {
    transform: translateY(-50%);
  }
  50% {
    transform: translateY(50%);
  }
  100% {
    transform: translateY(-50%);
  }
}

@keyframes moveHorizontal {
  0% {
    transform: translateX(-50%) translateY(-10%);
  }
  50% {
    transform: translateX(50%) translateY(10%);
  }
  100% {
    transform: translateX(-50%) translateY(-10%);
  }
}

/* Gradient Background */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(40deg, var(--color-bg1), var(--color-bg2));
}

.gradient-bg svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
}

.gradients-container {
    position: absolute;
    width: 100%;
    height: 100%;
    filter: url(#goo) blur(40px);
}

.g1, .g2, .g3, .g4, .g5 {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    animation: move 20s infinite;
}

.g1 {
    background: radial-gradient(circle at center, rgba(var(--color1), 0.8) 0, rgba(var(--color1), 0) 50%) no-repeat;
    mix-blend-mode: var(--blending);
    width: var(--circle-size);
    height: var(--circle-size);
    top: calc(50% - var(--circle-size) / 2);
    left: calc(50% - var(--circle-size) / 2);
    transform-origin: center center;
    animation: moveVertical 30s ease infinite;
    opacity: 1;
}

.g2 {
    background: radial-gradient(circle at center, rgba(var(--color2), 0.8) 0, rgba(var(--color2), 0) 50%) no-repeat;
    mix-blend-mode: var(--blending);
    width: var(--circle-size);
    height: var(--circle-size);
    top: calc(50% - var(--circle-size) / 2);
    left: calc(50% - var(--circle-size) / 2);
    transform-origin: calc(50% - 400px);
    animation: moveInCircle 20s reverse infinite;
    opacity: 1;
}

.g3 {
    background: radial-gradient(circle at center, rgba(var(--color3), 0.8) 0, rgba(var(--color3), 0) 50%) no-repeat;
    mix-blend-mode: var(--blending);
    width: var(--circle-size);
    height: var(--circle-size);
    top: calc(50% - var(--circle-size) / 2 + 200px);
    left: calc(50% - var(--circle-size) / 2 - 500px);
    transform-origin: calc(50% + 400px);
    animation: moveInCircle 40s linear infinite;
    opacity: 1;
}

.g4 {
    background: radial-gradient(circle at center, rgba(var(--color4), 0.8) 0, rgba(var(--color4), 0) 50%) no-repeat;
    mix-blend-mode: var(--blending);
    width: var(--circle-size);
    height: var(--circle-size);
    top: calc(50% - var(--circle-size) / 2);
    left: calc(50% - var(--circle-size) / 2);
    transform-origin: calc(50% - 200px);
    animation: moveHorizontal 40s ease infinite;
    opacity: 0.7;
}

.g5 {
    background: radial-gradient(circle at center, rgba(var(--color5), 0.8) 0, rgba(var(--color5), 0) 50%) no-repeat;
    mix-blend-mode: var(--blending);
    width: calc(var(--circle-size) * 2);
    height: calc(var(--circle-size) * 2);
    top: calc(50% - var(--circle-size));
    left: calc(50% - var(--circle-size));
    transform-origin: calc(50% - 800px) calc(50% + 200px);
    animation: moveInCircle 20s ease infinite;
    opacity: 1;
}

.interactive {
    position: absolute;
    background: radial-gradient(circle at center, rgba(var(--color-interactive), 0.8) 0, rgba(var(--color-interactive), 0) 50%) no-repeat;
    mix-blend-mode: var(--blending);
    width: 100%;
    height: 100%;
    top: -50%;
    left: -50%;
    opacity: 0.7;
}

/* Main Transparent Container */
.main-container {
    width: 90%;
    max-width: 1200px;
    height: 75%;
    backdrop-filter: blur(12px);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
    border: 1px solid #000000;
    position: relative;
    z-index: 1;
    color: #0066FF;
    font-family: 'Fira Code', monospace;
}

/* Top Bar for "Coming Soon" */
.top-bar {
    margin: 20px;
    width: auto;
    font-family: 'Fira Code', monospace;
    color: #0066FF;
    font-size: 1rem;
    height: 50px;
    line-height: 50px;
    text-align: left;
    padding: 0 15px;
    margin-bottom: 20px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);

}

/* Console Container */
.console {
    flex-grow: 1;
    text-align: center;
    padding: 30px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;

    margin: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Tall viewport layout: center logo-section in the space above the countdown */
@media (min-height: 900px) {

    .logo-section {
        margin-top: 100px;
        margin-bottom: 0;
        align-self: center; /* center within the top 1fr area */
    }

    .countdown {
        margin-top: 0;
        margin-bottom: 0; /* cancel flex-based centering */
    }
}

/* Wider main container for very large screens (keep height unchanged) */
@media (min-width: 2000px) {
    .main-container {
        width: 95%;
        max-width: 2200px;
    }
}

@media (min-width: 2560px) {
    .main-container {
        width: 95%;
        max-width: 2400px;
    }
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

/* SVG Logo Styles and Animations */
.logo-svg {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(33, 150, 243, 0.3));
    transition: all 0.3s ease;
    cursor: pointer;
}

.logo-svg:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(0, 102, 255, 0.5));
}

/* Fade In Animation */
.animated-logo.fade-in {
    opacity: 0;
    animation: logoFadeIn 2s ease-in-out forwards;
}

@keyframes logoFadeIn {
    to {
        opacity: 1;
    }
}

/* Tagline fade-in + slide-up */
@keyframes taglineFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

/* Original PNG logo styles (keeping for reference) */
.logo-img {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(0, 102, 255, 0.3));
}

.tagline {
    font-size: 1.2rem;
    color: #90caf9;
    font-family: 'Fira Code', monospace;
    opacity: 0; /* animate in */
    margin-bottom: 10px;
    transform: translateY(18px);
    animation: taglineFadeUp 800ms cubic-bezier(0.22, 1, 0.36, 1) 250ms forwards;
    will-change: opacity, transform;
}

/* High Resolution Scaling for Logo and Tagline */
@media (min-width: 1920px) {
    .logo-svg {
        height: 120px;
    }
    
    .tagline {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
}

@media (min-width: 2560px) {
    .logo-svg {
        height: 160px;
    }
    
    .tagline {
        font-size: 2.4rem;
        margin-bottom: 20px;
    }
}

@media (min-width: 3840px) {
    .logo-svg {
        height: 200px;
    }
    
    .tagline {
        font-size: 3rem;
        margin-bottom: 25px;
    }
}

/* Ultra-wide screen support */
@media (min-width: 5120px) {
    .logo-svg {
        height: 240px;
    }
    
    .tagline {
        font-size: 3.6rem;
        margin-bottom: 30px;
    }
}

/* High DPI displays with larger screens */
@media (-webkit-min-device-pixel-ratio: 2) and (min-width: 1920px), 
       (min-resolution: 192dpi) and (min-width: 1920px) {
    .logo-svg {
        height: 140px;
    }
    
    .tagline {
        font-size: 2rem;
    }
}

@media (-webkit-min-device-pixel-ratio: 2) and (min-width: 2560px), 
       (min-resolution: 192dpi) and (min-width: 2560px) {
    .logo-svg {
        height: 180px;
    }
    
    .tagline {
        font-size: 2.6rem;
    }
}

/* Countdown Timer */
.countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: auto;
    margin-bottom: auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    border: 1px solid rgba(0, 102, 255, 0.2);
    position: relative;
}

.countdown::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, transparent, #0066FF, transparent);
    transform: translateX(-50%);
    animation: grow-line 1.5s ease-out forwards;
}

.time-box {
    text-align: center;
    flex: 1;
    min-width: 80px;
    padding: 15px 10px;
    background: rgba(0, 102, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(0, 102, 255, 0.1);
    transition: all 0.3s ease;
}

.time-box:hover {
    background: rgba(0, 102, 255, 0.1);
    border-color: rgba(0, 102, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.2);
}

.number {
    font-size: 6rem;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    color: #0066FF;
    text-shadow: 0 0 15px rgba(0, 102, 255, 0.5);
    display: block;
    margin-bottom: 5px;
}

.number.seconds {
    font-size: 4.5rem;
}

.label {
    font-size: 1.5rem;
    font-family: 'Fira Code', monospace;
    font-weight: 500;
    color: #42a5f5;
    text-transform: uppercase;
    margin-top: 5px;
    letter-spacing: 1px;
    opacity: 0.9;
    display: block;
}

/* High Resolution Scaling for Countdown */
@media (min-width: 1920px) {
    .countdown {
        gap: 3rem;
        padding: 30px;
        border-radius: 20px;
    }
    
    .time-box {
        min-width: 120px;
        padding: 20px 15px;
        border-radius: 16px;
    }
    
    .number {
        font-size: 8rem;
        margin-bottom: 8px;
    }
    
    .number.seconds {
        font-size: 6rem;
    }
    
    .label {
        font-size: 2rem;
        margin-top: 8px;
        letter-spacing: 1.5px;
    }
    
    .line {
        bottom: 100px;
    }
}

@media (min-width: 2560px) {
    .countdown {
        gap: 4rem;
        padding: 40px;
        border-radius: 24px;
    }
    
    .time-box {
        min-width: 160px;
        padding: 25px 20px;
        border-radius: 20px;
    }
    
    .number {
        font-size: 10rem;
        margin-bottom: 10px;
    }
    
    .number.seconds {
        font-size: 7.5rem;
    }
    
    .label {
        font-size: 2.5rem;
        margin-top: 10px;
        letter-spacing: 2px;
    }
    
    .line {
        bottom: 25px;
    }
}

@media (min-width: 3840px) {
    .countdown {
        gap: 5rem;
        padding: 50px;
        border-radius: 28px;
    }
    
    .time-box {
        min-width: 200px;
        padding: 30px 25px;
        border-radius: 24px;
    }
    
    .number {
        font-size: 12rem;
        margin-bottom: 12px;
    }
    
    .number.seconds {
        font-size: 9rem;
    }
    
    .label {
        font-size: 3rem;
        margin-top: 12px;
        letter-spacing: 2.5px;
    }
    
    .line {
        bottom: 30px;
    }
}

@media (min-width: 5120px) {
    .countdown {
        gap: 6rem;
        padding: 60px;
        border-radius: 32px;
    }
    
    .time-box {
        min-width: 240px;
        padding: 35px 30px;
        border-radius: 28px;
    }
    
    .number {
        font-size: 14rem;
        margin-bottom: 15px;
    }
    
    .number.seconds {
        font-size: 10.5rem;
    }
    
    .label {
        font-size: 3.5rem;
        margin-top: 15px;
        letter-spacing: 3px;
    }
    
    .line {
        bottom: 35px;
    }
}

/* High DPI displays with larger screens */
@media (-webkit-min-device-pixel-ratio: 2) and (min-width: 1920px), 
       (min-resolution: 192dpi) and (min-width: 1920px) {
    .countdown {
        gap: 3.5rem;
        padding: 35px;
    }
    
    .time-box {
        min-width: 140px;
        padding: 22px 18px;
    }
    
    .number {
        font-size: 9rem;
    }
    
    .number.seconds {
        font-size: 6.75rem;
    }
    
    .label {
        font-size: 2.2rem;
    }
}

@media (-webkit-min-device-pixel-ratio: 2) and (min-width: 2560px), 
       (min-resolution: 192dpi) and (min-width: 2560px) {
    .countdown {
        gap: 4.5rem;
        padding: 45px;
    }
    
    .time-box {
        min-width: 180px;
        padding: 28px 22px;
    }
    
    .number {
        font-size: 11rem;
    }
    
    .number.seconds {
        font-size: 8.25rem;
    }
    
    .label {
        font-size: 2.7rem;
    }
}

/* Line Animation */
.line {
    position: absolute;
    bottom: -30px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #0066FF, transparent);
    transform: translateX(-50%);
    animation: grow-line 1.5s ease-out forwards;
}

@keyframes grow-line {
    from {
        width: 0;
    }
    to {
        width: 90%;
    }
}

/* Discord Link and Footer */
.discord-footer {
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    color: #0066FF;
    opacity: 0.9;
    text-align: center;
    margin-top: 20px;
    padding-top: 10px;
}

.discord-footer .discord-link {
    position: relative;
    display: inline-block;
    cursor: pointer;
    color: #0066FF;
    opacity: 0.9;
    text-decoration: none;
    transition: color 0.3s ease;
}

.discord-footer .discord-link:hover {
    color: #0066FF;
}

.discord-footer .discord-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #0066FF;
    transform: translateX(-50%);
    transition: width 0.5s ease-out;
}

.discord-footer .discord-link:hover::after {
    width: 100%;
}

/* Mobile Optimizations (phones only) */
@media (max-width: 767px) {
    /* Body adjustments for mobile */
    body {
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile */
        padding: 10px;
        box-sizing: border-box;
    }

    /* Main container mobile optimization */
    .main-container {
        width: 95%;
        height: 90%;
        padding: 15px;
        border-radius: 12px;
        backdrop-filter: blur(8px);
    }

    /* Top bar mobile */
    .top-bar {
        font-size: 0.8rem;
        height: 40px;
        line-height: 40px;
        margin: 10px;
        padding: 0 10px;
        border-radius: 8px;
    }

    /* Console mobile optimization */
    .console {
        padding: 20px 15px;
        margin: 10px;
        border-radius: 8px;
        /* Stack sections closer together on phones */
        justify-content: center;
        row-gap: 12px;
    }

    /* Logo section mobile */
    .logo-section {
        margin-top: 10px;  /* pull closer to countdown */
        margin-bottom: 8px;
    }

    .logo-svg {
        height: 96px; /* larger logo on phones */
    }

    .logo-img {
        height: 60px;
    }

    .tagline {
        font-size: 1.15rem; /* larger description */
        margin-bottom: 10px;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
        line-height: 1.45;
    }

    /* Countdown mobile optimization */
    .countdown {
        /* Force a 3 + 1 layout on phones */
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-flow: row;
        gap: 0.9rem;
        margin: 15px 0;
        padding: 10px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 12px;
        border: 1px solid rgba(0, 102, 255, 0.2);
    }

    /* Force the 4th box (seconds) to occupy its own row */
    .countdown .time-box:nth-child(4) {
        grid-column: 1 / -1;
    }

    .time-box {
        min-width: 70px;
        flex: 1;
        padding: 8px 4px;
        background: rgba(0, 102, 255, 0.05);
        border-radius: 8px;
        border: 1px solid rgba(0, 102, 255, 0.1);
        transition: all 0.3s ease;
    }

    .time-box:hover {
        background: rgba(0, 102, 255, 0.1);
        border-color: rgba(0, 102, 255, 0.3);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 102, 255, 0.2);
    }

    .number {
        font-size: 2.8rem;
        line-height: 1;
        font-weight: 600;
        text-shadow: 0 0 15px rgba(33, 150, 243, 0.5);
        display: block;
        margin-bottom: 2px;
    }

    .number.seconds {
        font-size: 2.2rem;
    }

    .label {
        font-size: 0.75rem;
        margin-top: 2px;
        font-weight: 500;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        opacity: 0.9;
        display: block;
    }

    /* Line adjustment for mobile */
    .line {
        bottom: 0;
        height: 1px;
    }

    /* Discord footer mobile */
    .discord-footer {
        font-size: 0.9rem;
        margin-top: 8px;  /* closer to countdown */
        padding-top: 6px;
    }

    /* Gradient adjustments for mobile performance */
    .g1, .g2, .g3, .g4, .g5 {
        filter: blur(20px);
    }

    .gradients-container {
        filter: url(#goo) blur(20px);
    }
}

/* Small mobile devices */
@media (max-width: 479px) {
    body {
        padding: 5px;
    }

    .main-container {
        width: 98%;
        height: 95%;
        padding: 10px;
    }

    .console {
        padding: 15px 10px;
        margin: 5px;
        justify-content: center;
        row-gap: 10px;
    }

    .countdown {
        /* Keep the same 3 + 1 layout for extra-small phones */
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-flow: row;
        gap: 0.7rem;
        padding: 8px;
        margin: 10px 0;
    }

    .countdown .time-box:nth-child(4) { grid-column: 1 / -1; }

    .time-box {
        min-width: 55px;
        padding: 6px 2px;
    }

    .number {
        font-size: 2.2rem;
        font-weight: 600;
    }

    .number.seconds {
        font-size: 1.8rem;
    }

    .label {
        font-size: 0.65rem;
        letter-spacing: 0.3px;
    }

    .logo-img {
        height: 50px;
    }

    .tagline {
        font-size: 1.05rem;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
        line-height: 1.4;
    }

    .top-bar {
        font-size: 0.7rem;
        height: 35px;
        line-height: 35px;
        margin: 5px;
        padding: 0 8px;
    }

    .logo-section { margin-top: 8px; margin-bottom: 6px; }
    .logo-svg { height: 88px; }
    .discord-footer { font-size: 0.85rem; margin-top: 6px; padding-top: 4px; }
}

/* Landscape mobile optimization */
@media (max-width: 767px) and (orientation: landscape) {
    body {
        padding: 5px;
    }

    .main-container {
        height: 85%;
        padding: 10px;
    }

    .logo-section {
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .logo-img {
        height: 40px;
    }

    .tagline {
        font-size: 0.9rem;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
        line-height: 1.3;
    }

    .countdown {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-flow: row;
        gap: 0.6rem;
        margin: 8px 0;
        padding: 8px;
    }

    .countdown .time-box:nth-child(4) {
        grid-column: 1 / -1;
    }

    .time-box {
        padding: 6px 3px;
    }

    .number {
        font-size: 1.8rem;
        font-weight: 600;
    }

    .number.seconds {
        font-size: 1.4rem;
    }

    .label {
        font-size: 0.6rem;
        letter-spacing: 0.2px;
    }

    .line {
        bottom: 0;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .discord-footer .discord-link {
        padding: 8px 12px;
        border-radius: 6px;
        background: rgba(0, 102, 255, 0.1);
        transition: background 0.2s ease;
    }

    .discord-footer .discord-link:active {
        background: rgba(0, 102, 255, 0.2);
        transform: scale(0.95);
    }

    .logo-img {
        transition: transform 0.2s ease;
    }

    .logo-img:active {
        transform: scale(0.95);
    }

    /* Countdown touch optimizations */
    .time-box {
        transition: all 0.2s ease;
    }

    .time-box:active {
        background: rgba(0, 102, 255, 0.15) !important;
        transform: scale(0.98);
        box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
    }

    .countdown {
        touch-action: manipulation;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .g1, .g2, .g3, .g4, .g5 {
        animation: none;
    }

    .line {
        animation: none;
        width: 90%;
    }

    .discord-footer .discord-link::after {
        transition: none;
    }
}
  