/* ========================================
   COLOR THEME VARIABLES
   ======================================== */

:root {
    /* Default Theme: BLUE */
    --primary-color: #00d4ff;
    --primary-glow: rgba(0, 212, 255, 0.8);
    --primary-glow-soft: rgba(0, 212, 255, 0.5);
    --primary-glow-subtle: rgba(0, 212, 255, 0.3);
    --primary-glow-lighter: rgba(0, 212, 255, 0.2);
    --primary-glow-faint: rgba(0, 212, 255, 0.05);

    --secondary-color: #ff6b35;
    --secondary-bright: #ff8c42;
    --secondary-glow: rgba(255, 107, 53, 0.8);
    --secondary-glow-soft: rgba(255, 107, 53, 0.6);
    --secondary-glow-subtle: rgba(255, 107, 53, 0.4);
    --secondary-glow-lighter: rgba(255, 107, 53, 0.3);
    --secondary-glow-faint: rgba(255, 107, 53, 0.1);

    --bg-dark-1: #0a0e1a;
    --bg-dark-1-alpha: rgba(10, 14, 26, 0.7);
    --bg-dark-2: #141922;
    --bg-dark-2-alpha: rgba(20, 25, 34, 0.65);
    --bg-dark-3: #1e3a5f;
    --bg-dark-4: #2d5580;
    --bg-dark-5: #3d5a80;

    --text-primary: #e8f1f5;
    --text-secondary: #c0d0e0;
    --text-tertiary: #7ea3cc;
}

/* Theme: RED */
[data-theme="red"] {
    --primary-color: #ff0040;
    --primary-glow: rgba(255, 0, 64, 0.8);
    --primary-glow-soft: rgba(255, 0, 64, 0.5);
    --primary-glow-subtle: rgba(255, 0, 64, 0.3);
    --primary-glow-lighter: rgba(255, 0, 64, 0.2);
    --primary-glow-faint: rgba(255, 0, 64, 0.05);

    --secondary-color: #ff6b00;
    --secondary-bright: #ff8c42;
    --secondary-glow: rgba(255, 107, 0, 0.8);
    --secondary-glow-soft: rgba(255, 107, 0, 0.6);
    --secondary-glow-subtle: rgba(255, 107, 0, 0.4);
    --secondary-glow-lighter: rgba(255, 107, 0, 0.3);
    --secondary-glow-faint: rgba(255, 107, 0, 0.1);

    --bg-dark-1: #1a0a0a;
    --bg-dark-1-alpha: rgba(26, 10, 10, 0.7);
    --bg-dark-2: #220505;
    --bg-dark-2-alpha: rgba(34, 5, 5, 0.65);
    --bg-dark-3: #3a1e1e;
    --bg-dark-4: #552d2d;
    --bg-dark-5: #6b3a3a;

    --text-primary: #ffe8e8;
    --text-secondary: #ffcccc;
    --text-tertiary: #cc7e7e;
}

/* Theme: GREEN */
[data-theme="green"] {
    --primary-color: #00ff88;
    --primary-glow: rgba(0, 255, 136, 0.8);
    --primary-glow-soft: rgba(0, 255, 136, 0.5);
    --primary-glow-subtle: rgba(0, 255, 136, 0.3);
    --primary-glow-lighter: rgba(0, 255, 136, 0.2);
    --primary-glow-faint: rgba(0, 255, 136, 0.05);

    --secondary-color: #88ff00;
    --secondary-bright: #a0ff42;
    --secondary-glow: rgba(136, 255, 0, 0.8);
    --secondary-glow-soft: rgba(136, 255, 0, 0.6);
    --secondary-glow-subtle: rgba(136, 255, 0, 0.4);
    --secondary-glow-lighter: rgba(136, 255, 0, 0.3);
    --secondary-glow-faint: rgba(136, 255, 0, 0.1);

    --bg-dark-1: #0a1a0a;
    --bg-dark-1-alpha: rgba(10, 26, 10, 0.7);
    --bg-dark-2: #051205;
    --bg-dark-2-alpha: rgba(5, 18, 5, 0.65);
    --bg-dark-3: #1e3a1e;
    --bg-dark-4: #2d552d;
    --bg-dark-5: #3a6b3a;

    --text-primary: #e8ffe8;
    --text-secondary: #ccffcc;
    --text-tertiary: #7ecc7e;
}

/* Theme: BLACK */
[data-theme="black"] {
    --primary-color: #ffffff;
    --primary-glow: rgba(255, 255, 255, 0.8);
    --primary-glow-soft: rgba(255, 255, 255, 0.5);
    --primary-glow-subtle: rgba(255, 255, 255, 0.3);
    --primary-glow-lighter: rgba(255, 255, 255, 0.2);
    --primary-glow-faint: rgba(255, 255, 255, 0.05);

    --secondary-color: #cccccc;
    --secondary-bright: #e0e0e0;
    --secondary-glow: rgba(204, 204, 204, 0.8);
    --secondary-glow-soft: rgba(204, 204, 204, 0.6);
    --secondary-glow-subtle: rgba(204, 204, 204, 0.4);
    --secondary-glow-lighter: rgba(204, 204, 204, 0.3);
    --secondary-glow-faint: rgba(204, 204, 204, 0.1);

    --bg-dark-1: #000000;
    --bg-dark-1-alpha: rgba(0, 0, 0, 0.7);
    --bg-dark-2: #0a0a0a;
    --bg-dark-2-alpha: rgba(10, 10, 10, 0.65);
    --bg-dark-3: #1a1a1a;
    --bg-dark-4: #2a2a2a;
    --bg-dark-5: #3a3a3a;

    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-tertiary: #aaaaaa;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */

*, body, html {
    padding: 0;
    margin: 0;
}

* {
    box-sizing: border-box;
}

body, html {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 0.5px;
}


/* ========================================
   BACKGROUND & VIDEO
   ======================================== */

.background-image-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* No default background - let JS handle it */
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.background-video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    background-size: cover;
    object-fit: cover;
}


/* ========================================
   GRADIENT OVERLAYS
   ======================================== */

.gradient-overlay-top,
.gradient-overlay-bottom {
    position: fixed;
    left: 0;
    width: 100%;
    height: 30%;
    pointer-events: none;
    z-index: -1;
}

.gradient-overlay-top {
    top: 0;
    background: linear-gradient(to bottom, var(--bg-dark-1), transparent);
}

.gradient-overlay-bottom {
    bottom: 0;
    background: linear-gradient(to top, var(--bg-dark-1), transparent);
}


/* ========================================
   LOGOS (TOP & BOTTOM)
   ======================================== */

.top-logo,
.bottom-logo {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.top-logo {
    top: 0;
    padding: 35px;
}

.top-logo img {
    max-width: 300px;
    height: auto;
}

.bottom-logo {
    bottom: 50px;
    padding: 0;
}

.bottom-logo img {
    max-width: 800px;
    height: auto;
}


/* ========================================
   STEPS CONTAINER (QUIZ BOX)
   ======================================== */

.steps-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 810px;
    height: 637px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1;
    color: var(--text-secondary);
    background:
        linear-gradient(135deg,
            rgba(10, 14, 26, 0.7) 0%,
            rgba(20, 30, 48, 0.65) 50%,
            rgba(10, 14, 26, 0.7) 100%);
    background:
        linear-gradient(135deg,
            var(--bg-dark-1-alpha) 0%,
            var(--bg-dark-2-alpha) 50%,
            var(--bg-dark-1-alpha) 100%);
    text-align: center;
    border: none;
    clip-path: polygon(
        0 20px,
        20px 0,
        calc(100% - 20px) 0,
        100% 20px,
        100% calc(100% - 20px),
        calc(100% - 20px) 100%,
        20px 100%,
        0 calc(100% - 20px)
    );
    box-shadow:
        0 0 40px var(--secondary-glow-subtle),
        0 0 80px var(--primary-glow-lighter),
        inset 0 0 60px var(--primary-glow-faint);
}

/* Main tech border frame */
.steps-container::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(
        135deg,
        var(--primary-color) 0%,
        var(--bg-dark-5) 25%,
        var(--bg-dark-4) 50%,
        var(--bg-dark-5) 75%,
        var(--primary-color) 100%
    );
    clip-path: polygon(
        0 20px,
        20px 0,
        calc(100% - 20px) 0,
        100% 20px,
        100% calc(100% - 20px),
        calc(100% - 20px) 100%,
        20px 100%,
        0 calc(100% - 20px)
    );
    z-index: -1;
    animation: borderPulse 3s ease-in-out infinite;
}

/* Inner border glow */
.steps-container::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: transparent;
    border: 1px solid var(--primary-glow-soft);
    clip-path: polygon(
        0 20px,
        20px 0,
        calc(100% - 20px) 0,
        100% 20px,
        100% calc(100% - 20px),
        calc(100% - 20px) 100%,
        20px 100%,
        0 calc(100% - 20px)
    );
    pointer-events: none;
    box-shadow:
        inset 0 0 20px var(--primary-glow-lighter),
        inset 0 0 40px var(--primary-glow-lighter);
}


/* SVG Corner Accents */
.corner-accent {
    position: absolute;
    z-index: 100;
    pointer-events: none;
    filter: drop-shadow(0 0 8px var(--secondary-glow));
    animation: cornerGlow 2s ease-in-out infinite alternate;
}

.corner-accent line {
    stroke: var(--secondary-color);
}

.corner-accent circle {
    fill: var(--secondary-color);
}

.corner-top-left {
    top: -10px;
    left: -10px;
}

.corner-top-right {
    top: -10px;
    right: -10px;
}

.corner-bottom-left {
    bottom: -10px;
    left: -10px;
}

.corner-bottom-right {
    bottom: -10px;
    right: -10px;
}

/* Scanning line effect */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        transparent 20%,
        var(--primary-glow) 50%,
        transparent 80%,
        transparent 100%
    );
    box-shadow: 0 0 10px var(--primary-glow-soft);
    animation: scanLine 4s linear infinite;
    pointer-events: none;
    z-index: 50;
}

/* Tech pattern overlay */
.steps-details::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, var(--primary-glow-faint) 2px, var(--primary-glow-faint) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, var(--primary-glow-faint) 2px, var(--primary-glow-faint) 4px),
        radial-gradient(circle at 20% 30%, var(--primary-glow-faint) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, var(--secondary-glow-faint) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    opacity: 0.6;
}

/* Circuit lines decoration flanking the step counter */
.header-steps {
    position: relative;
}

.header-steps::before,
.header-steps::after {
    content: "";
    position: absolute;
    height: 1px;
    width: 60px;
    top: 50%;
    background: linear-gradient(90deg, transparent 0%, var(--secondary-color) 50%, transparent 100%);
    box-shadow: 0 0 5px var(--secondary-glow);
}

.header-steps::before {
    left: -70px;
}

.header-steps::after {
    right: -70px;
}

/* ========================================
   STEPS HEADER
   ======================================== */

.header-steps {
    display: flex;
    justify-content: center;
    align-items: center;
}

.steps-content {
    color: var(--secondary-bright);
    font-size: 60px;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    text-shadow: 0 0 10px var(--secondary-glow-soft);
}


/* ========================================
   STEPS DETAILS (CONTENT AREA)
   ======================================== */

.steps-details {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    flex-grow: 1;
    text-align: center;
    color: var(--text-primary);
    font-size: 40px;
    font-weight: 600;
}

.browser-logo {
    margin: 20px 0;
    width: 130px;
    height: auto;
}


/* ========================================
   BUTTONS
   ======================================== */

.steps-buttons-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 20px;
}

.steps-button {
    background: linear-gradient(135deg, var(--bg-dark-3) 0%, var(--bg-dark-4) 50%, var(--bg-dark-3) 100%);
    border: 2px solid var(--bg-dark-5);
    width: 420px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 30px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    padding: 0;
    margin: 0;
    cursor: pointer;
    clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
    box-shadow: 0 0 15px var(--primary-glow-lighter), inset 0 0 20px var(--secondary-glow-faint);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.steps-button:hover {
    background: linear-gradient(135deg, var(--bg-dark-4) 0%, var(--bg-dark-5) 50%, var(--bg-dark-4) 100%);
    border-color: var(--secondary-bright);
    box-shadow: 0 0 25px var(--secondary-glow), inset 0 0 30px var(--secondary-glow-lighter);
    color: var(--secondary-bright);
}


/* ========================================
   CTA BUTTON (FINAL STEP)
   ======================================== */

#cta {
    display: none;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-bright) 50%, var(--secondary-color) 100%);
    border: 2px solid var(--secondary-bright);
    width: 365px;
    height: 78px;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--bg-dark-1);
    font-size: 25px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    margin: 0 auto;
    cursor: pointer;
    clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
    box-shadow: 0 0 20px var(--secondary-glow), inset 0 0 15px var(--primary-glow-lighter);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 3px;
}

#cta:hover {
    background: linear-gradient(135deg, var(--secondary-bright) 0%, var(--secondary-color) 50%, var(--secondary-bright) 100%);
    box-shadow: 0 0 30px var(--secondary-bright), inset 0 0 20px var(--primary-glow-subtle);
    transform: scale(1.05);
}


/* ========================================
   LOADING BAR
   ======================================== */

.loading-bar-container {
    display: none;
    text-align: center;
    width: 100%;
}

.loading-bar-title {
    color: var(--text-primary);
    font-size: 40px;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 600;
}

.loading-bar {
    width: 80%;
    max-width: 810px;
    height: 20px;
    background-color: var(--bg-dark-3);
    border: 1px solid var(--bg-dark-5);
    border-radius: 2px;
    overflow: hidden;
    margin: 10px auto;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.loading-bar-progress {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--secondary-bright) 50%, var(--secondary-color) 100%);
    border-radius: 0;
    transition: width 0.15s;
    box-shadow: 0 0 15px var(--secondary-glow);
}


/* ========================================
   FOOTER
   ======================================== */

.mini-footer {
    width: 100%;
    background-color: rgba(10, 14, 26, 0.7);
    background-color: var(--bg-dark-1-alpha);
    color: var(--text-tertiary);
    font-size: 9px;
    display: flex;
    justify-content: center;
    padding: 1px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 2;
    border-top: 1px solid var(--bg-dark-5);
}

.mini-footer a {
    color: var(--text-tertiary);
    margin: 0 10px;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mini-footer a:hover {
    color: var(--secondary-bright);
    text-decoration: none;
}


/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.05);
    }
}

@keyframes borderPulse {
    0% {
        opacity: 0.6;
        filter: brightness(1);
    }
    50% {
        opacity: 1;
        filter: brightness(1.2);
    }
    100% {
        opacity: 0.6;
        filter: brightness(1);
    }
}

@keyframes cornerGlow {
    0% {
        filter: drop-shadow(0 0 8px var(--secondary-glow));
        opacity: 0.9;
    }
    100% {
        filter: drop-shadow(0 0 15px var(--secondary-bright));
        opacity: 1;
    }
}

@keyframes scanLine {
    0% {
        top: 0%;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out forwards;
}

.fade-out {
    animation: fadeOut 0.3s ease-in-out forwards;
}


/* ========================================
   TECH FRAME RESPONSIVE STYLES
   ======================================== */

@media (max-width: 900px) {
    .steps-container {
        width: 90%;
        max-width: 810px;
        height: auto;
        min-height: 500px;
        padding: 40px 20px;
    }

    .corner-accent {
        width: 50px;
        height: 50px;
    }

    .header-steps::before,
    .header-steps::after {
        width: 40px;
    }

    .header-steps::before {
        left: -50px;
    }

    .header-steps::after {
        right: -50px;
    }
}

@media (max-width: 600px) {
    .steps-container {
        clip-path: polygon(
            0 15px,
            15px 0,
            calc(100% - 15px) 0,
            100% 15px,
            100% calc(100% - 15px),
            calc(100% - 15px) 100%,
            15px 100%,
            0 calc(100% - 15px)
        );
    }

    .steps-container::before {
        clip-path: polygon(
            0 15px,
            15px 0,
            calc(100% - 15px) 0,
            100% 15px,
            100% calc(100% - 15px),
            calc(100% - 15px) 100%,
            15px 100%,
            0 calc(100% - 15px)
        );
    }

    .steps-container::after {
        clip-path: polygon(
            0 15px,
            15px 0,
            calc(100% - 15px) 0,
            100% 15px,
            100% calc(100% - 15px),
            calc(100% - 15px) 100%,
            15px 100%,
            0 calc(100% - 15px)
        );
    }

    .corner-accent {
        width: 40px;
        height: 40px;
    }

    .header-steps::before,
    .header-steps::after {
        display: none;
    }
}

/* Additional hex bolt decorations */
.steps-buttons-container {
    position: relative;
}

.steps-buttons-container::before,
.steps-buttons-container::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--bg-dark-5);
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    box-shadow:
        0 0 5px var(--primary-glow-soft),
        inset 0 0 3px var(--primary-glow-subtle);
    z-index: 1;
}

.steps-buttons-container::before {
    bottom: -25px;
    left: 50%;
    transform: translateX(-60px);
}

.steps-buttons-container::after {
    bottom: -25px;
    left: 50%;
    transform: translateX(60px);
}