:root {
    --primary: #4628da;
    --primary-light: #6c4fff;
    --secondary: #e21b3c;
    --accent-green: #26c485;
    --accent-orange: #ff8c00;
    --accent-blue: #2196f3;
    --bg-dark: #1a1a2e;
    --bg-card: #16213e;
    --text-light: #ffffff;
    --text-muted: #a0a0b0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
}
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.container-wide {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.header {
    background: var(--bg-card);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.header h1 {
    font-size: 1.5rem;
    color: var(--primary-light);
}

.header h1 a {
    color: inherit;
    text-decoration: none;
}

.header h1 a:hover {
    color: var(--text-light);
}

.header nav {
    display: flex;
    gap: 16px;
    align-items: center;
}

.header a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.header a:hover {
    color: var(--text-light);
}

.header a.active {
    color: var(--primary-light);
}
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card h2 {
    margin-bottom: 12px;
}

.card p {
    color: var(--text-muted);
    margin-bottom: 8px;
}
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-light);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: #ff3355;
}

.btn-green {
    background: var(--accent-green);
    color: white;
}

.btn-green:hover {
    background: #2dd99a;
}

.btn-orange {
    background: var(--accent-orange);
    color: white;
}

.btn-orange:hover {
    background: #ffa333;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary-light);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-large {
    padding: 18px 36px;
    font-size: 1.2rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-dark);
    border: 2px solid #333;
    border-radius: var(--radius);
    color: var(--text-light);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-light);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}
.landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
}

.landing h1 {
    font-size: 3rem;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.landing-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}
.join-box {
    max-width: 400px;
    margin: 60px auto;
    text-align: center;
}

.join-box h2 {
    margin-bottom: 24px;
}

.join-box input {
    font-size: 1.5rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 4px;
}
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
}

.game-question {
    font-size: 1.5rem;
    margin-bottom: 32px;
    max-width: 600px;
}

.answer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 600px;
    width: 100%;
}

.answer-btn {
    padding: 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    color: white;
    transition: transform 0.1s, opacity 0.2s;
    min-height: 80px;
}

.answer-btn:hover {
    transform: scale(1.05);
}

.answer-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.answer-btn.a { background: var(--secondary); }
.answer-btn.b { background: var(--primary); }
.answer-btn.c { background: var(--accent-orange); }
.answer-btn.d { background: var(--accent-green); }

.answer-btn.correct {
    box-shadow: 0 0 20px var(--accent-green);
    opacity: 1 !important;
}

.answer-btn.wrong {
    box-shadow: 0 0 20px var(--secondary);
    opacity: 0.5 !important;
}
.host-lobby {
    text-align: center;
    padding: 40px;
}

.room-code {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 8px;
    color: var(--primary-light);
    margin: 20px 0;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    display: inline-block;
}

.player-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 20px 0;
}

.player-chip {
    background: var(--primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.host-question {
    font-size: 2rem;
    margin: 20px 0;
}

.host-controls {
    margin: 20px 0;
    display: flex;
    gap: 12px;
    justify-content: center;
}
.leaderboard {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    margin-bottom: 8px;
}

.leaderboard-item.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #1a1a2e;
}

.leaderboard-item.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #808080);
}

.leaderboard-item.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #8b4513);
}

.rank {
    font-size: 1.2rem;
    font-weight: 700;
    width: 40px;
}

.nickname {
    flex: 1;
    margin-left: 12px;
    font-weight: 600;
}

.score {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-light);
}
.timer-bar {
    width: 100%;
    max-width: 600px;
    height: 8px;
    background: #333;
    border-radius: 4px;
    margin: 16px 0;
    overflow: hidden;
}

.timer-bar-fill {
    height: 100%;
    background: var(--accent-green);
    border-radius: 4px;
    transition: width 0.1s linear;
}

.timer-bar-fill.warning {
    background: var(--accent-orange);
}

.timer-bar-fill.danger {
    background: var(--secondary);
}
.quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.quiz-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.quiz-card:hover {
    transform: translateY(-2px);
}

.quiz-card h3 {
    margin-bottom: 8px;
}

.quiz-card .meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.quiz-card .actions {
    display: flex;
    gap: 8px;
}
.question-block {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    border-left: 4px solid var(--primary);
}

.answer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.answer-item input[type="text"] {
    flex: 1;
    padding: 10px;
    background: var(--bg-dark);
    border: 2px solid #333;
    border-radius: var(--radius);
    color: var(--text-light);
    font-size: 0.9rem;
}

.answer-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-green);
}
.status-bar {
    background: var(--bg-card);
    padding: 12px 20px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-bar .score {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-green);
}
@media (max-width: 600px) {
    .answer-grid {
        grid-template-columns: 1fr;
    }

    .landing h1 {
        font-size: 2rem;
    }

    .room-code {
        font-size: 2rem;
        letter-spacing: 4px;
    }

    .game-question {
        font-size: 1.2rem;
    }
}