@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --success: #10b981;
    --error: #ef4444;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: radial-gradient(circle at top left, #1e1b4b, #0f172a);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    margin: auto;
}

.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease;
}

h1, h2, h3 {
    font-weight: 800;
    margin-bottom: 1rem;
    text-align: center;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 600;
}

input[type="text"], input[type="number"], select, .file-input-wrapper {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    outline: none;
    transition: border-color 0.3s ease;
}

input:focus {
    border-color: var(--accent-color);
}

.btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-success {
    background: var(--success);
}
.btn-success:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: var(--error);
}
.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* ADMIN STYLES */
.question-item {
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* GAME STYLES */
.game-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.game-screen.active {
    display: flex;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.media-container {
    width: 100%;
    min-height: 250px;
    max-height: 400px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

.media-container img, .media-container video {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    display: block;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
}

.option-btn {
    background: rgba(30, 41, 59, 0.8);
    border: 2px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 16px;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.option-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--accent-color);
    transform: scale(1.02);
}

.option-btn.correct {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success);
}

.option-btn.wrong {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--error);
}

/* Score HUD & Map */
.hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}
.score-badge {
    background: rgba(59, 130, 246, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--accent-color);
}
.lives {
    color: var(--error);
    font-size: 1.5rem;
    letter-spacing: 5px;
}

.map-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
    padding: 0 10px;
}
.map-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 20px;
    right: 20px;
    height: 4px;
    background: var(--glass-border);
    transform: translateY(-50%);
    z-index: 1;
}
.station {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 3px solid var(--glass-border);
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: bold;
    transition: all 0.3s ease;
}
.station.active {
    background: var(--accent-color);
    border-color: white;
    box-shadow: 0 0 15px var(--accent-color);
    transform: scale(1.2);
}
.station.completed {
    background: var(--success);
    border-color: white;
}

/* Timer */
.timer-container {
    width: 100%;
    height: 10px;
    background: rgba(0,0,0,0.5);
    border-radius: 5px;
    margin-bottom: 2rem;
    overflow: hidden;
}
.timer-bar {
    height: 100%;
    background: var(--success);
    width: 100%;
    transition: width 1s linear, background-color 0.3s ease;
}
.timer-bar.warning {
    background: var(--error);
}

/* Modal Feedback */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-overlay.active {
    display: flex;
}
.modal-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    max-width: 600px;
    width: 90%;
    text-align: center;
}
.modal-media {
    width: 100%;
    max-height: 300px;
    margin-top: 1rem;
    border-radius: 12px;
}

/* Certificate */
.certificate {
    background: white;
    color: #1e293b;
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    border: 10px solid #fbbf24;
    position: relative;
    overflow: hidden;
}
.certificate h1 {
    color: #b45309;
    background: none;
    -webkit-text-fill-color: initial;
}
.certificate .name {
    font-size: 3rem;
    font-weight: 800;
    margin: 2rem 0;
    color: #1e293b;
    text-transform: uppercase;
}
