:root {
    --primary: #5c67f2; 
    --accent: #ff6b6b; 
    --bg: #f0f2f5; 
    --success: #2ecc71; 
    --review: #f39c12; 
    --white: #ffffff;
}

* { 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
}

body { 
    font-family: 'Poppins', sans-serif; 
    margin: 0; 
    background: var(--bg); 
    display: flex; 
    justify-content: center; 
    min-height: 100vh; 
}

.container { 
    width: 100%; 
    max-width: 1000px; 
    background: var(--white); 
    min-height: 100vh; 
    padding: 15px; 
    position: relative; 
    box-shadow: 0 0 20px rgba(0,0,0,0.05); 
}

#homeScreen { 
    text-align: center; 
    padding-top: 50px; 
}

h2 { 
    color: var(--primary); 
    font-weight: 700; 
    margin-bottom: 30px; 
}

.input-box { 
    width: 90%; 
    max-width: 400px; 
    padding: 14px; 
    margin-bottom: 15px; 
    border: 2px solid #edf2f7; 
    border-radius: 12px; 
    font-size: 16px; 
    outline: none; 
    text-align: center; 
}

.btn-start { 
    width: 90%; 
    max-width: 400px; 
    padding: 16px; 
    background: var(--primary); 
    color: white; 
    border: none; 
    border-radius: 12px; 
    font-size: 18px; 
    font-weight: 600; 
    cursor: pointer; 
}

#quizScreen { 
    display: none; 
}

.top-bar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 10px; 
    background: #fff; 
    border-bottom: 1px solid #eee; 
    position: sticky; 
    top: 0; 
    z-index: 100; 
}

.header-right { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

#timer { 
    color: var(--accent); 
    font-weight: 600; 
    background: #fff5f5; 
    padding: 5px 12px; 
    border-radius: 20px; 
    border: 1px solid var(--accent); 
    font-size: 14px; 
    white-space: nowrap; 
}

.menu-btn { 
    background: var(--primary); 
    color: white; 
    border: none; 
    width: 40px; 
    height: 40px; 
    border-radius: 8px; 
    cursor: pointer; 
    font-size: 18px; 
}

.q-card { 
    margin-top: 20px; 
    padding: 10px; 
}

.q-text { 
    font-size: 19px; 
    font-weight: 600; 
    margin-bottom: 20px; 
    line-height: 1.5; 
    color: #2d3436; 
}

.options-grid { 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
}

.opt-label { 
    display: flex; 
    align-items: center; 
    padding: 15px; 
    border: 2px solid #f1f3f5; 
    border-radius: 12px; 
    cursor: pointer; 
    transition: 0.3s; 
    background: #fff; 
}

.opt-label.selected { 
    border-color: var(--primary); 
    background: #f0f3ff; 
    font-weight: 600; 
}

.opt-label input { 
    display: none; 
}

.nav-footer { 
    display: flex; 
    gap: 5px; 
    margin-top: 40px; 
    padding-bottom: 20px; 
}

.n-btn { 
    flex: 1; 
    padding: 15px 5px; 
    border-radius: 10px; 
    border: none; 
    font-weight: 600; 
    cursor: pointer; 
    font-size: 11px; 
    text-transform: uppercase; 
}

.btn-prev { background: #e9ecef; color: #495057; }
.btn-rev { background: var(--review); color: white; }
.btn-sub { background: var(--accent); color: white; }
.btn-next { background: var(--primary); color: white; }

#palette { 
    position: fixed; 
    right: -320px; 
    top: 0; 
    width: 300px; 
    height: 100%; 
    background: white; 
    box-shadow: -5px 0 15px rgba(0,0,0,0.1); 
    transition: 0.4s; 
    z-index: 1001; 
    padding: 20px; 
}

#palette.open { 
    right: 0; 
}

.p-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 10px; 
    margin-top: 20px; 
}

.p-node { 
    width: 50px; 
    height: 50px; 
    border-radius: 8px; 
    border: 1px solid #ddd; 
    background: #f8f9fa; 
    cursor: pointer; 
    font-weight: 600; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.p-node.ans { background: var(--success); color: white; border: none; }
.p-node.rev { background: var(--review); color: white; border: none; }
.p-node.curr { border: 3px solid var(--primary); }

@media (max-width: 768px) {
    .nav-footer { 
        position: fixed; 
        bottom: 0; 
        left: 0; 
        width: 100%; 
        background: white; 
        padding: 10px; 
        box-shadow: 0 -5px 15px rgba(0,0,0,0.1); 
        z-index: 999; 
    }
    #quizScreen { padding-bottom: 80px; }
}