/* styles.css */
:root {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F0F2F5;
    --text-primary: #1C1E21;
    --text-secondary: #555B6A;

    --accent-red: #D90429;
    --accent-red-darker: #B80020;
    --accent-orange: #FD7E14;

    --border-color: #CED4DA;
    --tab-inactive-bg: transparent;
    --tab-active-bg: var(--bg-primary);
    --tab-hover-bg: #E9ECEF;
    --footer-text-color: var(--text-secondary);

    --button-cta-bg: var(--accent-red);
    --button-cta-text: #FFFFFF;
    --button-cta-shadow: rgba(217, 4, 41, 0.2);
    --button-cta-hover-bg: var(--accent-red-darker);
    --button-cta-hover-shadow: rgba(217, 4, 41, 0.3);

    --thumb-overlay-bg: rgba(255, 255, 255, 0.9);
    --thumb-bg: #E9ECEF;
    --thumb-border: var(--border-color);
    --overlay-arrow-bg: rgba(222, 226, 230, 0.7);
    --overlay-arrow-hover-bg: rgba(206, 212, 218, 0.9);
    --timer-end-date-color: var(--text-secondary);

    --cq-stage-bg: var(--bg-primary);
    --cq-stage-border: var(--border-color);
    --cq-stage-shadow: rgba(0,0,0,0.06);
    --cq-inactive-color: #adb5bd;
    --cq-warning-color: var(--accent-orange);
    --cq-timer-alert-color: var(--accent-red);
    --success-color: #198754;
    --error-color: var(--accent-red);

    /* Immersive Styles */
    --immersive-overlay-bg: rgba(0, 0, 0, 0.75);
    --immersive-text-color: #FFFFFF;
    --immersive-button-bg: var(--accent-red);
    --immersive-button-text: #FFFFFF;
    --immersive-button-hover-bg: var(--accent-red-darker);
    --immersive-input-bg: rgba(255, 255, 255, 0.1);
    --immersive-input-border: rgba(255, 255, 255, 0.3);
    --immersive-input-focus-glow: rgba(253, 126, 20, 0.7);
    --immersive-back-button-bg: rgba(0, 0, 0, 0.3);
    --immersive-back-button-hover-bg: rgba(0, 0, 0, 0.5);
    --immersive-back-button-color: #FFFFFF;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
}
body.no-scroll {
    overflow: hidden;
}

#fullScreenGameWrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
#fullScreenGameWrapper.immersive-bg {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: background-image 0.5s ease-in-out;
}
#fullScreenGameWrapper > #codecrackerQuestGameArea {
    width: 100%;
    height: 100%;
    padding: 0 !important;
    background-image: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.challenge-platform-wrapper {
    width: 100%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    box-sizing: border-box;
    min-height: 100vh;
}
.challenge-platform {
    width: 100%;
    background-color: var(--bg-primary);
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}
.control-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 0.5rem;
    min-height: 60px;
    flex-shrink: 0;
}
.main-tabs-group { display: flex; overflow-x: auto; scrollbar-width: none; margin-right: 0.5rem; }
.main-tabs-group::-webkit-scrollbar { display: none; }
.tab-button {
    padding: 0.85rem 0.8rem;
    cursor: pointer;
    border: none;
    background-color: var(--tab-inactive-bg);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
    transition: background-color 0.2s ease, color 0.2s ease, border-bottom 0.2s ease;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    border-radius: 6px 6px 0 0;
}
.tab-button:hover {
    background-color: var(--tab-hover-bg);
    color: var(--text-primary);
}
.tab-button.active {
    background-color: var(--tab-active-bg);
    color: var(--accent-red);
    font-weight: 600;
    border-bottom: 3px solid var(--accent-red);
}
.tab-button.live-active {
    background-color: var(--tab-active-bg);
    color: var(--accent-orange);
    font-weight: 600;
    border-bottom: 3px solid var(--accent-orange);
}
.tab-button.live-active .fa-solid { animation: pulseLiveIcon 1.5s infinite ease-in-out; }
@keyframes pulseLiveIcon { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }
.tab-button .fa-solid, .tab-button .fas { margin-right: 0.5rem; font-size: 0.9em; }
.tab-button .tab-text + .fa-solid, .tab-button .tab-text + .fas { margin-left: 0.5rem; margin-right: 0; }
.tab-button .tab-text { white-space: nowrap; }

.utility-area { display: flex; align-items: center; padding-right: 0.5rem; flex-shrink: 0; gap: 0.5rem; }
.countdown-timer-wrapper {
    display: flex; flex-direction: column; align-items: flex-end;
    background-color: var(--bg-secondary);
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}
#mainUtilityCountdownDisplay.challenge-mode {
    background-color: var(--accent-orange) !important;
}
.countdown-timer-container { display: flex; align-items: center; color: var(--text-secondary); font-size: 0.8rem; white-space: nowrap; }
.countdown-label { margin-right: 0.3em; font-weight: 500; color: var(--text-primary); }
#mainUtilityCountdownDisplay {
    font-family: 'Orbitron', sans-serif;
    background-color: var(--accent-red);
    color: #FFFFFF;
    font-weight: 700;
    min-width: 80px;
    text-align: center;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    margin-left: 0.3em;
    transition: background-color 0.3s ease;
}
.timer-end-date-display { font-size: 0.65rem; color: var(--timer-end-date-color); margin-top: 2px; white-space: nowrap; }

.tab-content-area {
    padding: 2.5rem;
    background-color: var(--bg-primary);
    flex-grow: 1;
    position: relative;
    overflow-y: auto;
}

.tab-pane { display: none; animation: fadeInPane 0.5s ease-in-out; height: 100%; }
.tab-pane.active { display: block; height: 100%; }
@keyframes fadeInPane { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.tab-content-main-header {
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.challenge-tab-header-wrapper .tab-content-main-header {
    margin-bottom: 1rem;
}

.tab-content-main-header-icon {
    font-size: 2.5rem;
    color: var(--accent-red);
    margin-bottom: 0.5rem;
    line-height: 1;
}
#tabLive .tab-content-main-header-icon { color: var(--accent-orange); }
.tab-content-main-header-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2rem;
    color: var(--text-primary);
    margin: 0.5rem 0;
}
.tab-content-main-header-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0.5rem auto 0 auto;
    line-height: 1.6;
}
.campaign-specific-headline {
    font-family: 'Orbitron', sans-serif;
    color: var(--text-primary);
    font-size: 1.8rem;
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
}
.campaign-specific-headline em {
    font-style: normal;
    color: var(--accent-orange);
}

#challengeTabSelectionTimer {
    display: none;
}

.replicated-contest-actions {
    text-align: center;
    max-width: 800px;
    margin: 2rem auto 2rem auto;
}
.replicated-contest-actions h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
}
.replicated-cta-buttons-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}
.replicated-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--button-cta-bg);
    color: var(--button-cta-text);
    padding: 0.8rem 1.5rem;
    text-decoration: none; font-weight: 600; border-radius: 50px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    box-shadow: 0 3px 10px var(--button-cta-shadow);
    font-size: 0.95rem; border: none; cursor: pointer; text-align: center;
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 200px;
}
.replicated-cta-button .fa-solid, .replicated-cta-button .fas { margin-right: 0.6em; font-size: 1em; }
.replicated-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--button-cta-hover-shadow);
    background-color: var(--button-cta-hover-bg);
}

.mission-video-section { margin-bottom: 2.5rem; }
.spotlight-platform-tagline {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.75rem;
    color: var(--accent-red);
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 2.5rem;
}
.spotlight-section {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}
.spotlight-hero-image-area {
    flex: 0 0 40%;
    max-width: 400px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}
.spotlight-hero-image-area img { width: 100%; height: auto; display: block; }
.spotlight-text-area { flex: 1; text-align: left; }
.spotlight-text-area h3 {
    font-family: 'Orbitron', sans-serif; font-size: 1.6rem;
    color: var(--text-primary); margin-top: 0; margin-bottom: 1rem;
}
.spotlight-text-area p { text-align: left; font-size: 1rem; line-height: 1.6; color: var(--text-secondary); margin-bottom: 1rem; }
.spotlight-text-area ul { list-style: none; padding-left: 0; margin-bottom: 1.5rem; }
.spotlight-text-area ul li { padding-left: 0; position: relative; margin-bottom: 0.75rem; font-size: 0.95rem; color: var(--text-secondary); display: flex; align-items: flex-start; }
.spotlight-text-area ul li .fa-solid, .spotlight-text-area ul li .fas {
    color: var(--accent-red); margin-right: 0.75em; font-size: 1em;
    width: 1.2em; text-align: center; flex-shrink: 0; padding-top: 0.1em;
}

.large-video-player-container {
    width: 100%; max-width: 900px; margin: 0 auto;
    position: relative; border-radius: 12px; overflow: hidden;
    border: 1px solid var(--border-color); background-color: #000;
}
.large-main-video-player-wrapper {
    width: 100%; aspect-ratio: 16 / 9; background-color: #000;
    overflow: hidden; position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: center;
}
.large-main-video-player-wrapper iframe { width: 100%; height: 100%; border: none; display:block; }
.large-main-video-player-wrapper p { color: #ccc; font-size:0.9rem; text-align:center; padding: 5% 10%; }
.large-video-thumbnail-overlay-strip {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background-color: var(--thumb-overlay-bg);
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    padding: 0.75rem; box-sizing: border-box; z-index: 2;
    border-top: 1px solid var(--border-color); display: flex; align-items: center;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
.large-video-thumbnail-overlay-strip.collapsed { transform: translateY( calc(100% - 1px) ); opacity: 1; }
.large-video-thumbnail-overlay-strip.collapsed .large-thumbnails-container,
.large-video-thumbnail-overlay-strip.collapsed .large-thumbnail-nav-arrow { opacity: 0; pointer-events: none; transition: opacity 0.2s ease-in-out; }
.large-thumbnail-nav-arrow {
    background-color: var(--overlay-arrow-bg); color: var(--text-primary);
    border: none; padding: 0.8rem 0.5rem; cursor: pointer; border-radius: 4px; font-size: 1.5rem; line-height: 1;
    margin: 0 0.5rem; z-index: 3; display: inline-flex; align-items: center; justify-content: center;
    transition: opacity 0.3s ease-in-out, background-color 0.2s ease;
}
.large-thumbnail-nav-arrow:hover { background-color: var(--overlay-arrow-hover-bg); }
.large-thumbnails-container {
    flex-grow: 1; overflow-x: hidden !important;
    white-space: nowrap; margin: 0 0.5rem;
    transition: opacity 0.3s ease-in-out;
}
.large-video-thumbnail-item {
    display: inline-block; width: 150px; margin-right: 1rem; cursor: pointer;
    border-radius: 6px; overflow: hidden; background-color: var(--thumb-bg);
    transition: transform 0.2s ease, box-shadow 0.2s ease; vertical-align: top;
    border: 1px solid var(--thumb-border);
}
.large-video-thumbnail-item:last-child { margin-right: 0; }
.large-video-thumbnail-item:hover, .large-video-thumbnail-item.playing {
    transform: scale(1.03); box-shadow: 0 0 10px var(--accent-red);
    border-color: var(--accent-red);
}
.large-video-thumbnail-item img { width: 100%; height: 84px; object-fit: cover; display: block; }
.large-video-thumbnail-title {
    padding: 0.4rem 0.6rem; font-size: 0.75rem; color: var(--text-secondary);
    text-align: center; white-space: normal; line-height: 1.3; height: 30px; overflow: hidden;
}
.large-overlay-collapse-toggle {
    background-color: var(--accent-red); color: #FFFFFF;
    border: none; padding: 0.7rem; cursor: pointer; border-radius: 4px;
    font-size: 1rem; line-height: 1; position: absolute;
    top: -35px; right: 10px; z-index: 4;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.large-overlay-collapse-toggle:hover { background-color: var(--accent-red-darker); transform: scale(1.1); }

.site-footer { text-align: center; padding: 1.5rem 1rem; font-size: 0.85rem; color: var(--footer-text-color); background-color: var(--bg-secondary); width:100%; box-sizing: border-box; flex-shrink: 0;}
.site-footer a { color: var(--accent-red); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* --- CHALLENGE TAB - MAIN ENTRY CARD STYLES --- */
.challenge-selection-area {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
}
.challenge-entry-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.challenge-entry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
.challenge-entry-card-icon {
    font-size: 2.8rem;
    color: var(--accent-red);
    margin-bottom: 1rem;
}
.challenge-entry-card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}
.challenge-entry-card-tagline {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}
.challenge-entry-card .replicated-cta-button {
     margin-top: auto;
     flex-basis: auto;
     width: auto;
     align-self: center;
     padding: 0.8rem 1.5rem;
     font-size: 0.95rem;
}
.challenge-entry-card-status {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--success-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3em 0.8em;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.challenge-entry-card.inactive .challenge-entry-card-status {
    background-color: var(--text-secondary);
}
.challenge-entry-card.inactive {
    opacity: 0.7;
}
.challenge-entry-card.inactive .replicated-cta-button {
     background-color: var(--cq-inactive-color) !important;
     color: var(--bg-primary) !important;
     cursor: not-allowed !important;
     pointer-events: none;
     box-shadow: none !important;
     transform: none !important;
}

/* --- CODECRACKER QUEST STYLES (Old Cards & Immersive Shared if any) --- */
.immersive-back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: var(--immersive-back-button-bg);
    color: var(--immersive-back-button-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    z-index: 10100;
    transition: background-color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.immersive-back-button:hover {
    background-color: var(--immersive-back-button-hover-bg);
    transform: scale(1.1);
}
.immersive-back-button i {
    margin: 0;
}

.cq-header { text-align: center; margin-bottom: 20px; padding: 0 1rem; }
.cq-header h2 { font-family: 'Orbitron', sans-serif; color: var(--accent-red); font-size: 1.8em; margin-bottom: 0.3em; }
.cq-header h2 em { color: var(--accent-orange); font-style: normal;}
.cq-header p { font-size: 0.9em; color: var(--text-secondary); }

.cq-stages-area {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 1rem;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}
.cq-stage {
    border: 1px solid var(--cq-stage-border); border-radius: 10px;
    background-color: transparent; box-shadow: 0 4px 8px var(--cq-stage-shadow);
    perspective: 1200px; min-height: 390px;
    transition: opacity 0.3s ease, box-shadow 0.5s ease;
    display: flex;
    flex-direction: column;
}
.cq-stage.inactive { opacity: 0.65; }
.cq-stage-inner {
    position: relative; width: 100%; height: 100%; min-height: 390px;
    text-align: center; transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d; border-radius: 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.cq-stage.is-flipped .cq-stage-inner { transform: rotateY(180deg); }
.cq-stage-front, .cq-stage-back {
    position: absolute; width: 100%; height: 100%; top: 0; left: 0;
    -webkit-backface-visibility: hidden; backface-visibility: hidden;
    border-radius: 10px; overflow: hidden; display: flex; flex-direction: column;
    box-sizing: border-box; background-color: var(--cq-stage-bg);
    flex-grow: 1;
}
.cq-stage-front { padding: 20px; justify-content: space-between; align-items: center; }
.cq-stage.inactive .cq-stage-front { background-color: var(--bg-secondary); }
.cq-stage-back { transform: rotateY(180deg); padding: 20px; justify-content: space-between; align-items: stretch; }
.cq-stage-timer {
    font-size: 0.85em; font-weight: 600; color: var(--text-secondary);
    background-color: rgba(0, 0, 0, 0.03);
    padding: 4px 10px; border-radius: 12px; position: absolute; top: 15px; right: 15px; z-index: 10;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.cq-stage-timer.expired { color: var(--cq-timer-alert-color); font-weight: 700; background-color: rgba(217, 4, 41, 0.1); }
.cq-stage.inactive .cq-stage-timer { background-color: rgba(0,0,0,0.02); color: #999; }
.cq-stage-name {
    font-size: 1.2em; font-family: 'Orbitron', sans-serif;
    font-weight: 700; margin-bottom: 15px; color: var(--accent-red); width: 100%; text-align: center; flex-shrink: 0;
}
.cq-stage.inactive .cq-stage-name { color: var(--cq-inactive-color); }
.cq-stage-front .cq-front-description {
    font-size: 0.9em; color: var(--text-secondary); margin: 10px 0; line-height: 1.5; flex-grow: 1;
    display: flex; align-items: center; justify-content: center; max-width: 90%;
}
.cq-stage.inactive .cq-front-description { color: #888; }
.cq-lock-indicator { font-size: 2.2em; margin-bottom: 10px; color: var(--accent-red); flex-shrink: 0; }
.cq-stage.inactive .cq-lock-indicator { color: var(--cq-inactive-color); }
.cq-unlock-controls { width: 100%; display: flex; flex-direction: column; align-items: center; margin-top: auto; flex-shrink: 0; padding-bottom: 5px; }
.cq-unlock-controls label { display: block; margin-bottom: 5px; font-weight: 500; font-size: 0.9em; color: var(--text-primary); }
.cq-unlock-controls input[type="text"] {
    width: 80%; max-width: 220px; padding: 10px; margin-bottom: 10px;
    border: 1px solid var(--border-color); border-radius: 5px; text-align: center; font-size: 1em;
    background-color: var(--bg-primary); color: var(--text-primary);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.cq-unlock-controls input:disabled { background-color: var(--bg-secondary); border-color: var(--border-color); cursor: not-allowed; }
.cq-unlock-controls .replicated-cta-button {
     margin-top: 5px;
     flex-basis: auto !important;
     width: auto !important;
     padding: 0.8rem 1.5rem !important;
     font-size: 0.95rem !important;
}
.cq-instruction-block {
    text-align: left; font-size: 0.9em; line-height: 1.6;
    background-color: var(--bg-secondary); padding: 15px; border-radius: 8px;
    border: 1px solid var(--border-color); margin-top: 10px; flex-grow: 1; overflow-y: auto;
    display: flex; flex-direction: column;
}
.cq-instruction-block h4 { margin-top: 0; font-size: 1.05em; color: var(--accent-red); margin-bottom: 8px; font-family: 'Orbitron', sans-serif;}
.cq-instruction-block strong { color: var(--cq-warning-color); font-weight: 700; }
.cq-secret-phrase {
    display: block; margin: 10px 0; padding: 10px;
    background-color: var(--bg-secondary); border-left: 4px solid var(--cq-warning-color);
    font-weight: 600; font-size: 1.1em; color: var(--text-primary); text-align: center;
}
.cq-visibility-countdown {
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
    font-size: 0.8em; color: var(--cq-timer-alert-color); font-weight: 600;
    background-color: rgba(255,255,255,0.8); padding: 3px 8px; border-radius: 5px;
    z-index: 5;
}
.cq-voice-status { font-size: 0.85em; color: var(--text-secondary); margin-top: -5px; margin-bottom: 10px; height: 1.2em; font-style: italic; }
.cq-voice-status.listening { color: var(--accent-red); font-weight: 500; }
.cq-voice-status.error { color: var(--cq-timer-alert-color); font-weight: 500; }
.cq-voice-status.success { color: var(--success-color); font-weight: 500; }
.cq-safe-dial-container {
    display: flex; flex-direction: column; align-items: center; margin: 10px 0; padding: 15px;
    background-color: var(--bg-secondary); border-radius: 8px; border: 1px solid var(--border-color);
    flex-grow: 1; justify-content: center;
}
.cq-dial-display {
    font-family: 'Orbitron', sans-serif; font-size: 2.8em; font-weight: bold; color: var(--text-primary);
    background-color: var(--bg-primary); padding: 10px 20px; border-radius: 5px;
    border: 2px solid var(--border-color); margin-bottom: 15px; min-width: 80px;
    text-align: center; transition: background-color 0.1s ease, color 0.1s ease, border-color 0.1s ease;
}
.cq-dial-display.correct-hit { background-color: #d1e7dd; color: #0f5132; border-color: #badbcc; }
.cq-dial-controls { display: flex; gap: 15px; }
.cq-dial-controls .replicated-cta-button {
     font-size: 1.3em !important;
     padding: 6px 10px !important;
     line-height: 1 !important;
     flex-basis: auto !important;
     min-width: auto !important;
     width: auto !important;
}
.cq-combination-status { font-size: 0.9em; margin-top: 10px; color: var(--text-secondary); height: 1.2em; }
.cq-combination-status strong { color: var(--accent-red); font-weight: 600; }
.shake { animation: cq_shake 0.5s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes cq_shake { 10%, 90% { transform: translate3d(-1px, 0, 0); } 20%, 80% { transform: translate3d(2px, 0, 0); } 30%, 50%, 70% { transform: translate3d(-4px, 0, 0); } 40%, 60% { transform: translate3d(4px, 0, 0); } }
.cq-stage.relocked .cq-lock-indicator::after { content: " (Re-locked)"; font-size: 0.5em; vertical-align: middle; color: var(--cq-timer-alert-color); }
.cq-wire-panel {
    display: flex; justify-content: center; align-items: center; gap: 10px;
    padding: 15px; margin: 10px 0; background-color: #343a40;
    border-radius: 8px; border: 2px solid #495057;
    flex-grow: 1; position: relative;
}
.cq-wire {
    height: 80px; width: 12px; border-radius: 6px; cursor: pointer;
    transition: transform 0.1s ease-out, opacity 0.2s ease-out;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5) inset; border: 1px solid rgba(255,255,255,0.15);
}
.cq-wire:hover:not(.cut) { transform: scale(1.1); }
.cq-wire.cut { opacity: 0.3; cursor: not-allowed; transform: scale(0.9); }
.cq-wire.red { background-color: #dc3545; }
.cq-wire.blue { background-color: #0d6efd; }
.cq-wire.yellow { background-color: #ffc107; }
.cq-wire.green { background-color: #198754; }
.cq-stage.alarm-active {
    box-shadow: 0 0 15px 5px rgba(217, 4, 41, 0.7);
    animation: cq_alarmPulse 0.5s infinite alternate;
}
@keyframes cq_alarmPulse {
    from { box-shadow: 0 0 8px 3px rgba(217, 4, 41, 0.5); }
    to { box-shadow: 0 0 18px 7px rgba(217, 4, 41, 0.9); }
}
.cq-fail-message { color: var(--cq-timer-alert-color); font-weight: bold; font-size: 1.1em; margin-top: 15px; }
.cq-success-message-container {
    padding: 1.5rem; text-align: center; background-color: var(--bg-secondary);
    border-radius: 8px; margin-top: 1.5rem; flex-grow: 1; display:flex; flex-direction:column; justify-content:center; align-items:center;
}
.cq-success-message-container .fa-trophy { font-size: 2.5rem; color: var(--success-color); margin-bottom: 0.8rem; }
.cq-success-message-container h4 { font-family: 'Orbitron', sans-serif; color: var(--success-color); font-size: 1.3rem; margin-bottom: 0.5rem; }
.cq-success-message-container p { color: var(--text-secondary); font-size: 0.95rem; }

/* Styles for other game areas (Referral, Video etc.) */
.rf-header, .vu-header, .tc-header, .sc-header, .dc-header, .sy-header, .wc-header { text-align:center; margin-bottom:1.5rem; margin-top:1rem;}
.rf-header h2, .vu-header h2, .tc-header h2, .sc-header h2, .dc-header h2, .sy-header h2, .wc-header h2 { font-family: 'Orbitron', sans-serif; color: var(--accent-red); font-size: 1.8em; margin-bottom: 0.3em;}
.rf-header h2 em, .vu-header h2 em, .tc-header h2 em, .sc-header h2 em, .dc-header h2 em, .sy-header h2 em, .wc-header h2 em { font-style: normal; color: var(--accent-orange);}
.rf-header p, .vu-header p, .tc-header p, .sc-header p, .dc-header p, .sy-header p, .wc-header p {font-size:0.9em; color: var(--text-secondary);}
.rf-content-area, .vu-content-area, .tc-content-area, .sc-content-area, .dc-content-area, .sy-content-area, .wc-content-area { padding:20px; text-align:center; border:1px dashed var(--border-color); margin:20px auto; max-width: 700px; background-color: var(--bg-secondary); border-radius: 8px;}
.rf-content-area input[type="text"] {width:70%; padding:10px; text-align:center; border:1px solid var(--border-color); border-radius:4px 0 0 4px; font-size:0.9em;}
.rf-content-area .replicated-cta-button {border-radius:0 4px 4px 0 !important; padding: 10px 15px !important; font-size: 0.9em !important; line-height:normal !important; flex-grow:0 !important; min-width: auto !important;}
.rf-content-area .fab, .rf-content-area .fas {margin:0 10px; cursor:pointer;}
.rf-content-area .fa-facebook { color: #3b5998;}
.rf-content-area .fa-twitter { color: #1da1f2;}
.rf-content-area .fa-whatsapp { color: #25d366;}
.rf-content-area .fa-envelope { color: #7f8c8d;}
.rf-content-area hr {margin: 20px 0; border-color: var(--border-color);}
.rf-content-area ul {list-style:none; padding:0; max-width:400px; margin:auto;}
.rf-content-area ul li {display:flex; justify-content:space-between; padding:8px 0; border-bottom:1px solid #eee; font-size:0.9em;}
.rf-content-area ul li span:last-child {font-weight:bold; color:var(--accent-red);}
.tc-content-area textarea {width: 98%; height: 100px; margin-bottom: 10px; padding: 10px; border:1px solid var(--border-color); border-radius:4px;}


/* --- IMMERSIVE CODECRACKER QUEST (CQ) STYLES (when inside #fullScreenGameWrapper) --- */
#fullScreenGameWrapper #codecrackerQuestGameArea .immersive-step {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center; /* MODIFIED: Default to center for steps like step 2 */
    text-align: center;
    animation: fadeInImmersiveStep 0.7s ease-in-out;
    padding: 20px; /* General padding for the step content area */
    box-sizing: border-box;
    position: relative;
    z-index: 10050;
}

#fullScreenGameWrapper #codecrackerQuestGameArea .immersive-overlay-card {
    background-color: var(--immersive-overlay-bg);
    color: var(--immersive-text-color);
    padding: 2.5rem 3rem;
    border-radius: 12px;
    max-width: 550px;
    width: auto;
    min-width: 300px;
    margin-left: auto;   /* MODIFIED: Default to auto for centering */
    margin-right: auto;  /* MODIFIED: Default to auto for centering */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    animation: fadeInOverlayCard 0.5s ease-out 0.3s backwards;
    position: relative; /* Keep relative for children positioning if needed */
    z-index: 10060;
    text-align: left;
}

/* Specific offset for the FIRST immersive card to push it slightly right of center */
#fullScreenGameWrapper #codecrackerQuestGameArea #immersive-cq-stage1-step1 .immersive-overlay-card {
    position: relative; /* Needed for 'left' to work against its flex-centered position */
    left: -3vw; /* Nudge 10% of viewport width to the right. Adjust this value. */
                /* If this is too much or too little, try a px value like 50px, 70px, etc. */
                /* Or adjust the percentage carefully. */
}


/* Style for the consolidated text block in the first card */
#fullScreenGameWrapper #codecrackerQuestGameArea .immersive-text-block {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}


@keyframes fadeInImmersiveStep {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInOverlayCard {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}


#fullScreenGameWrapper #codecrackerQuestGameArea .immersive-mission-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: var(--accent-orange);
    margin-top: 0;
    margin-bottom: 1rem;
    text-align: center;
}

#fullScreenGameWrapper #codecrackerQuestGameArea .immersive-instructions {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center; /* Center instructions text if it's a single paragraph */
}
#fullScreenGameWrapper #codecrackerQuestGameArea #immersive-cq-stage1-step2 .immersive-overlay-card {
    position: relative; /* Ensure it's relative if not already */
    left: -22vw; /* Explicitly set left offset to 0, overriding any inherited 'left' value */
    /* margin-left: auto; and margin-right: auto; should still be inherited for centering */
}


#fullScreenGameWrapper #codecrackerQuestGameArea .immersive-action-button {
    background-color: var(--immersive-button-bg);
    color: var(--immersive-button-text);
    border: none;
    padding: 0.9rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Orbitron', sans-serif;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    display: block;
    width: fit-content;
    margin: 1.5rem auto 0 auto;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    animation: pulseButton 2s infinite ease-in-out 1s;
}

#fullScreenGameWrapper #codecrackerQuestGameArea .immersive-action-button:hover,
#fullScreenGameWrapper #codecrackerQuestGameArea .immersive-action-button:focus {
    background-color: var(--immersive-button-hover-bg);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(184, 0, 32, 0.5);
    animation-play-state: paused;
}

@keyframes pulseButton {
    0% { transform: scale(1); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
    50% { transform: scale(1.03); box-shadow: 0 4px 15px rgba(217, 4, 41, 0.4); }
    100% { transform: scale(1); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
}


#fullScreenGameWrapper #codecrackerQuestGameArea .immersive-input {
    background-color: var(--immersive-input-bg);
    color: var(--immersive-text-color);
    border: 1px solid var(--immersive-input-border);
    padding: 0.8rem 1rem;
    font-size: 1.2rem;
    font-family: 'Orbitron', sans-serif;
    border-radius: 8px;
    text-align: center;
    width: 100%;
    max-width: 250px;
    margin: 0 auto 1.5rem auto;
    display: block;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    letter-spacing: 0.1em;
}

#fullScreenGameWrapper #codecrackerQuestGameArea .immersive-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Inter', sans-serif;
    letter-spacing: normal;
}

#fullScreenGameWrapper #codecrackerQuestGameArea .immersive-input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 15px var(--immersive-input-focus-glow);
}

#fullScreenGameWrapper #codecrackerQuestGameArea .immersive-feedback {
    margin-top: 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem;
    border-radius: 4px;
    text-align: center;
}

#fullScreenGameWrapper #codecrackerQuestGameArea .immersive-feedback.success {
    color: var(--success-color);
    background-color: rgba(25, 135, 84, 0.2);
    border: 1px solid var(--success-color);
}

#fullScreenGameWrapper #codecrackerQuestGameArea .immersive-feedback.error {
    color: var(--error-color);
    background-color: rgba(217, 4, 41, 0.2);
    border: 1px solid var(--error-color);
}


/* Responsive adjustments */
@media screen and (max-width: 1350px) { .countdown-label { display: none; } .countdown-timer-wrapper { padding: 0.4rem 0.5rem; } .tab-button { padding: 0.8rem 0.6rem; font-size: 0.8rem; } }
@media screen and (max-width: 992px) {
    .challenge-platform-wrapper { padding: 1rem; }
    .countdown-timer-wrapper { font-size: 0.75rem; }
    .tab-button { padding: 0.75rem 0.5rem; }
    .tab-content-main-header-title { font-size: 2rem; }
    .campaign-specific-headline { font-size: 1.6rem; }
    .spotlight-platform-tagline { font-size: 1.5rem; }
    .spotlight-section { flex-direction: column; align-items: center; max-width: 100%;}
    .spotlight-hero-image-area, .spotlight-text-area { max-width: 100%; width: 100%; flex-basis: auto; }
    .spotlight-hero-image-area { margin-bottom: 2rem; }
    .spotlight-text-area { text-align: center; }
    .spotlight-text-area h3 { font-size: 1.4rem; text-align: center;}
    .spotlight-text-area p, .spotlight-text-area ul li { text-align: left; }
    .spotlight-text-area ul { display: inline-block; text-align: left; }
    .replicated-contest-actions { max-width: 100%; }
    .large-video-thumbnail-overlay-strip { padding: 0.5rem; }
    .large-thumbnail-nav-arrow { padding: 0.6rem 0.3rem; font-size: 1.2rem; }
    .large-overlay-collapse-toggle { padding: 0.6rem; font-size: 0.9rem; top: -30px; }
    .large-video-thumbnail-item { width: 120px; }
    .large-video-thumbnail-item img { height: 67px; }
    .large-video-thumbnail-title { font-size: 0.7rem; }
    .replicated-cta-button { flex-basis: calc(50% - 0.5rem); max-width: calc(50% - 0.5rem); }
    .challenge-entry-card { max-width: calc(50% - 1rem); }
     .cq-stages-area { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
     #fullScreenGameWrapper #codecrackerQuestGameArea .immersive-overlay-card { padding: 2rem; max-width: 80%; }
     #fullScreenGameWrapper #codecrackerQuestGameArea #immersive-cq-stage1-step1 .immersive-overlay-card { left: 8vw; } /* Adjust offset for this screen size */
     #fullScreenGameWrapper #codecrackerQuestGameArea .immersive-mission-title { font-size: 1.8rem; }
}
 @media screen and (max-width: 768px) {
    .challenge-platform-wrapper { padding: 0.5rem; }
    .challenge-platform { border-radius: 12px;}
    .control-bar { flex-wrap: wrap; justify-content: center; padding-bottom: 0.5rem; }
    .main-tabs-group { width: 100%; margin-right: 0; margin-bottom: 0.5rem; justify-content: center; }
    .utility-area { width: auto; justify-content: center; margin-top: 0.5rem; flex-wrap: wrap; gap: 0.5rem;}
    .tab-content-main-header-title { font-size: 1.8rem; }
    .campaign-specific-headline { font-size: 1.4rem; }
    .tab-content-main-header-subtitle { font-size: 0.9rem; }
    .spotlight-platform-tagline { font-size: 1.3rem; }
    .replicated-contest-actions h3 { font-size: 1.3rem; }
    .tab-content-area { padding: 1.5rem; }
    .cq-stages-area { grid-template-columns: 1fr; }
    .cq-stage { min-height: 340px; margin-bottom: 1.5rem; }
    .cq-stage-inner { min-height: 340px; }
    .challenge-entry-card { max-width: 100%; }
    #fullScreenGameWrapper #codecrackerQuestGameArea .immersive-step { padding: 20px; } /* More general padding */
    #fullScreenGameWrapper #codecrackerQuestGameArea .immersive-overlay-card { padding: 1.5rem; max-width: 90%; }
    #fullScreenGameWrapper #codecrackerQuestGameArea #immersive-cq-stage1-step1 .immersive-overlay-card { left: 5vw; } /* Adjust offset */
    #fullScreenGameWrapper #codecrackerQuestGameArea .immersive-mission-title { font-size: 1.6rem; }
    #fullScreenGameWrapper #codecrackerQuestGameArea .immersive-action-button { font-size: 1rem; padding: 0.8rem 1.5rem; }
    #fullScreenGameWrapper #codecrackerQuestGameArea .immersive-input { font-size: 1.1rem; }
}
@media screen and (max-width: 600px) {
    body { padding: 0; }
    .challenge-platform-wrapper { padding: 0.5rem; border-radius: 0; }
    .challenge-platform { border-radius: 0; margin-bottom:0; }

    .tab-button .tab-text { display: none; } .tab-button { padding: 0.7rem; }
    .tab-button .fa-solid, .tab-button .fas { margin-right: 0; margin-left:0; }
    .tab-content-main-header-icon { font-size: 2.2rem;}
    .tab-content-main-header-title { font-size: 1.5rem; }
    .campaign-specific-headline { font-size: 1.3rem; }
    .spotlight-hero-image-area, .spotlight-text-area { max-width: 100%; }
    .spotlight-text-area h3 {font-size: 1.2rem;}
    .spotlight-text-area p, .spotlight-text-area ul li {font-size: 0.9rem;}
    .replicated-cta-button { font-size: 0.9rem; padding: 0.7rem 1.2rem; width: 100%; box-sizing: border-box; flex-basis: 100%; max-width: 100%;}
    .replicated-cta-buttons-group {gap: 0.5rem;}
    .large-video-thumbnail-item { width: 100px; }
    .large-video-thumbnail-item img { height: 56px; }
    .large-overlay-collapse-toggle { top: -28px; }
    .timer-end-date-display {font-size: 0.6rem;}
    #mainUtilityCountdownDisplay { font-size: 0.9rem; min-width: 70px;}
    .cq-dial-display { font-size: 2.2em; }
    .cq-stage-name { font-size: 1.1em;}
    .challenge-entry-card-title { font-size: 1.4rem; }
    .challenge-entry-card-tagline { font-size: 0.9rem; min-height: auto;}
    .cq-stage { padding: 15px; min-height: auto; }
    .cq-stage-inner {min-height: auto;}
    .cq-stage-front .cq-front-description { font-size: 0.85em;}
    .cq-wire-panel { gap: 8px; padding: 10px;}
    .cq-wire { height: 70px; width: 10px;}
    #fullScreenGameWrapper #codecrackerQuestGameArea .immersive-step { padding: 10px; }
    #fullScreenGameWrapper #codecrackerQuestGameArea .immersive-overlay-card { padding: 1rem 1.2rem; max-width: calc(100% - 20px); width:calc(100% - 20px); }
    #fullScreenGameWrapper #codecrackerQuestGameArea #immersive-cq-stage1-step1 .immersive-overlay-card { left: 20px; } /* Smaller fixed offset for very small screens */
    #fullScreenGameWrapper #codecrackerQuestGameArea .immersive-mission-title { font-size: 1.4rem; }
    .immersive-back-button { width: 35px; height: 35px; font-size: 1rem; line-height: 35px; top:10px; left:10px;}
}