/* Visually hidden (for accessibility) */
.visually-hidden {
    position: absolute !important;
    height: 1px; width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
    border: 0;
    padding: 0;
    margin: -1px;
}
.creator-profile {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
    justify-content: flex-start;
}
.profile-pic {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2.5px solid #a78bfa;
    background: #fff;
    object-fit: cover;
    box-shadow: 0 2px 8px 0 rgba(109,40,217,0.10);
}
.creator-text {
    font-size: 1.08rem;
    color: #c7d2fe;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.hidden {
  display: none !important;
  opacity: 0;
  visibility: hidden;
}


body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #312e81 0%, #7c3aed 100%);
    min-height: 100vh;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

#app {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 16px;
    box-sizing: border-box;
    background: rgba(30, 27, 75, 0.95);
    border-radius: 24px;
    box-shadow: 0 8px 40px 0 rgba(49, 46, 129, 0.18), 0 1.5px 8px 0 rgba(0,0,0,0.10);
    border: 1.5px solid rgba(99,102,241,0.18);
}

#app {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 16px;
}

.header {
    text-align: center;
    margin-bottom: 48px;
}
.header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 12px;
}
.header p {
    font-size: 1.2rem;
    color: #c7d2fe;
}

.category-box, .quiz-box, .results-box {
    background: rgba(255,255,255,0.10);
    border-radius: 18px;
    padding: 32px 24px;
    box-shadow: 0 2px 16px 0 rgba(0,0,0,0.10);
    margin-bottom: 32px;
}

.category-box h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
}
.category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (min-width: 600px) {
    .category-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }
}
.category-btn {
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 18px 0;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.category-btn:hover {
    background: #4338ca;
    transform: scale(1.04);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
#quiz-title {
    font-size: 1.3rem;
    font-weight: 600;
}
#progress {
    color: #c7d2fe;
    font-size: 1rem;
}
#question-container {
    margin-bottom: 24px;
}
#question-text {
    font-size: 1.1rem;
    margin-bottom: 18px;
}
#options-container {
    display: grid;
    gap: 12px;
}
.option-btn {
    width: 100%;
    text-align: left;
    padding: 14px 18px;
    border: 2px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, border 0.2s;
}
.option-btn:hover:not(:disabled) {
    background: rgba(99,102,241,0.18);
    border-color: #6366f1;
}
.option-btn.correct {
    background: rgba(16,185,129,0.18);
    border-color: #10b981;
}
.option-btn.incorrect {
    background: rgba(239,68,68,0.18);
    border-color: #ef4444;
}
#feedback {
    margin-bottom: 18px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}
#feedback.correct {
    background: rgba(16,185,129,0.18);
    color: #10b981;
}
#feedback.incorrect {
    background: rgba(239,68,68,0.18);
    color: #ef4444;
}
.quiz-controls {
    display: flex;
    justify-content: flex-end;
}
#next-btn, #restart-btn {
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
#next-btn:hover, #restart-btn:hover {
    background: #4338ca;
}
.results-box h2 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 18px;
}
#score {
    font-size: 2.2rem;
    font-weight: bold;
    color: #10b981;
    margin-bottom: 18px;
}
#result-message {
    font-size: 1.1rem;
    margin-bottom: 24px;
}
@media (max-width: 800px) {
    #app {
        padding: 16px 2px;
        max-width: 98vw;
    }
    .category-btn {
        padding: 12px 0;
        font-size: 1rem;
    }
    #question-text {
        font-size: 1rem;
    }
    .quiz-box, .category-box, .results-box {
        padding: 16px 6px;
    }
}

.auth-box {
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}
.auth-box input {
    display: block;
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border-radius: 8px;
    border: none;
}
.auth-box button {
    background: #6366f1;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
}
.auth-box button:hover {
    background: #4338ca;
}
#logout-btn {
    float: right;
    background: #ef4444;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    color: white;
    cursor: pointer;
}
#logout-btn:hover {
    background: #dc2626;
}
