:root {
    --bg-dark: #0f111a;
    --card-bg: rgba(25, 28, 41, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #a0a5b5;
    
    --accent-primary: #7b2cbf;
    --accent-secondary: #3a0ca3;
    --accent-glow: rgba(123, 44, 191, 0.5);
    
    --success: #00f5d4;
    --warning: #fee440;
    --danger: #f15bb5;

    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #151828 0%, #0a0b10 100%);
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 15s infinite ease-in-out alternate;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    top: -10%;
    left: -10%;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--success);
    bottom: -10%;
    right: -5%;
    animation-delay: -5s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: var(--danger);
    top: 40%;
    left: 60%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 30px) scale(1.1); }
}

/* Layout */
.app-container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    text-shadow: 0 0 20px rgba(255,255,255,0.1);
}

/* Glassmorphism Card */
.quiz-container {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Screen States */
.screen {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s forwards;
}

.screen.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
}

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

/* Start Screen */
#start-screen {
    text-align: center;
    align-items: center;
}

.title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

/* Buttons */
.primary-btn, .secondary-btn {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 8px 20px var(--accent-glow);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px var(--accent-glow);
    filter: brightness(1.1);
}

.primary-btn:active {
    transform: translateY(1px);
}

.secondary-btn {
    background: rgba(255,255,255,0.05);
    color: white;
    border: 1px solid var(--card-border);
}

.secondary-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* Question Screen */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--success));
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 10px;
}

.question-header {
    margin-bottom: 1rem;
}

.badge {
    background: rgba(123, 44, 191, 0.2);
    color: #d8b4fe;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid rgba(123, 44, 191, 0.4);
}

.question-text {
    font-size: 1.4rem;
    font-family: var(--font-heading);
    margin-bottom: 2rem;
    line-height: 1.4;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-main);
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.option-btn:active {
    transform: translateX(2px);
}

/* Result Screen */
#result-screen {
    text-align: center;
}

.result-header {
    margin-bottom: 2rem;
}

.score-circle {
    width: 150px;
    height: 150px;
    margin: 1.5rem auto;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--accent-primary), var(--success), var(--accent-primary));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 0 0 30px rgba(123, 44, 191, 0.4);
}

.score-circle::before {
    content: '';
    position: absolute;
    inset: 5px;
    background: var(--bg-dark);
    border-radius: 50%;
    z-index: 1;
}

#final-score {
    position: relative;
    z-index: 2;
    font-size: 3.5rem;
    font-weight: 900;
    font-family: var(--font-heading);
    line-height: 1;
    background: linear-gradient(135deg, #fff, #a0a5b5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.score-max {
    position: relative;
    z-index: 2;
    font-size: 1rem;
    color: var(--text-secondary);
}

.result-content {
    margin-bottom: 2.5rem;
}

.result-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--success);
}

.result-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.advice-box {
    background: rgba(255,255,255,0.05);
    border-left: 4px solid var(--accent-primary);
    padding: 1.5rem;
    border-radius: 0 12px 12px 0;
    text-align: left;
}

.advice-box h4 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.advice-box p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Accordion Footer */
.accordion-footer {
    margin-top: 3rem;
    border-top: 1px solid var(--card-border);
    padding-top: 1.5rem;
}

.accordion-item {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 1rem 0;
    text-align: left;
    font-family: var(--font-main);
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.accordion-header:hover {
    color: var(--text-primary);
}

.accordion-icon {
    font-size: 1.2rem;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.accordion-header[aria-expanded="true"] .accordion-icon {
    transform: rotate(45deg);
}

.accordion-header[aria-expanded="true"] {
    color: var(--text-primary);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content p {
    padding-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .app-container {
        padding: 1rem;
    }
    
    .quiz-container {
        padding: 1.5rem;
    }

    .logo {
        font-size: 2rem;
    }

    .title {
        font-size: 1.6rem;
    }

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

    .option-btn {
        padding: 1rem;
    }

    #final-score {
        font-size: 2.5rem;
    }
}
