:root {
    --primary-color: #00d9ff;
    --secondary-color: #ff00ff;
    --bg-color: rgba(10, 25, 40, 0.75);
    --bg-color-solid: #0a1928;
}

#bg-video {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -100;
    object-fit: cover;
    filter: brightness(0.6) contrast(1.2);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto Mono', monospace;
    background-color: var(--bg-color-solid); /* Fallback */
    color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5) 1px, transparent 1px, transparent 3px);
    pointer-events: none;
    z-index: 1;
    animation: scanlines 20s linear infinite;
}

body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(10, 25, 40, 0) 50%, rgba(10, 25, 40, 0.8) 100%);
    pointer-events: none;
    z-index: 0;
}

#container {
    width: 90%;
    max-width: 1000px;
    height: auto;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 25px var(--primary-color), 0 0 40px var(--primary-color) inset;
    position: relative;
    background-color: var(--bg-color);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    animation: pulse-glow 4s infinite alternate;
    text-align: center;
    padding: 20px;
    z-index: 2;
}

header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 217, 255, 0.5);
    background: transparent;
    text-shadow: 0 0 5px rgba(0, 217, 255, 0.5);
}

header h1 {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5em;
    text-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color), 0 0 40px #fff;
    animation: flicker 2s infinite alternate;
    text-transform: uppercase;
}

header .subtitle {
    margin: 10px 0 0;
    font-size: 1.5em;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 8px var(--secondary-color);
    animation: glitch 5s infinite;
}

main {
    padding: 60px 20px;
}

#countdown {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.time-unit {
    display: flex;
    flex-direction: column;
}

.time-unit span {
    font-family: 'Orbitron', sans-serif;
    font-size: 7em;
    line-height: 1;
    text-shadow: 0 0 15px var(--primary-color), 0 0 25px var(--primary-color), 0 0 50px #fff;
}

.time-unit label {
    font-size: 1.2em;
    text-transform: uppercase;
    margin-top: 15px;
    color: rgba(0, 217, 255, 0.8);
    letter-spacing: 2px;
}

footer {
    width: 100%;
    text-align: center;
    padding: 20px 0 15px;
    font-size: 0.9em;
    background: transparent;
    border-top: 1px solid rgba(0, 217, 255, 0.5);
    box-sizing: border-box;
    margin-top: auto;
}

footer .socials a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 15px 10px;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid transparent;
}

footer .socials a:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--secondary-color), 0 0 20px var(--secondary-color);
    border-color: var(--secondary-color);
    background: rgba(255, 0, 255, 0.1);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.5em;
    }
    header .subtitle {
        font-size: 1.1em;
    }
    .time-unit span {
        font-size: 3.5em;
    }
    .time-unit label {
        font-size: 1em;
    }
    #countdown {
        gap: 20px;
    }
    main {
        padding: 40px 10px;
    }
}

@keyframes flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% {
    text-shadow:
    0 0 5px #fff,
    0 0 10px #fff,
    0 0 15px #fff,
    0 0 20px var(--primary-color),
    0 0 35px var(--primary-color),
    0 0 40px var(--primary-color),
    0 0 50px var(--primary-color),
    0 0 75px var(--primary-color);
    opacity: 1;
  }
  20%, 24%, 55% {
    text-shadow: none;
    opacity: 0.8;
  }
}

@keyframes pulse-glow {
    from {
        box-shadow: 0 0 25px var(--primary-color), 0 0 40px var(--primary-color) inset;
        border-color: var(--primary-color);
    }
    to {
        box-shadow: 0 0 40px var(--primary-color), 0 0 55px var(--primary-color) inset;
        border-color: rgba(0, 217, 255, 0.7);
    }
}

@keyframes scanlines {
    from { background-position: 0 0; }
    to { background-position: 0 -100px; }
}

@keyframes glitch {
  2%, 64% {
    transform: translate(2px, 0) skew(0deg);
  }
  4%, 60% {
    transform: translate(-2px, 0) skew(0deg);
  }
  62% {
    transform: translate(0, 0) skew(5deg);
  }
}