:root {
    --primary: #2F80ED;
    --primary-dark: #2262B8;
    --bg: #F8F9FA;
    --text: #1A1A1A;
    --text-light: #666;
    --card-bg: #FFFFFF;
    --error: #FF4D4F;
    --success: #27AE60;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: #eef2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 375px; /* Mobile width */
    height: 667px; /* Mobile height */
    background: var(--bg);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    padding: 20px;
    background: var(--card-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.logo {
    font-weight: 800;
    color: var(--primary);
    font-size: 18px;
    letter-spacing: -0.5px;
}

.progress-bar {
    width: 100px;
    height: 6px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%; /* JS will update */
    transition: width 0.4s ease;
}

/* Screens */
.screen {
    flex: 1;
    padding: 24px;
    display: none; /* Hidden by default */
    flex-direction: column;
    animation: fadeIn 0.4s ease;
}

.screen.active {
    display: flex;
}

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

/* Typography */
.headline {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
    color: var(--text);
}

.headline-sm {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text);
}

.subtext {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 32px;
}

.highlight {
    color: var(--primary);
}

/* Layout helpers */
.content-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.content-bottom {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 20px;
}

/* Buttons & Inputs */
.question-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.question-label {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 8px;
}

.option-btn {
    padding: 16px;
    border: 1px solid #ddd;
    background: var(--card-bg);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.option-btn:active, .card-option:active {
    background: #f0f4ff;
    border-color: var(--primary);
    transform: scale(0.98);
}

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(47, 128, 237, 0.3);
}

.primary-btn:active {
    background: var(--primary-dark);
}

.full-width {
    width: 100%;
}

/* Screen 2 Cards */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid #eee;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.card-option .icon {
    font-size: 24px;
}

.card-option .text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
}

/* Modal */
.modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(2px);
}

.modal-content {
    background: white;
    width: 85%;
    padding: 24px;
    border-radius: 20px;
    text-align: center;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.highlight-text {
    color: var(--text);
    font-weight: 600;
    margin: 12px 0 20px 0;
    font-size: 15px;
}

/* Screen 3 */
.subject-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 30px;
}

.subject-card {
    background: var(--card-bg);
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.subject-card.selected {
    border-color: var(--primary);
    background: #f0f4ff;
    color: var(--primary);
}

.subject-icon {
    font-size: 24px;
}

.dropdown {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: white;
    font-size: 16px;
    margin-bottom: 16px;
}

/* Screen 4 Animation */
.loader-circle {
    width: 50px;
    height: 50px;
    border: 4px solid #eee;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px auto;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.animate-pulse {
    text-align: center;
    font-size: 18px;
    color: var(--text);
}

.plan-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-top: 20px;
    width: 100%;
}

.plan-header {
    margin-bottom: 16px;
    text-align: center;
}

.badge {
    background: #E1F0FF;
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.plan-list {
    list-style: none;
}

.plan-item {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    opacity: 0;
    animation: slideIn 0.5s ease forwards;
    animation-delay: var(--d);
}

.plan-item strong {
    font-size: 15px;
}

.plan-item .sub {
    font-size: 12px;
    color: var(--text-light);
    margin-left: 24px;
}

.stat-box {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    margin-top: 16px;
    opacity: 0;
    animation: slideIn 0.5s ease forwards;
    animation-delay: var(--d);
}

.stat-number {
    font-size: 20px;
    font-weight: 800;
    color: var(--success);
}

.stat-label {
    font-size: 12px;
    color: var(--text-light);
}

@keyframes slideIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }

/* Screen 5 Login */
.login-card {
    background: white;
    padding: 24px;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}

.login-card h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.blue-text { color: var(--primary); }

.social-proof {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.input-group {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.prefix {
    font-weight: 600;
    color: var(--text);
    margin-right: 12px;
    border-right: 1px solid #eee;
    padding-right: 12px;
}

.input-group input {
    border: none;
    font-size: 16px;
    outline: none;
    width: 100%;
}

.disclaimer {
    font-size: 11px;
    color: #999;
    text-align: center;
    margin-top: 16px;
}

.hidden { display: none; }
