/* Root Variables for Consistency */
:root {
    --primary-blue: #00a8ff;
    --dark-bg: #0a0e17;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-light: #f5f6fa;
    --text-dim: #a0a0a0;
    --accent-glow: rgba(0, 168, 255, 0.3);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Mobile Optimization */
}

body {
    font-family: 'Inter', 'Noto Sans Sinhala', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Background Iceberg Effect */
.iceberg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #0a0e17 0%, #1e3799 100%);
    z-index: -1;
}

.iceberg-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 40vh;
    background: url('assets/iceberg-bg.png') no-repeat bottom center;
    background-size: cover;
    opacity: 0.2;
    filter: blur(2px);
}

/* App Container */
.app-container {
    width: 90%;
    max-width: 500px;
    margin: 20px auto;
}

/* Card Styling */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

.hidden { display: none; }
.active { display: block; animation: fadeIn 0.6s ease-out; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Typography */
.title { font-size: 2.2rem; font-weight: 700; margin-bottom: 10px; letter-spacing: -1px; }
.highlight { color: var(--primary-blue); text-shadow: 0 0 15px var(--accent-glow); }
.subtitle { color: var(--text-dim); margin-bottom: 25px; font-size: 1rem; }

/* Progress Bar */
.progress-container { margin-bottom: 20px; text-align: right; }
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 5px;
    overflow: hidden;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background: var(--primary-blue);
    box-shadow: 0 0 10px var(--primary-blue);
    transition: width 0.3s ease;
}

#question-number { font-size: 0.8rem; color: var(--primary-blue); font-weight: bold; }

/* Questions and Buttons */
.question { font-size: 1.25rem; margin-bottom: 25px; text-align: left; line-height: 1.4; }

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    padding: 16px 20px;
    border-radius: 15px;
    text-align: left;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.option-btn:hover, .option-btn:active {
    background: rgba(0, 168, 255, 0.1);
    border-color: var(--primary-blue);
    transform: scale(1.02);
}

/* Action Buttons */
.primary-btn {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 5px 15px var(--accent-glow);
    transition: var(--transition);
}

.primary-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 20px var(--accent-glow); }

.secondary-btn {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--text-dim);
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    margin: 10px;
}

/* Result Chart placeholder */
.chart-container { margin: 20px 0; min-height: 200px; display: flex; justify-content: center; align-items: center; }

/* Footer */
.main-footer {
    margin-top: 30px;
    font-size: 0.8rem;
    color: var(--text-dim);
}
.brand { color: var(--primary-blue); font-weight: bold; }

/* Mobile adjustments */
@media (max-width: 480px) {
    .card { padding: 20px; }
    .title { font-size: 1.8rem; }
    .question { font-size: 1.1rem; }
}