* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif; background: #f0f2f5; color: #1e293b; line-height: 1.6; min-height: 100vh; -webkit-font-smoothing: antialiased; }

/* ======================== LANDING ======================== */
.landing-page { background: linear-gradient(160deg, #0c1222 0%, #162033 40%, #0f172a 100%); min-height: 100vh; }
.hero { display: flex; justify-content: center; align-items: flex-start; padding: 48px 24px; }
.hero-content { max-width: 880px; width: 100%; }
.logo-badge { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; font-size: 15px; font-weight: 800; padding: 8px 20px; border-radius: 8px; letter-spacing: 4px; margin-bottom: 28px; box-shadow: 0 4px 16px rgba(59,130,246,0.3); }
.hero h1 { font-size: 44px; font-weight: 800; color: #fff; margin-bottom: 14px; line-height: 1.15; letter-spacing: -0.5px; }
.subtitle { font-size: 17px; color: #94a3b8; margin-bottom: 40px; line-height: 1.6; }

.test-info-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 36px; }
.info-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 28px 14px; text-align: center; color: #fff; transition: all 0.25s ease; }
.info-card:hover { transform: translateY(-6px); background: rgba(255,255,255,0.07); border-color: rgba(59,130,246,0.3); box-shadow: 0 12px 32px rgba(0,0,0,0.2); }
.info-icon { font-size: 34px; margin-bottom: 14px; display: block; }
.info-card h3 { font-size: 11px; color: #60a5fa; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 6px; font-weight: 700; }
.info-card p { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.info-card span { font-size: 12px; color: #94a3b8; font-weight: 500; }

.rules-box { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 28px 32px; margin-bottom: 40px; color: #e2e8f0; }
.rules-box h3 { font-size: 17px; margin-bottom: 14px; color: #fff; font-weight: 700; }
.rules-box ul { list-style: none; }
.rules-box li { padding: 5px 0 5px 24px; position: relative; font-size: 14px; color: #cbd5e1; }
.rules-box li::before { content: '\2713'; position: absolute; left: 0; color: #22c55e; font-weight: 700; font-size: 13px; }

.register-form { background: #fff; border-radius: 20px; padding: 40px; box-shadow: 0 24px 64px rgba(0,0,0,0.25); }
.register-form h2 { font-size: 26px; margin-bottom: 28px; color: #0f172a; font-weight: 700; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group { display: flex; flex-direction: column; }
.form-group label { font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 6px; letter-spacing: 0.2px; }
.form-group input, .form-group select, .form-group textarea { padding: 12px 16px; border: 2px solid #e2e8f0; border-radius: 10px; font-size: 15px; font-family: inherit; transition: all 0.2s ease; background: #fff; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.form-group select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23475569' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; cursor: pointer; }
.form-group textarea { resize: vertical; min-height: 80px; }
.divider { text-align: center; margin: 32px 0 24px; position: relative; }
.divider::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #e2e8f0; }
.divider span { background: #fff; padding: 0 18px; position: relative; color: #94a3b8; font-size: 13px; font-weight: 500; }
.login-form { margin-top: 0; }

/* ======================== BUTTONS ======================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 24px; border: none; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all 0.2s ease; text-align: center; font-family: inherit; }
.btn-primary { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; box-shadow: 0 2px 8px rgba(59,130,246,0.25); }
.btn-primary:hover { background: linear-gradient(135deg, #2563eb, #1d4ed8); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(59,130,246,0.35); }
.btn-secondary { background: #64748b; color: #fff; }
.btn-secondary:hover { background: #475569; }
.btn-outline { background: transparent; color: #3b82f6; border: 2px solid #e2e8f0; }
.btn-outline:hover { background: #eff6ff; border-color: #3b82f6; }
.btn-lg { padding: 14px 32px; font-size: 16px; width: 100%; margin-top: 20px; }
.btn-sm { padding: 5px 14px; font-size: 12px; border-radius: 8px; }
.btn-danger { background: #fee2e2; color: #991b1b; }
.btn-danger:hover { background: #fecaca; }

/* ======================== TEST PAGE ======================== */
.test-page { background: #f0f2f5; min-height: 100vh; }
.test-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 24px; background: #fff; box-shadow: 0 1px 8px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 100; }
.header-left { display: flex; align-items: center; gap: 12px; }
.logo-sm { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; font-size: 12px; font-weight: 800; padding: 6px 14px; border-radius: 8px; letter-spacing: 2px; box-shadow: 0 2px 8px rgba(59,130,246,0.2); }
.candidate-name { font-weight: 600; color: #1e293b; font-size: 14px; }
.header-center { flex: 1; display: flex; justify-content: center; overflow-x: auto; }
.progress-tracker { display: flex; align-items: center; gap: 0; min-width: max-content; }
.step { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.step-circle { width: 30px; height: 30px; border-radius: 50%; background: #e2e8f0; color: #94a3b8; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; transition: all 0.3s; }
.step.active .step-circle { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; transform: scale(1.1); box-shadow: 0 2px 12px rgba(59,130,246,0.3); }
.step.done .step-circle { background: #22c55e; color: #fff; }
.step-label { font-size: 10px; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.step.active .step-label { color: #3b82f6; }
.step.done .step-label { color: #22c55e; }
.step-line { width: 32px; height: 2px; background: #e2e8f0; margin-bottom: 18px; flex-shrink: 0; }
.header-right { display: flex; align-items: center; gap: 16px; }
.timer { font-family: 'Courier New', monospace; font-size: 16px; font-weight: 700; color: #1e293b; background: #f1f5f9; padding: 6px 14px; border-radius: 8px; min-width: 70px; text-align: center; }
.btn-logout { font-size: 13px; color: #ef4444; text-decoration: none; font-weight: 600; padding: 4px 8px; border-radius: 6px; transition: background 0.2s; }
.btn-logout:hover { background: #fef2f2; }

.test-main { max-width: 780px; margin: 0 auto; padding: 36px 24px; }

/* Section Intro */
.section-intro { text-align: center; background: #fff; border-radius: 20px; padding: 52px 40px; box-shadow: 0 4px 24px rgba(0,0,0,0.05); }
.section-number { font-size: 13px; color: #3b82f6; font-weight: 700; text-transform: uppercase; letter-spacing: 3px; margin-bottom: 12px; }
.section-intro h2 { font-size: 30px; margin-bottom: 14px; font-weight: 700; color: #0f172a; }
.section-intro p { color: #64748b; font-size: 16px; margin-bottom: 18px; }
.section-meta { display: flex; gap: 16px; justify-content: center; margin-bottom: 28px; }
.section-meta span { background: #f1f5f9; padding: 8px 18px; border-radius: 24px; font-size: 13px; font-weight: 600; color: #475569; }

/* Speaking UI */
.speaking-ui { background: #fff; border-radius: 20px; padding: 40px; box-shadow: 0 4px 24px rgba(0,0,0,0.05); }
.question-counter { font-size: 13px; color: #64748b; font-weight: 600; margin-bottom: 20px; text-align: center; text-transform: uppercase; letter-spacing: 1px; }
.sentence-box { background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 14px; padding: 28px; text-align: center; margin-bottom: 28px; }
.sentence-box .instruction { font-size: 12px; color: #64748b; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; }
.sentence-text { font-size: 22px; font-weight: 600; color: #1e293b; min-height: 56px; display: flex; align-items: center; justify-content: center; line-height: 1.5; }
.conversation-text { font-size: 15px; color: #334155; line-height: 1.8; text-align: left; }
.passage-text { font-size: 15px; color: #334155; line-height: 1.8; text-align: left; }
.opinion-text { font-size: 19px; font-weight: 600; color: #1e293b; line-height: 1.5; }
.mic-area { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 28px 0; }
.mic-ring { width: 84px; height: 84px; border-radius: 50%; background: #f1f5f9; border: 3px solid #e2e8f0; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s; }
.mic-ring:hover { border-color: #3b82f6; background: #eff6ff; transform: scale(1.05); }
.mic-ring.recording { background: #fef2f2; border-color: #ef4444; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); } 50% { box-shadow: 0 0 0 18px rgba(239,68,68,0); } }
.mic-icon { font-size: 34px; }
#micLabel { font-size: 13px; color: #64748b; font-weight: 500; text-align: center; }
.response-box { background: #f8fafc; border-radius: 14px; padding: 20px 24px; margin-bottom: 20px; }
.response-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: #64748b; margin-bottom: 8px; font-weight: 600; }
.response-text { font-size: 16px; color: #1e293b; min-height: 36px; font-style: italic; line-height: 1.5; }
.score-display { margin-top: 14px; display: flex; align-items: center; gap: 12px; }
.score-badge { padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; letter-spacing: 0.2px; }
.score-badge.full { background: #dcfce7; color: #166534; }
.score-badge.partial { background: #fef9c3; color: #854d0e; }
.score-badge.zero { background: #fee2e2; color: #991b1b; }
.similarity { font-size: 12px; color: #64748b; }
.timer-display { text-align: center; font-size: 40px; font-weight: 800; color: #3b82f6; margin: 16px 0; font-family: 'Courier New', monospace; }

/* MCQ UI */
.mcq-ui, .writing-ui { background: #fff; border-radius: 20px; padding: 40px; box-shadow: 0 4px 24px rgba(0,0,0,0.05); }
.question-header { margin-bottom: 24px; }
.question-text { font-size: 17px; font-weight: 500; color: #1e293b; line-height: 1.7; white-space: pre-line; }
.options-grid { display: grid; gap: 12px; margin-bottom: 28px; }
.option-btn { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border: 2px solid #e2e8f0; border-radius: 12px; background: #fff; cursor: pointer; transition: all 0.2s; text-align: left; font-size: 15px; font-family: inherit; }
.option-btn:hover { border-color: #3b82f6; background: #eff6ff; }
.option-btn.selected { border-color: #3b82f6; background: #eff6ff; }
.option-btn.correct { border-color: #22c55e; background: #f0fdf4; }
.option-btn.wrong { border-color: #ef4444; background: #fef2f2; }
.opt-label { width: 32px; height: 32px; border-radius: 50%; background: #f1f5f9; color: #475569; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.option-btn.selected .opt-label { background: #3b82f6; color: #fff; }
.opt-text { flex: 1; }

/* Writing UI */
.writing-input { width: 100%; padding: 16px; border: 2px solid #e2e8f0; border-radius: 12px; font-size: 15px; font-family: inherit; resize: vertical; min-height: 160px; line-height: 1.7; transition: all 0.2s; }
.writing-input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.writing-meta { display: flex; gap: 20px; margin: 12px 0; font-size: 13px; color: #64748b; }

/* Section Complete */
.section-complete { text-align: center; background: #fff; border-radius: 20px; padding: 52px 40px; box-shadow: 0 4px 24px rgba(0,0,0,0.05); }
.complete-icon { font-size: 56px; margin-bottom: 18px; display: block; }
.section-complete h2 { font-size: 26px; margin-bottom: 12px; font-weight: 700; }
.section-complete p { font-size: 16px; color: #64748b; margin-bottom: 20px; }

/* ======================== RESULTS ======================== */
.results-page { background: linear-gradient(160deg, #0c1222 0%, #162033 50%, #0f172a 100%); min-height: 100vh; padding: 48px 24px; }
.results-container { max-width: 920px; margin: 0 auto; }
.results-header { text-align: center; color: #fff; margin-bottom: 40px; }
.results-header h1 { font-size: 30px; margin: 14px 0 10px; font-weight: 700; }
.candidate-info { color: #94a3b8; font-size: 15px; }
.result-date { color: #64748b; font-size: 13px; margin-top: 4px; }
.back-link { color: #60a5fa; text-decoration: none; font-size: 14px; font-weight: 600; transition: color 0.2s; }
.back-link:hover { color: #93c5fd; text-decoration: underline; }

.total-score-card { display: flex; align-items: center; gap: 40px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; padding: 40px; margin-bottom: 32px; justify-content: center; backdrop-filter: blur(8px); }
.score-ring { position: relative; width: 150px; height: 150px; flex-shrink: 0; }
.score-ring svg { width: 100%; height: 100%; }
.score-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.score-number { font-size: 44px; font-weight: 800; color: #fff; line-height: 1; }
.score-total { font-size: 16px; color: #94a3b8; margin-top: 4px; }
.score-details { text-align: left; }
.percentage { font-size: 52px; font-weight: 800; color: #fff; line-height: 1; }
.grade { font-size: 16px; font-weight: 600; padding: 5px 18px; border-radius: 24px; display: inline-block; margin-top: 10px; letter-spacing: 0.3px; }
.grade.excellent { background: rgba(22,101,52,0.4); color: #86efac; }
.grade.good { background: rgba(133,77,14,0.4); color: #fde047; }
.grade.average { background: rgba(154,52,18,0.4); color: #fed7aa; }
.grade.needs-improvement { background: rgba(153,27,27,0.4); color: #fca5a5; }

.section-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 36px; }
.section-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 24px 16px; text-align: center; color: #fff; transition: all 0.2s; }
.section-card:hover { background: rgba(255,255,255,0.08); transform: translateY(-2px); }
.section-icon { font-size: 28px; margin-bottom: 10px; }
.section-card h3 { font-size: 12px; color: #94a3b8; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.section-score-large { font-size: 28px; font-weight: 800; margin-bottom: 2px; }
.section-pct { font-size: 14px; color: #60a5fa; font-weight: 600; margin-bottom: 6px; }
.section-time { font-size: 11px; color: #64748b; margin-bottom: 14px; }
.score-bar-track { height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; margin-bottom: 14px; }
.score-bar-fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #60a5fa); border-radius: 2px; transition: width 0.8s ease; }

.results-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.results-actions .btn { min-width: 170px; }
.results-actions .btn-outline { border-color: rgba(255,255,255,0.2); color: #94a3b8; }
.results-actions .btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.3); }

/* Answer detail cards */
.answers-list { display: grid; gap: 14px; margin-top: 28px; }
.answer-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; padding: 22px 24px; color: #e2e8f0; backdrop-filter: blur(4px); }
.answer-card.correct { border-left: 4px solid #22c55e; }
.answer-card.incorrect { border-left: 4px solid #ef4444; }
.answer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.q-num { font-weight: 700; font-size: 14px; color: #60a5fa; }
.answer-score { font-weight: 700; font-size: 13px; padding: 3px 12px; border-radius: 14px; }
.answer-score.correct { background: rgba(34,197,94,0.2); color: #86efac; }
.answer-score.incorrect { background: rgba(239,68,68,0.2); color: #fca5a5; }
.answer-row { margin-bottom: 10px; }
.answer-row strong { font-size: 11px; text-transform: uppercase; color: #94a3b8; letter-spacing: 0.8px; font-weight: 600; }
.answer-row p { margin-top: 4px; font-size: 14px; line-height: 1.6; }
.text-green { color: #86efac; }
.text-red { color: #fca5a5; }
.similarity-bar { margin-top: 10px; }
.similarity-bar span { font-size: 12px; color: #94a3b8; }
.bar-track { height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; margin-top: 6px; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #60a5fa); border-radius: 2px; }
.answer-meta { font-size: 12px; color: #64748b; margin-top: 10px; }

/* ======================== ADMIN ======================== */
.admin-page { min-height: 100vh; background: #f0f2f5; }
.admin-header { background: #0f172a; color: #fff; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; height: 56px; position: sticky; top: 0; z-index: 100; }
.admin-header h1 { font-size: 17px; font-weight: 700; letter-spacing: 0.5px; }
.admin-nav { display: flex; gap: 4px; overflow-x: auto; }
.admin-nav a { color: #94a3b8; text-decoration: none; padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; white-space: nowrap; transition: all 0.2s; }
.admin-nav a:hover { background: rgba(255,255,255,0.08); color: #e2e8f0; }
.admin-nav a.active { background: rgba(59,130,246,0.2); color: #60a5fa; font-weight: 600; }
.admin-content { max-width: 1280px; margin: 28px auto; padding: 0 28px; }
.admin-card { background: #fff; border-radius: 14px; padding: 28px; box-shadow: 0 1px 6px rgba(0,0,0,0.04); margin-bottom: 20px; border: 1px solid #f1f5f9; }
.admin-card h2 { font-size: 18px; margin-bottom: 18px; font-weight: 700; color: #0f172a; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card { background: #fff; border-radius: 14px; padding: 24px; box-shadow: 0 1px 6px rgba(0,0,0,0.04); text-align: center; border: 1px solid #f1f5f9; transition: all 0.2s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.stat-card .stat-num { font-size: 32px; font-weight: 800; color: #3b82f6; line-height: 1.1; }
.stat-card .stat-label { font-size: 12px; color: #64748b; margin-top: 6px; font-weight: 500; letter-spacing: 0.3px; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { background: #f8fafc; padding: 12px 14px; text-align: left; font-weight: 600; color: #475569; border-bottom: 2px solid #e2e8f0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; color: #1e293b; }
.data-table tr:hover td { background: #f8fafc; }
.data-table tr:last-child td { border-bottom: none; }
.badge { padding: 3px 10px; border-radius: 14px; font-size: 11px; font-weight: 600; letter-spacing: 0.2px; display: inline-block; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }

/* Admin login */
.admin-login-wrap { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(160deg, #0c1222 0%, #162033 40%, #0f172a 100%); }
.admin-login-box { background: #fff; border-radius: 20px; padding: 44px; width: 100%; max-width: 420px; box-shadow: 0 24px 64px rgba(0,0,0,0.3); }
.admin-login-box h1 { font-size: 24px; margin-bottom: 28px; text-align: center; font-weight: 700; color: #0f172a; }

/* ======================== PART C: CONVERSATIONS ======================== */
.conversation-box { background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 14px; padding: 28px; margin-bottom: 24px; }
.conversation-text { font-size: 15px; color: #1e293b; line-height: 1.8; white-space: pre-line; }
.conversation-question { background: #eff6ff; border-left: 4px solid #3b82f6; padding: 18px 22px; border-radius: 0 10px 10px 0; margin-bottom: 24px; font-size: 16px; }

/* ======================== PART D: SENTENCE COMPLETION ======================== */
.completion-sentence { background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 14px; padding: 32px; text-align: center; margin-bottom: 28px; }
.completion-text { font-size: 20px; color: #1e293b; line-height: 1.6; }
.blank { color: #ef4444; font-weight: 700; text-decoration: underline; }
.completion-input-area { text-align: center; margin-bottom: 18px; }
.completion-timer { text-align: center; font-size: 28px; font-weight: 700; color: #475569; margin-bottom: 18px; font-family: 'Courier New', monospace; }

/* ======================== PART F: PASSAGE ======================== */
.passage-display { background: #fff; border: 2px solid #e2e8f0; border-radius: 14px; padding: 32px; margin-bottom: 24px; }
.passage-write { margin-bottom: 24px; }
.passage-write .instruction { font-size: 15px; color: #475569; margin-bottom: 14px; }

/* ======================== JUMBLE ======================== */
.jumble-ui { background: #fff; border-radius: 20px; padding: 40px; box-shadow: 0 4px 24px rgba(0,0,0,0.05); }
.jumble-words { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; justify-content: center; }
.jumble-chip { padding: 10px 18px; background: #eff6ff; border: 2px solid #bfdbfe; border-radius: 10px; font-size: 15px; font-weight: 600; color: #1e40af; cursor: pointer; transition: all 0.15s; user-select: none; }
.jumble-chip:hover { background: #3b82f6; color: #fff; border-color: #3b82f6; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(59,130,246,0.25); }
.jumble-chip.used { background: #3b82f6; color: #fff; border-color: #3b82f6; transform: scale(0.95); }
.jumble-arrow { text-align: center; font-size: 28px; color: #94a3b8; margin: 14px 0; }
.jumble-answer-area { margin-bottom: 18px; }
.jumble-input { width: 100%; padding: 16px; border: 2px solid #e2e8f0; border-radius: 12px; font-size: 16px; font-family: inherit; transition: all 0.2s; }
.jumble-input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.jumble-hint { font-size: 12px; color: #94a3b8; margin-bottom: 18px; text-align: center; }

/* ======================== ONE WORD ======================== */
.oneword-ui { background: #fff; border-radius: 20px; padding: 40px; box-shadow: 0 4px 24px rgba(0,0,0,0.05); text-align: center; }
.oneword-question { font-size: 22px; font-weight: 600; color: #1e293b; margin-bottom: 36px; line-height: 1.5; padding: 24px; background: #f8fafc; border-radius: 14px; border: 2px solid #e2e8f0; }
.oneword-input-area { margin-bottom: 28px; }
.oneword-input { width: 100%; max-width: 400px; padding: 16px 24px; border: 3px solid #e2e8f0; border-radius: 14px; font-size: 24px; font-weight: 600; text-align: center; text-transform: lowercase; transition: all 0.2s; }
.oneword-input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }

/* ======================== ORG PORTAL ======================== */
.org-page { min-height: 100vh; background: #f0f2f5; }
.org-header { background: linear-gradient(135deg, #1e40af, #2563eb); color: #fff; padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; height: 56px; position: sticky; top: 0; z-index: 100; }
.org-header h1 { font-size: 17px; font-weight: 700; }
.org-nav { display: flex; gap: 8px; }
.org-nav a { color: rgba(255,255,255,0.8); text-decoration: none; padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; transition: all 0.2s; }
.org-nav a:hover, .org-nav a.active { background: rgba(255,255,255,0.15); color: #fff; }

/* ======================== ALERTS ======================== */
.alert-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; padding: 14px 20px; border-radius: 12px; margin-bottom: 18px; font-size: 14px; font-weight: 500; }
.alert-error { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; padding: 14px 20px; border-radius: 12px; margin-bottom: 18px; font-size: 14px; font-weight: 500; }
.alert-info { background: #f0f9ff; border: 1px solid #bae6fd; color: #0369a1; padding: 14px 20px; border-radius: 12px; margin-bottom: 18px; font-size: 14px; font-weight: 500; }

/* ======================== MODAL ======================== */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 999; justify-content: center; align-items: center; backdrop-filter: blur(4px); }
.modal-content { background: #fff; border-radius: 20px; padding: 36px; width: 100%; max-width: 520px; box-shadow: 0 24px 64px rgba(0,0,0,0.25); max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.modal-header h2 { margin: 0; font-size: 22px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: #94a3b8; width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.modal-close:hover { background: #f1f5f9; color: #475569; }

/* ======================== RESPONSIVE ======================== */
@media (max-width: 1024px) {
    .admin-header { padding: 0 16px; }
    .admin-content { padding: 0 16px; }
    .admin-nav a { padding: 8px 10px; font-size: 12px; }
}
@media (max-width: 768px) {
    .hero { padding: 32px 16px; }
    .hero h1 { font-size: 30px; }
    .subtitle { font-size: 15px; }
    .test-info-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .register-form { padding: 28px; }
    .form-row { grid-template-columns: 1fr; }
    .progress-tracker { gap: 0; }
    .step-line { width: 20px; }
    .step-label { display: none; }
    .section-cards { grid-template-columns: repeat(2, 1fr); }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .total-score-card { flex-direction: column; text-align: center; gap: 24px; }
    .score-details { text-align: center; }
    .test-main { padding: 24px 16px; }
    .admin-header { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 8px; }
    .admin-nav { width: 100%; }
    .data-table { font-size: 12px; }
    .data-table th, .data-table td { padding: 10px 8px; }
    .modal-content { margin: 16px; padding: 28px; }
    .sentence-text { font-size: 18px; }
}
@media (max-width: 480px) {
    .test-info-cards { grid-template-columns: 1fr 1fr; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .section-cards { grid-template-columns: 1fr; }
    .hero h1 { font-size: 26px; }
    .btn-lg { padding: 14px 24px; font-size: 15px; }
}

/* ======================== RESPONSIVE v2 (laptop / tablet / mobile) ======================== */

/* Laptops & small desktops */
@media (max-width: 1024px) {
    .org-header { padding: 10px 16px; height: auto; flex-wrap: wrap; gap: 8px; }
    .org-nav { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
    .results-container, .admin-content { max-width: 100%; }
    .total-score-card { gap: 28px; padding: 32px; }
}

/* Tablets */
@media (max-width: 768px) {
    .test-header { flex-wrap: wrap; padding: 8px 12px; row-gap: 6px; }
    .header-center { order: 3; width: 100%; justify-content: flex-start; }
    .candidate-name { display: none; }
    .timer { font-size: 14px; padding: 5px 10px; min-width: 62px; }

    .speaking-ui, .mcq-ui, .writing-ui, .jumble-ui, .oneword-ui { padding: 24px 18px; border-radius: 16px; }
    .section-intro, .section-complete { padding: 36px 22px; border-radius: 16px; }
    .sentence-box, .conversation-box, .completion-sentence, .passage-display { padding: 20px 16px; }
    .sentence-text { font-size: 17px; min-height: 48px; }
    .opinion-text, .completion-text { font-size: 17px; }
    .oneword-question { font-size: 18px; padding: 18px; margin-bottom: 26px; }
    .oneword-input { font-size: 20px; padding: 13px 18px; }
    .mic-ring { width: 72px; height: 72px; }
    .mic-icon { font-size: 29px; }
    .timer-display { font-size: 32px; }

    /* Wide data tables scroll horizontally instead of breaking layout */
    .admin-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .data-table { min-width: 640px; }

    .register-form, .admin-login-box { padding: 26px 20px; border-radius: 16px; }
    .rules-box { padding: 20px 18px; }
    .modal-content { padding: 24px 18px; margin: 14px; }
    .answers-list { gap: 10px; }
    .answer-card { padding: 16px; }
    .results-actions .btn { min-width: 140px; }
    .results-page { padding: 30px 14px; }
    .score-number { font-size: 36px; }
    .percentage { font-size: 42px; }
    .score-ring { width: 124px; height: 124px; }
    .landing-page .hero { padding: 34px 16px; }
    .logo-badge { letter-spacing: 2.5px; font-size: 13px; padding: 7px 16px; }
}

/* Phones */
@media (max-width: 480px) {
    .test-info-cards { gap: 8px; }
    .info-card { padding: 18px 8px; border-radius: 12px; }
    .info-icon { font-size: 26px; margin-bottom: 8px; }
    .info-card h3 { font-size: 9.5px; letter-spacing: 1px; }
    .info-card p { font-size: 15px; }
    .info-card span { font-size: 11px; }

    .hero h1 { font-size: 23px; letter-spacing: -0.3px; }
    .subtitle { font-size: 14px; margin-bottom: 28px; }
    .logo-badge { align-self: center; }
    .hero-content { text-align: center; }

    .form-row { grid-template-columns: 1fr; gap: 0; }
    .btn-lg { margin-top: 14px; }
    .divider { margin: 24px 0 18px; }

    .step-circle { width: 26px; height: 26px; font-size: 11px; }
    .step-line { width: 14px; }
    .options-grid { gap: 9px; }
    .option-btn { padding: 13px 14px; font-size: 14px; gap: 10px; border-radius: 10px; }
    .opt-label { width: 27px; height: 27px; font-size: 12.5px; }
    .question-text { font-size: 15.5px; }
    .writing-input { min-height: 130px; padding: 13px; font-size: 14.5px; }
    .jumble-chip { padding: 8px 14px; font-size: 14px; }
    .jumble-arrow { font-size: 22px; margin: 10px 0; }
    .writing-meta { gap: 12px; flex-wrap: wrap; }

    .section-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .section-card { padding: 18px 10px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 18px 10px; }
    .stat-card .stat-num { font-size: 26px; }

    .data-table { min-width: 560px; font-size: 11.5px; }
    .data-table th, .data-table td { padding: 9px 7px; }
    .badge { font-size: 10px; padding: 2px 8px; white-space: nowrap; }

    .total-score-card { padding: 22px 16px; }
    .grade { font-size: 13px; padding: 4px 14px; }
    .results-actions { flex-direction: column; align-items: stretch; }
    .results-actions .btn { min-width: 0; width: 100%; }
    .alert-success, .alert-error, .alert-info { font-size: 13px; padding: 11px 13px; }
}

/* ======================== PART C CONVERSATION ======================== */
.conversation-area { display:flex; align-items:flex-start; gap:20px; margin-bottom:28px; background:#f8fafc; border:2px solid #e2e8f0; border-radius:14px; padding:28px 24px; }
.person-column { display:flex; flex-direction:column; align-items:center; gap:8px; flex:0 0 100px; }
.person-avatar { width:80px; height:80px; border-radius:50%; overflow:hidden; border:3px solid #e2e8f0; background:#fff; display:flex; align-items:center; justify-content:center; }
.person-avatar img { width:100%; height:100%; object-fit:cover; }
.avatar-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:28px; font-weight:700; color:#fff; border-radius:50%; }
.avatar-a { background:linear-gradient(135deg, #3b82f6, #2563eb); }
.avatar-b { background:linear-gradient(135deg, #f59e0b, #d97706); }
.person-name { font-size:12px; font-weight:600; color:#475569; text-transform:uppercase; letter-spacing:1px; }
.conversation-center { flex:1; text-align:center; padding:0 10px; }
.conversation-center .instruction { font-size:12px; color:#64748b; margin-bottom:14px; text-transform:uppercase; letter-spacing:1.5px; font-weight:600; }
.dialogue-box { text-align:left; max-height:220px; overflow-y:auto; }
.dialogue-line { display:flex; gap:10px; margin-bottom:10px; align-items:flex-start; }
.dialogue-line.line-a { justify-content:flex-start; }
.dialogue-line.line-b { justify-content:flex-end; }
.dialogue-speaker { font-size:11px; font-weight:700; color:#fff; min-width:24px; height:24px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:2px; }
.speaker-a { background:#3b82f6; }
.speaker-b { background:#f59e0b; }
.dialogue-bubble { max-width:80%; padding:10px 16px; border-radius:12px; font-size:14px; line-height:1.5; color:#1e293b; }
.bubble-a { background:#eff6ff; border-bottom-left-radius:4px; }
.bubble-b { background:#fffbeb; border-bottom-right-radius:4px; }
.dialogue-question { margin-top:16px; padding:14px 18px; background:#f0fdf4; border:2px solid #86efac; border-radius:12px; font-weight:600; color:#166534; text-align:center; font-size:15px; }
.partc-question { margin-top:16px; padding:14px 18px; background:#f0fdf4; border:2px solid #86efac; border-radius:12px; font-weight:600; color:#166534; text-align:center; font-size:15px; }

@media (max-width: 600px) {
    .conversation-area { flex-direction:column; align-items:center; padding:20px 14px; }
    .person-column { flex-direction:row; gap:12px; }
    .person-avatar { width:56px; height:56px; }
    .avatar-placeholder { font-size:20px; }
}
