/* styles.css - Mystery Drop Focus */
:root {
    /* Base Dark Theme Variables */
    --game-bg: #111111;
    --platform-bg: #1a1a1a;
    --header-bg: #1f1f1f;
    --text-light: #f0f0f0;
    --text-medium: #aaaaaa;
    --text-dark: #1c1e21; /* For light backgrounds if any part remains light */
    
    --accent-primary: #f39c12; /* Orange from Mystery Drop prototype */
    --accent-secondary: #e74c3c; /* A contrasting red/error color */
    --accent-success: #27ae60; /* Green for success */
    
    --border-color-dark: #333333;
    --border-color-medium: #444444;
    --border-color-light: #555555; /* For inputs etc. */

    --tab-inactive-text: var(--text-medium);
    --tab-active-text: var(--text-light);
    --tab-active-border: var(--accent-primary);
    --tab-hover-bg: #2a2a2a;

    --button-primary-bg: var(--accent-primary);
    --button-primary-text: var(--game-bg);
    --button-primary-hover-bg: #f3b041;

    /* Mystery Drop Specific */
    --game-box-bg: #2c2c2c;
    --game-box-border: var(--border-color-medium);
    --game-box-text-initial: var(--accent-primary);
    --game-box-revealed-success-bg: var(--accent-success);
    --game-box-revealed-fail-bg: var(--accent-secondary);
    --game-box-revealed-text: var(--text-light);
    --cooldown-text-color: var(--accent-primary);
    --found-codes-text-color: var(--accent-success);
    --redeem-input-bg: #252525;
    --redeem-input-border: var(--border-color-light);
    --redeem-input-text: var(--text-light);
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background: var(--game-bg);
    color: var(--text-light);
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
}

.challenge-platform-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-height: 100vh;
    padding: 1rem; /* Overall padding for the wrapper */
}
.challenge-platform {
    width: 100%;
    background-color: var(--platform-bg);
    border-radius: 8px; /* Subtle radius */
    box-shadow: 0 8px 25px rgba(0,0,0,0.3); /* Enhanced shadow for dark theme */
    border: 1px solid var(--border-color-dark);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
}
.control-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-color-dark);
    padding: 0.5rem 1rem;
    min-height: auto;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 1rem; /* Gap between tab group and utility area */
}
.main-tabs-group {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-wrap: nowrap;
    gap: 0.25rem;
}
.main-tabs-group::-webkit-scrollbar { display: none; }

.tab-button {
    background: none;
    border: none;
    color: var(--tab-inactive-text);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, border-bottom-color 0.2s ease;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    display: inline-flex;
    align-items: center;
    border-radius: 4px 4px 0 0;
}
.tab-button:hover {
    color: var(--text-light);
    background-color: var(--tab-hover-bg);
}
.tab-button.active {
    color: var(--tab-active-text);
    border-bottom-color: var(--tab-active-border);
    background-color: var(--platform-bg); /* Active tab blends with platform */
}
.tab-button .fas, .tab-button .far, .tab-button .fab {
    margin-right: 0.6em;
    font-size: 0.9em;
}

.utility-area { display: flex; align-items: center; flex-shrink: 0; }
.countdown-timer-wrapper {
    display: flex; flex-direction: column; align-items: flex-end;
    background-color: var(--header-bg); /* Match header */
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--border-color-medium);
}
.countdown-timer-container { display: flex; align-items: center; color: var(--text-medium); font-size: 0.8rem; white-space: nowrap; }
.countdown-label { margin-right: 0.3em; font-weight: 500; color: var(--text-light); }
#mainUtilityCountdownDisplay {
    font-family: 'Orbitron', sans-serif;
    background-color: var(--accent-primary); /* Orange for primary timer */
    color: var(--button-primary-text);
    font-weight: 700;
    min-width: 70px;
    text-align: center;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    margin-left: 0.3em;
}
#mainUtilityCountdownDisplay.challenge-mode { /* If we ever need to differentiate */
    background-color: var(--accent-secondary) !important;
}
.timer-end-date-display { font-size: 0.65rem; color: var(--text-medium); margin-top: 2px; white-space: nowrap; }

.tab-content-area {
    background-color: var(--platform-bg); /* Content area matches platform */
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tab-pane {
    display: none;
    animation: fadeInPane 0.5s ease-in-out;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    padding: 2rem; /* Default padding for tab panes */
}
.tab-pane.active {
    display: block;
}
@keyframes fadeInPane { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.tab-content-main-header {
    text-align: center;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color-dark);
}
.tab-content-main-header-icon {
    font-size: 2.8rem; /* Larger icon */
    color: var(--accent-primary);
    margin-bottom: 0.75rem;
    line-height: 1;
}
.tab-content-main-header-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.4rem; /* Larger title */
    color: var(--text-light);
    margin: 0.5rem 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
.tab-content-main-header-subtitle {
    font-size: 1.1rem;
    color: var(--text-medium);
    max-width: 750px;
    margin: 0.5rem auto 1rem auto;
    line-height: 1.6;
}

/* General text styling within tab panes */
.tab-pane > p, .tab-pane > ul {
    max-width: 800px;
    margin: 1.5rem auto; /* More spacing */
    line-height: 1.7;
    font-size: 1.05rem;
    color: var(--text-medium);
}
.tab-pane > ul { padding-left: 25px; }
.tab-pane > ul li { margin-bottom: 0.6rem; }
.tab-pane strong { color: var(--text-light); }


/* Mystery Drop Game Styles */
#dropzone.tab-pane {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.grid-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 110px); /* Slightly larger boxes */
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    margin-bottom: 2rem; /* More space after grid */
}
.grid-box {
    width: 110px;
    height: 110px;
    background: var(--game-box-bg);
    display: flex;
    flex-direction: column; /* To stack text and code */
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid var(--game-box-border);
    border-radius: 8px;
    text-align: center;
    color: var(--game-box-text-initial);
    transition: transform 0.2s ease, background-color 0.3s ease, border-color 0.2s ease;
    user-select: none; /* Prevent text selection on click */
}
.grid-box:hover:not(.revealed) {
    transform: scale(1.07);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(243, 156, 20, 0.3);
}
.grid-box.revealed {
    color: var(--game-box-revealed-text);
    cursor: default;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: normal;
    padding: 0.5rem;
    line-height: 1.4;
    transform: scale(1); /* Reset scale */
}
.grid-box.revealed strong {
    font-size: 1.1em;
    color: #fff;
    display: block;
    margin-bottom: 0.25rem;
}
.grid-box.revealed code {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    color: #fff;
    background-color: rgba(0,0,0,0.3);
    padding: 3px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 0.3rem;
    font-size: 0.95em;
}
/* Specific background for prize found */
.grid-box.prize-found { /* Assuming JS will add this class instead of inline style */
    background-color: var(--game-box-revealed-success-bg);
}
/* Specific background for no prize */
.grid-box.no-prize { /* Assuming JS will add this class */
    background-color: var(--game-box-revealed-fail-bg);
    font-size: 2.5rem; /* Keep X large */
}
.grid-box.limit-met { /* Assuming JS will add this class */
    background-color: var(--accent-primary);
    color: var(--game-bg);
    font-size: 0.9rem;
}


.cooldown-timer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1.2rem;
    color: var(--cooldown-text-color);
    font-family: 'Orbitron', sans-serif;
    padding: 0.5rem;
}
.found-codes-info {
    text-align: center;
    margin-top: 1rem;
    padding: 1rem;
    background-color: rgba(0,0,0,0.25);
    border: 1px solid var(--border-color-dark);
    border-radius: 6px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1rem;
    color: var(--found-codes-text-color);
    line-height: 1.6;
    box-shadow: inset 0 0 10px rgba(0,255,0,0.1);
}
.found-codes-info code {
    background-color: rgba(0, 255, 0, 0.2);
    padding: 3px 6px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    color: #90ee90; /* Lighter green for code itself */
}
.found-codes-info strong {
    color: #fff;
}


/* Redeem Page Styles */
.redeem-box {
    background: #222222;
    padding: 2rem;
    border: 1px solid var(--border-color-medium);
    border-radius: 8px;
    max-width: 500px; /* Wider redeem box */
    margin: 2rem auto;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}
.redeem-box p {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-medium);
    font-size: 1rem;
}
.redeem-box input[type="text"] {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem; /* More space between inputs */
    font-size: 1.1rem; /* Larger input text */
    background: var(--redeem-input-bg);
    color: var(--redeem-input-text);
    border: 1px solid var(--redeem-input-border);
    border-radius: 5px;
    box-sizing: border-box;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.08em;
}
.redeem-box input::placeholder {
    color: #555;
    font-family: 'Inter', sans-serif;
    letter-spacing: normal;
}
.redeem-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 8px rgba(243, 156, 20, 0.5);
}
.redeem-box button.replicated-cta-button { /* Making redeem button use platform's primary style */
    background: var(--button-primary-bg);
    color: var(--button-primary-text);
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    font-size: 1.1rem; /* Match input text size */
    width: 100%;
    margin-top: 1rem;
    padding: 0.9rem 1.5rem;
}
.redeem-box button.replicated-cta-button:hover {
    background: var(--button-primary-hover-bg);
}

.redeem-result {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1rem;
    font-size: 1.1rem;
    border-radius: 5px;
    line-height: 1.6;
    font-weight: 500;
}
.redeem-result.success {
    background-color: rgba(39, 174, 96, 0.15);
    color: var(--accent-success);
    border: 1px solid var(--accent-success);
}
.redeem-result.error {
    background-color: rgba(217, 4, 41, 0.1);
    color: var(--accent-secondary);
    border: 1px solid var(--accent-secondary);
}


.site-footer {
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.85rem;
    color: var(--footer-text-color);
    background-color: var(--header-bg);
    width:100%;
    box-sizing: border-box;
    flex-shrink: 0;
    border-top: 1px solid var(--border-color-dark);
}
.site-footer a { color: var(--accent-primary); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }


/* Responsive adjustments for Mystery Drop Theme */
@media screen and (max-width: 992px) {
    .control-bar { justify-content: space-between; }
    .utility-area { margin-top: 0; }
    .tab-button { padding: 0.6rem 1rem; font-size: 0.9rem; }
    .grid-wrapper { grid-template-columns: repeat(3, 90px); gap: 0.5rem;}
    .grid-box { width: 90px; height: 90px; font-size: 2rem; }
    .tab-content-main-header-title { font-size: 2rem; }
    .tab-content-main-header-subtitle { font-size: 1rem; }
}
@media screen and (max-width: 768px) {
    .challenge-platform-wrapper { padding: 0.5rem; }
    .tab-pane { padding: 1.5rem; }
    #dropzone.tab-pane { padding: 1rem; }
    .grid-wrapper { grid-template-columns: repeat(3, 80px); }
    .grid-box { width: 80px; height: 80px; font-size: 1.75rem; }
    .redeem-box { padding: 1.5rem; margin: 1.5rem auto; }
    .tab-content-main-header-title { font-size: 1.8rem; }
    .tab-content-main-header-subtitle { font-size: 0.95rem; }
}
@media screen and (max-width: 480px) {
    .challenge-platform-wrapper { padding: 0; }
    .challenge-platform { border-radius: 0; }
    .control-bar { padding: 0.5rem; }
    .main-tabs-group { gap: 0; justify-content: center;}
    .tab-button { padding: 0.6rem 0.5rem; font-size: 0.8rem; }
    .tab-button .fas { margin-right: 0.3em; }
    .utility-area { width: 100%; justify-content: center; margin-top: 0.5rem;}
    .grid-wrapper { grid-template-columns: repeat(3, calc( (100% / 3) - 1rem )); gap: 0.5rem; } /* More responsive grid */
    .grid-box { width: 100%; padding-bottom:100%; height:0; font-size: 2rem; position:relative;} /* Square boxes */
    .grid-box > * { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:90%;} /* Center content in square */
    .grid-box.revealed { font-size:0.8rem;}
    .grid-box.revealed strong {font-size:0.9rem;}


    .cooldown-timer, .found-codes-info { font-size: 0.9rem; }
    .redeem-box { padding: 1rem; margin: 1rem auto; }
    .redeem-box input[type="text"] { font-size: 0.9rem; padding: 0.6rem; }
    .redeem-box button.replicated-cta-button { font-size: 0.9rem; padding: 0.7rem 1rem;}
    .redeem-result { font-size: 0.95rem; }
    .tab-pane { padding: 1rem; }
    #dropzone.tab-pane { padding: 0.75rem; }
    .tab-content-main-header-title { font-size:1.6rem; }
    .tab-content-main-header-subtitle { font-size:0.9rem; }
}