/* ==========================================================================
   CSS Variables & Configuration
   ========================================================================== */
:root {
    /* Colors - Easily configurable */
    --color-res-blue: #00c5ff;
    /* Standard Resistance Blue */
    --color-res-blue-dark: #0082a8;
    /* Darker shade for gradients */
    --color-sg-red: #ed2939;
    /* Singapore Flag Red */
    --color-sg-red-dark: #b81f2b;

    /* Background & Surface Colors */
    --color-bg-base: #050a10;
    --color-bg-surface: rgba(10, 20, 35, 0.6);
    --color-bg-surface-hover: rgba(15, 30, 50, 0.8);
    --color-border: rgba(0, 197, 255, 0.2);

    /* Text Colors */
    --color-text-primary: #ffffff;
    --color-text-secondary: rgba(255, 255, 255, 0.7);

    /* Typography */
    --font-primary: 'Chakra Petch', system-ui, -apple-system, sans-serif;
    --font-display: 'Orbitron', system-ui, sans-serif;
    /* Sci-fi/Ingress feel */

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-base);
    color: var(--color-text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
    position: relative;
}

/* ==========================================================================
   Background Effects (Glassmorphism & Orbs)
   ========================================================================== */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: var(--color-bg-base);
}

.background-elements::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: -2;
    filter: grayscale(80%) contrast(1.2);
}

.background-elements::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(transparent 0,
            transparent 2px,
            rgba(0, 0, 0, 0.2) 2px,
            rgba(0, 0, 0, 0.2) 4px);
    z-index: 10;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: float 20s ease-in-out infinite alternate;
}

.orb-blue {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background-color: var(--color-res-blue);
}

.orb-red {
    bottom: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background-color: var(--color-sg-red);
    animation-delay: -10s;
}

.hex-grid {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='28' height='49' viewBox='0 0 28 49' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2300c5ff' fill-opacity='0.1'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 56px 98px;
    opacity: 0.4;
    mask-image: radial-gradient(circle at center, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black 20%, transparent 80%);
}

/* XM Particles */
#particles-container {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.xm-particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: floatUp linear forwards;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) scale(0.5);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-20vh) scale(1.2);
        opacity: 0;
    }
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(5%, 5%) scale(1.1);
    }
}

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    z-index: 1;
}

/* ==========================================================================
   Header & Branding
   ========================================================================== */
.header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fade-in-up 0.8s ease-out;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.event-logo {
    width: 120px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 15px rgba(0, 197, 255, 0.4));
    animation: fade-in-up 0.8s ease-out;
}

.event-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    letter-spacing: 2px;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    color: var(--color-res-blue);
    text-shadow: 0 0 15px rgba(0, 197, 255, 0.3);
}

.accent-text {
    color: var(--color-sg-red);
    text-shadow: 0 0 15px rgba(237, 41, 57, 0.4);
}

.title-shine {
    background: linear-gradient(120deg, var(--color-res-blue) 0%, var(--color-sg-red) 50%, var(--color-res-blue) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShine 4s linear infinite;
    text-shadow: none;
}

.text-gradient {
    background: linear-gradient(175deg, #ffffff 0%, var(--color-res-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.event-subtitle {
    font-family: var(--font-display);
    color: var(--color-res-blue);
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    letter-spacing: 4px;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.event-date {
    font-family: var(--font-display);
    color: var(--color-res-blue);
    font-size: clamp(0.95rem, 2.1vw, 1.3rem);
    letter-spacing: 4px;
    opacity: 0.9;
}

/* ==========================================================================
   Countdown Section
   ========================================================================== */
.countdown-section {
    width: 100%;
    max-width: 660px;
    text-align: center;
    margin-bottom: 4rem;
    animation: fade-in-up 0.8s ease-out 0.2s both;
}

.countdown-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 3px;
    color: rgba(0, 197, 255, 0.5);
}

.countdown-heading::before,
.countdown-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0, 197, 255, 0.3));
}

.countdown-heading::after {
    background: linear-gradient(to left, transparent, rgba(0, 197, 255, 0.3));
}

.countdown-heading-text {
    white-space: nowrap;
}

.cursor-blink {
    color: var(--color-res-blue);
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.countdown-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
    background: var(--color-bg-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-border);
    padding: 0.75rem 0.25rem;
    box-shadow: inset 0 0 20px rgba(0, 197, 255, 0.1);
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

.countdown-value {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 6vw, 3.5rem);
    font-weight: 700;
    line-height: 1;
    color: var(--color-res-blue);
    text-shadow: 0 0 20px rgba(0, 197, 255, 0.4);
    font-variant-numeric: tabular-nums;
    display: inline-block;
    text-align: center;
}

.countdown-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 2px;
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
}

/* ==========================================================================
   Buttons & Links
   ========================================================================== */
.action-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    animation: fade-in-up 0.8s ease-out 0.4s both;
}

.secondary-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 1.5px;
    border-radius: 4px;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Primary Button (Register) */
.btn-primary {
    background: linear-gradient(135deg,
            rgba(0, 18, 38, 0.98) 0%,
            rgba(0, 197, 255, 0.6) 30%,
            rgba(0, 197, 255, 0.6) 70%,
            rgba(0, 18, 38, 0.98) 100%);
    color: var(--color-res-blue);
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border: none;
    width: 100%;
    max-width: 400px;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    box-shadow: 0 0 25px rgba(0, 197, 255, 0.15);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 1.5px;
    background: linear-gradient(135deg, rgba(0, 30, 55, 0.97) 0%, rgba(0, 18, 38, 0.99) 100%);
    clip-path: polygon(13.5px 0, 100% 0, 100% calc(100% - 13.5px), calc(100% - 13.5px) 100%, 0 100%, 0 13.5px);
    z-index: 0;
    transition: var(--transition-base);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg,
            rgba(0, 30, 60, 0.99) 0%,
            rgba(0, 197, 255, 0.9) 30%,
            rgba(0, 197, 255, 0.9) 70%,
            rgba(0, 30, 60, 0.99) 100%);
    color: #fff;
    box-shadow: 0 5px 30px rgba(0, 197, 255, 0.4);
}

.btn-primary:hover::before {
    background: linear-gradient(135deg, rgba(0, 45, 80, 0.97) 0%, rgba(0, 30, 60, 0.99) 100%);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-text {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: left 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.btn-primary:hover .btn-glow {
    left: 200%;
}

/* Secondary Buttons (Guide, Swag) */
.btn-secondary {
    background: var(--color-bg-surface-hover);
    color: var(--color-res-blue);
    border: 1px solid var(--color-res-blue);
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    color: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Locked / Disabled State Overrides */
.btn-locked {
    cursor: not-allowed !important;
    opacity: 0.55;
    filter: grayscale(30%);
}

.btn-locked:hover {
    transform: none !important;
    box-shadow: 0 0 15px rgba(0, 197, 255, 0.1) !important;
}

.btn-primary.btn-locked:hover::before {
    background: linear-gradient(135deg, rgba(0, 30, 55, 0.97) 0%, rgba(0, 18, 38, 0.99) 100%) !important;
}

.btn-secondary.btn-locked:hover {
    color: var(--color-res-blue) !important;
    border-color: var(--color-res-blue) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    background: var(--color-bg-surface-hover) !important;
}

.status-badge {
    background: rgba(0, 197, 255, 0.1);
    border: 1px solid rgba(0, 197, 255, 0.5);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 2px;
    letter-spacing: 1px;
    color: var(--color-res-blue);
    display: inline-block;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    z-index: 1;
}

/* ==========================================================================
   Animations & Responsive
   ========================================================================== */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}



@keyframes textShine {
    0% {
        background-position: 200% center;
    }

    100% {
        background-position: -200% center;
    }
}

@media (max-width: 600px) {
    .countdown-section {
        padding: 2rem 1rem;
    }

    .countdown-wrapper {
        gap: 0.2rem;
    }

    .countdown-item {
        min-width: 0;
    }

    .countdown-separator {
        display: none;
        /* Hide separators on small screens for cleaner stacking if needed */
    }

    .countdown-wrapper {
        gap: 0.4rem;
    }

    .countdown-item {
        padding: 0.8rem 0.2rem;
        clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    }

    .secondary-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-secondary {
        width: 100%;
    }
}