:root {
    /* New color palette inspired by Whiteout Survival UI */
    --color-bg-primary: #0d142b;
    --color-bg-secondary: #1a264a;
    --color-bg-secondary-rgb: 26, 38, 74;
    --color-bg-input: #0d142b;
    --color-border: #3a4b7a;
    --color-border-rgb: 58, 75, 122;
    --color-accent-gold: #ffc700;
    --color-accent-gold-dark: #e6b300;
    --color-accent-gold-rgb: 255, 199, 0;
    --color-accent-blue: #0099ff;
    --color-accent-blue-dark: #007acc;
    --color-highlight: #a7d8f9;
    --color-text-primary: #f0f8ff;
    --color-text-secondary: #8c9dc5;
    --color-success: #28a745;
    --color-error: #f87171;
    --color-warning: #facc15;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
    background-color: var(--color-bg-primary);
    /* Suggestion: Add a blurred game background image for immersion */
    /* background-image: url('path/to/your/blurry-background.jpg'); */
    background-size: cover;
    background-position: center;
    color: var(--color-text-primary);
    font-family: 'Rajdhani', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

header {
    background-color: rgba(var(--color-bg-secondary-rgb), 0.8);
    transition: background-color 0.3s ease;
}

footer {
    flex-shrink: 0;
}

/* --- New Global Rework Styles --- */

/* Main CTA Button Style */
#hero-cta-btn, .modal-cta-button {
    background: linear-gradient(to bottom, var(--color-accent-gold), var(--color-accent-gold-dark));
    border: 1px solid var(--color-accent-gold-dark);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 2px 4px rgba(0, 0, 0, 0.5);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    color: #1a1000;
}
#hero-cta-btn:hover, .modal-cta-button:hover {
    filter: brightness(1.1);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 15px var(--color-accent-gold);
}
.modal-cta-button:disabled {
    background: #555;
    border-color: #444;
    cursor: not-allowed;
    filter: grayscale(1);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

/* Modal Redesign */
.mfp-bg {
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.mfp-zoom-in .mfp-content {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s ease-in-out;
}
.mfp-zoom-in.mfp-ready .mfp-content {
    opacity: 1;
    transform: scale(1);
}
.mfp-zoom-in.mfp-removing .mfp-content {
    opacity: 0;
    transform: scale(0.95);
}

#modal-container {
    background: linear-gradient(to bottom, var(--color-bg-secondary), #121a3a);
    border: 2px solid var(--color-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: opacity 0.3s ease-in-out, max-width 0.3s ease;
    overflow: hidden;
    border-radius: 1rem; /* Softer corners */
}
.modal-header {
    background-color: rgba(0,0,0,0.2);
    padding: 0.75rem;
    border-bottom: 2px solid var(--color-border);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}
.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text-primary);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}
.modal-body {
    padding: 1.5rem;
}
#modal-container.is-hiding {
    opacity: 0;
}

/* Resource Card Redesign */
.resource-card {
    background-color: rgba(var(--color-bg-secondary-rgb), 0.5);
    border: 2px solid var(--color-border);
    border-radius: 0.75rem;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.resource-card:hover {
    border-color: var(--color-highlight);
    transform: translateY(-4px);
}
.resource-card.selected {
    border-color: var(--color-accent-gold);
    box-shadow: 0 0 20px rgba(var(--color-accent-gold-rgb), 0.6);
    transform: translateY(-4px) scale(1.03);
}

/* Input Field Redesign */
#username-input {
    transition: all 0.2s ease-in-out;
    border-radius: 0.5rem;
    background-color: rgba(0,0,0,0.3);
}
#username-input:focus {
    box-shadow: 0 0 10px rgba(var(--color-accent-gold-rgb), 0.5);
    border-color: var(--color-accent-gold);
}

/* Generation Checklist & Progress */
#generation-progress-bar-container {
    width: 100%;
    background-color: var(--color-bg-input);
    border-radius: 9999px;
    height: 8px; /* Thicker bar */
    border: 1px solid var(--color-border);
    overflow: hidden;
    padding: 1px;
}
#generation-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(to right, var(--color-accent-blue), var(--color-highlight));
    border-radius: 9999px;
    transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.checklist-item {
    transition: color 0.4s ease-in-out;
    overflow: hidden;
    position: relative;
    padding: 0.25rem;
    background-color: rgba(0,0,0,0.1);
    border-radius: 0.25rem;
}
.checklist-item .checkmark {
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%) scale(0.5);
    opacity: 0;
    stroke: var(--color-success);
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    transition: opacity 0.3s 0.3s ease-out, transform 0.3s 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), stroke-dashoffset 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.checklist-item.completed { color: var(--color-success); }
.checklist-item.completed .checkmark {
    opacity: 1;
    stroke-dashoffset: 0;
    transform: translateY(-50%) scale(1);
}
.checklist-item .step-icon > div {
    border-color: var(--color-text-secondary);
}
.checklist-item .step-icon > .animate-pulse {
    background-color: var(--color-accent-gold);
}

/* Other styles */
#captcha-target {
    margin-left: auto;
    margin-right: auto;
}
#countdown-timer.urgent {
    color: var(--color-error);
    animation: pulse-urgent 1s infinite;
}
@keyframes pulse-urgent {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Explicit fix for the input form container width */
.input-form-container {
    width: 100%;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}