:root {
    /* Dark Theme Variables (Default) */
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --accent-color: #8b5cf6;
    --border-color: rgba(255, 255, 255, 0.1);
    --success-color: #10b981;
    --error-color: #ef4444;
    --radio-bg: rgba(255, 255, 255, 0.03);
    --radio-hover: rgba(255, 255, 255, 0.08);
}

.light-mode {
    /* Light Theme Variables */
    --bg-color: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --accent-color: #7c3aed;
    --border-color: rgba(0, 0, 0, 0.1);
    --success-color: #059669;
    --error-color: #dc2626;
    --radio-bg: rgba(0, 0, 0, 0.02);
    --radio-hover: rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* Dynamic animated background */
.background-animation {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.15) 0%, rgba(15, 23, 42, 0) 50%),
                radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.15) 0%, rgba(15, 23, 42, 0) 40%);
    animation: pulse 15s ease-in-out infinite alternate;
    z-index: -1;
}

@keyframes pulse {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.1) rotate(5deg); }
}

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

header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Card Style for Questions */
.question-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.5s ease-out backwards;
}

.question-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.question-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

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

.option-label {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--radio-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-label:hover {
    background: var(--radio-hover);
    border-color: var(--primary-color);
}

.option-label input[type="radio"] {
    display: none;
}

.custom-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-secondary);
    border-radius: 50%;
    margin-right: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.custom-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Checked State */
.option-label input[type="radio"]:checked + .custom-radio {
    border-color: var(--primary-color);
}

.option-label input[type="radio"]:checked + .custom-radio::after {
    transform: scale(1);
}

.option-label:has(input[type="radio"]:checked) {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary-color);
}

.option-text {
    font-size: 1rem;
}

/* Buttons */
.submit-container {
    text-align: center;
    margin-top: 3rem;
}

.btn-primary, .btn-secondary {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

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

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.result-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.result-actions button {
    margin: 0;
    min-width: 200px;
}

/* Result Section */
.hidden {
    display: none !important;
}

.result-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 20px 50px rgba(59, 130, 246, 0.2);
    animation: zoomIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.result-card h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.score-display {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.suggestion-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: left;
}

.suggestion-box h3 {
    color: var(--accent-color);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.recommendation-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.package-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    text-align: left;
    margin-top: 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.package-name {
    color: var(--accent-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.program-name {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.package-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-item {
    font-size: 1rem;
    color: var(--text-primary);
}

.detail-item strong {
    color: var(--text-secondary);
}

.price-highlight {
    font-size: 1.2rem;
    color: var(--success-color);
}
.price-highlight strong {
    color: var(--success-color);
}

.materi-section, .bonus-section {
    margin-bottom: 1.5rem;
}

.materi-section strong, .bonus-section strong {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.bonus-section strong {
    color: #fbbf24;
}

.materi-section ul, .bonus-section ul {
    list-style-type: none;
    padding-left: 0;
}

.materi-section ul li, .bonus-section ul li {
    padding: 0.4rem 0;
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.95rem;
}

.materi-section ul li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Theme Toggle Button */
.theme-toggle {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 100;
}

#theme-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.5rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

#theme-btn:hover {
    transform: scale(1.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }
    header h1 {
        font-size: 2rem;
    }
    .question-card {
        padding: 1.5rem;
    }
    .result-actions {
        display: flex;
        flex-direction: column;
    }
    .result-actions button {
        margin-left: 0 !important;
    }
}

/* Print (PDF) Styles */
@media print {
    body {
        background: white !important;
        color: black !important;
        overflow: visible;
    }
    .light-mode {
        --bg-color: white;
        --card-bg: white;
        --text-primary: black;
        --text-secondary: #333;
        --border-color: #ddd;
    }
    .background-animation, .theme-toggle, .result-actions {
        display: none !important;
    }
    .container {
        margin: 0;
        padding: 0;
        max-width: 100%;
    }
    .result-card, .package-card {
        border: 1px solid #ccc;
        box-shadow: none !important;
        break-inside: avoid;
    }
    .recommendation-badge {
        color: black !important;
        background: #f0f0f0 !important;
        border: 1px solid #000;
        box-shadow: none !important;
    }
    .score-display {
        background: none;
        color: black !important;
        -webkit-text-fill-color: black;
    }
}
