/* Chemistry App - Premium Arabic Design */
/* Modern, Premium UI with Smooth Animations */

:root {
     /* Primary Colors - Deep Purple to Blue Gradient */
     --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
     --primary-color: #667eea;
     --secondary-color: #764ba2;

     /* Accent Colors */
     --gold: #ffd700;
     --gold-dark: #d4af00;
     --success: #4CAF50;
     --success-light: rgba(76, 175, 80, 0.2);
     --error: #f44336;
     --error-light: rgba(244, 67, 54, 0.2);
     --warning: #FF9800;
     --warning-light: rgba(255, 152, 0, 0.2);

     /* Glass Effect */
     --glass-bg: rgba(255, 255, 255, 0.1);
     --glass-border: rgba(255, 255, 255, 0.2);
     --glass-hover: rgba(255, 255, 255, 0.15);

     /* Text Colors */
     --text-primary: #ffffff;
     --text-secondary: rgba(255, 255, 255, 0.85);
     --text-muted: rgba(255, 255, 255, 0.6);

     /* Shadows */
     --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.1);
     --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.2);
     --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.3);

     /* Border Radius */
     --radius-sm: 10px;
     --radius-md: 15px;
     --radius-lg: 20px;
     --radius-xl: 25px;
     --radius-full: 50px;

     /* Transitions */
     --transition-fast: 0.2s ease;
     --transition-normal: 0.3s ease;
     --transition-slow: 0.5s ease;
}

/* Reset & Base */
* {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
}

html {
     scroll-behavior: smooth;
}

body {
     font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
     background: var(--primary-gradient);
     min-height: 100vh;
     color: var(--text-primary);
     line-height: 1.7;
     direction: rtl;
     text-align: right;
     overflow-x: hidden;
}

/* Container */
.container {
     max-width: 1200px;
     margin: 0 auto;
     padding: 20px;
     min-height: 100vh;
     display: flex;
     flex-direction: column;
}

/* Progress Bar */
#progress-bar {
     position: fixed;
     top: 0;
     right: 0;
     width: 0%;
     height: 4px;
     background: linear-gradient(90deg, var(--success), #8BC34A);
     transition: width var(--transition-normal);
     z-index: 1000;
}

/* ===== HEADER STYLES ===== */
.header {
     text-align: center;
     padding: 30px 0;
     margin-bottom: 30px;
}

.logo-section {
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 15px;
     margin-bottom: 10px;
}

.logo-icon {
     font-size: 3rem;
     animation: float 3s ease-in-out infinite;
}

@keyframes float {

     0%,
     100% {
          transform: translateY(0);
     }

     50% {
          transform: translateY(-10px);
     }
}

.title {
     font-size: 2.8rem;
     font-weight: 700;
     background: linear-gradient(45deg, var(--gold), #ffff00, var(--gold));
     background-size: 200% auto;
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;
     background-clip: text;
     animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
     0% {
          background-position: 0% center;
     }

     100% {
          background-position: 200% center;
     }
}

.subtitle {
     font-size: 1.1rem;
     color: var(--text-secondary);
     margin-top: 8px;
}

/* Exam/Bank Header */
.exam-header,
.bank-header,
.results-header {
     padding: 20px 0;
}

.header-content {
     display: flex;
     justify-content: space-between;
     align-items: center;
     gap: 20px;
     flex-wrap: wrap;
}

.exam-info,
.bank-info {
     text-align: center;
     flex: 1;
}

.exam-info .title,
.bank-info .title {
     font-size: 1.8rem;
     margin-bottom: 5px;
}

.exam-progress,
.bank-progress {
     font-size: 1rem;
     background: var(--glass-bg);
     padding: 8px 20px;
     border-radius: var(--radius-full);
     backdrop-filter: blur(10px);
     display: inline-block;
}

/* Timer */
.timer-container {
     display: flex;
     align-items: center;
     gap: 8px;
     background: rgba(0, 0, 0, 0.3);
     padding: 10px 20px;
     border-radius: var(--radius-full);
}

.timer-icon {
     font-size: 1.2rem;
}

.timer {
     font-size: 1.4rem;
     font-weight: 700;
     color: var(--gold);
     font-feature-settings: "tnum";
     letter-spacing: 1px;
}

/* Score Container */
.score-container {
     display: flex;
     align-items: center;
     gap: 8px;
     background: var(--glass-bg);
     padding: 10px 20px;
     border-radius: var(--radius-full);
     backdrop-filter: blur(10px);
}

.score {
     font-size: 1.2rem;
     font-weight: 600;
     color: var(--gold);
}

/* ===== MODE TABS ===== */
.mode-tabs {
     display: flex;
     justify-content: center;
     gap: 15px;
     margin-bottom: 40px;
}

.mode-tab {
     display: flex;
     align-items: center;
     gap: 10px;
     padding: 15px 35px;
     background: var(--glass-bg);
     border: 2px solid transparent;
     border-radius: var(--radius-full);
     color: var(--text-primary);
     font-size: 1.1rem;
     font-weight: 600;
     font-family: inherit;
     cursor: pointer;
     transition: all var(--transition-normal);
     backdrop-filter: blur(10px);
}

.mode-tab:hover {
     background: var(--glass-hover);
     transform: translateY(-3px);
}

.mode-tab.active {
     background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
     border-color: var(--gold);
     box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.tab-icon {
     font-size: 1.3rem;
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
     display: none;
     animation: fadeIn 0.5s ease;
}

.content-section.active {
     display: block;
}

@keyframes fadeIn {
     from {
          opacity: 0;
          transform: translateY(20px);
     }

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

.section-header {
     text-align: center;
     margin-bottom: 35px;
}

.section-header h2 {
     font-size: 1.8rem;
     color: var(--gold);
     margin-bottom: 10px;
}

.section-header p {
     color: var(--text-secondary);
     font-size: 1rem;
}

/* ===== CARDS GRID ===== */
.cards-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
     gap: 25px;
     max-width: 1000px;
     margin: 0 auto;
}

.card {
     background: var(--glass-bg);
     backdrop-filter: blur(20px);
     border-radius: var(--radius-lg);
     padding: 35px 25px;
     text-align: center;
     transition: all var(--transition-normal);
     border: 1px solid var(--glass-border);
     box-shadow: var(--shadow-md);
     cursor: pointer;
     position: relative;
     overflow: hidden;
}

.card::before {
     content: '';
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     height: 4px;
     background: linear-gradient(90deg, var(--gold), var(--warning));
     opacity: 0;
     transition: opacity var(--transition-normal);
}

.card:hover {
     transform: translateY(-10px);
     box-shadow: var(--shadow-lg);
     background: var(--glass-hover);
}

.card:hover::before {
     opacity: 1;
}

.card-icon {
     font-size: 3.5rem;
     margin-bottom: 15px;
     display: block;
}

.card h3 {
     font-size: 1.4rem;
     margin-bottom: 15px;
     color: var(--gold);
}

.card-details {
     display: flex;
     justify-content: center;
     gap: 20px;
     margin-bottom: 15px;
     font-size: 0.9rem;
     color: var(--text-secondary);
}

.detail-item {
     display: flex;
     align-items: center;
     gap: 5px;
}

.card-badge {
     display: inline-block;
     background: var(--glass-bg);
     padding: 5px 15px;
     border-radius: var(--radius-full);
     font-size: 0.85rem;
     color: var(--warning);
     margin-bottom: 20px;
}

.card-topics {
     display: flex;
     flex-wrap: wrap;
     justify-content: center;
     gap: 8px;
     margin-bottom: 20px;
}

.topic-tag {
     background: rgba(102, 126, 234, 0.3);
     padding: 4px 12px;
     border-radius: var(--radius-full);
     font-size: 0.8rem;
     color: var(--text-secondary);
}

/* ===== BUTTONS ===== */
.start-btn,
.home-btn,
.finish-btn,
.retry-btn,
.nav-btn,
.check-btn {
     font-family: inherit;
     font-weight: 600;
     cursor: pointer;
     transition: all var(--transition-normal);
     border: none;
     display: inline-flex;
     align-items: center;
     justify-content: center;
     gap: 8px;
}

.start-btn {
     background: linear-gradient(45deg, var(--success), #45a049);
     color: white;
     padding: 14px 30px;
     border-radius: var(--radius-full);
     font-size: 1.05rem;
     width: 100%;
     box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.start-btn:hover {
     transform: scale(1.03);
     box-shadow: 0 6px 25px rgba(76, 175, 80, 0.5);
}

.bank-btn {
     background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
     box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.bank-btn:hover {
     box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

.home-btn {
     background: var(--glass-bg);
     color: white;
     padding: 12px 24px;
     border-radius: var(--radius-full);
     font-size: 1rem;
     backdrop-filter: blur(10px);
     border: 1px solid var(--glass-border);
}

.home-btn:hover {
     background: var(--glass-hover);
     transform: translateY(-2px);
}

.home-btn.large {
     padding: 15px 30px;
     font-size: 1.1rem;
}

.finish-btn {
     background: linear-gradient(45deg, var(--warning), #F57C00);
     color: white;
     padding: 15px 30px;
     border-radius: var(--radius-full);
     font-size: 1.1rem;
     box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.finish-btn:hover {
     transform: scale(1.05);
     box-shadow: 0 6px 25px rgba(255, 152, 0, 0.5);
}

.retry-btn {
     background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
     color: white;
     padding: 15px 30px;
     border-radius: var(--radius-full);
     font-size: 1.1rem;
     box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.retry-btn:hover {
     transform: scale(1.05);
     box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

/* ===== INFO BOX ===== */
.info-box {
     display: flex;
     align-items: center;
     gap: 15px;
     background: var(--glass-bg);
     padding: 20px 25px;
     border-radius: var(--radius-md);
     margin-top: 30px;
     max-width: 600px;
     margin-left: auto;
     margin-right: auto;
     backdrop-filter: blur(10px);
     border-right: 4px solid var(--gold);
}

.info-box.success {
     border-right-color: var(--success);
}

.info-icon {
     font-size: 1.5rem;
}

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

/* ===== QUESTION CONTAINER ===== */
.question-main {
     flex: 1;
     display: flex;
     justify-content: center;
     align-items: flex-start;
     padding: 20px;
}

.question-container {
     background: var(--glass-bg);
     backdrop-filter: blur(20px);
     border-radius: var(--radius-lg);
     padding: 40px;
     max-width: 800px;
     width: 100%;
     border: 1px solid var(--glass-border);
     box-shadow: var(--shadow-md);
     animation: fadeIn 0.5s ease;
}

.question-header {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 25px;
     padding-bottom: 20px;
     border-bottom: 2px solid var(--glass-border);
}

.question-number {
     font-size: 1.3rem;
     font-weight: 600;
     color: var(--gold);
}

.question-marks,
.question-topic {
     font-size: 0.95rem;
     color: var(--text-secondary);
     background: var(--glass-bg);
     padding: 6px 16px;
     border-radius: var(--radius-full);
}

.question-text {
     font-size: 1.15rem;
     line-height: 1.9;
     margin-bottom: 30px;
     padding: 25px;
     background: rgba(255, 255, 255, 0.05);
     border-radius: var(--radius-md);
     border-right: 4px solid var(--gold);
     word-wrap: break-word;
     overflow-wrap: break-word;
     white-space: pre-wrap;
}

/* ===== OPTIONS ===== */
.options-container {
     margin-bottom: 25px;
}

.option {
     display: block;
     width: 100%;
     background: var(--glass-bg);
     border: 2px solid var(--glass-border);
     border-radius: var(--radius-md);
     padding: 18px 22px;
     margin-bottom: 12px;
     cursor: pointer;
     transition: all var(--transition-normal);
     text-align: right;
     font-size: 1.05rem;
     font-family: inherit;
     color: var(--text-primary);
}

.option:hover:not(:disabled) {
     background: var(--glass-hover);
     border-color: var(--gold);
     transform: translateX(5px);
}

.option.selected {
     background: rgba(102, 126, 234, 0.3);
     border-color: var(--primary-color);
     box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.option.correct {
     background: var(--success-light);
     border-color: var(--success);
     cursor: default;
}

.option.incorrect {
     background: var(--error-light);
     border-color: var(--error);
     cursor: default;
}

.option:disabled {
     cursor: default;
     opacity: 0.8;
}

/* ===== ANSWER SECTION ===== */
.answer-section {
     background: var(--glass-bg);
     border-radius: var(--radius-md);
     padding: 25px;
     margin-bottom: 25px;
     animation: slideIn 0.4s ease;
}

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

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

.answer-result {
     display: flex;
     align-items: center;
     gap: 15px;
     margin-bottom: 20px;
     padding: 15px 20px;
     border-radius: var(--radius-sm);
}

.answer-result.correct {
     background: var(--success-light);
     border-right: 4px solid var(--success);
}

.answer-result.incorrect {
     background: var(--error-light);
     border-right: 4px solid var(--error);
}

.result-icon {
     font-size: 2rem;
}

.result-text {
     font-size: 1.2rem;
     font-weight: 600;
}

.correct-answer {
     margin-bottom: 15px;
     padding: 15px;
     background: var(--success-light);
     border-radius: var(--radius-sm);
     border-right: 4px solid var(--success);
}

.explanation {
     padding: 15px;
     background: rgba(255, 255, 255, 0.05);
     border-radius: var(--radius-sm);
     font-size: 0.95rem;
     line-height: 1.8;
}

/* ===== NAVIGATION ===== */
.question-navigation {
     display: flex;
     justify-content: space-between;
     gap: 15px;
     flex-wrap: wrap;
}

.nav-btn {
     background: var(--glass-bg);
     color: white;
     padding: 14px 28px;
     border-radius: var(--radius-full);
     font-size: 1rem;
     flex: 1;
     min-width: 120px;
     border: 1px solid var(--glass-border);
}

.nav-btn:hover:not(:disabled) {
     background: var(--glass-hover);
     transform: translateY(-2px);
}

.nav-btn:disabled {
     opacity: 0.5;
     cursor: not-allowed;
}

.check-btn {
     background: linear-gradient(45deg, var(--warning), #F57C00);
     border: none;
     box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.check-btn:hover:not(:disabled) {
     transform: translateY(-2px);
     box-shadow: 0 6px 20px rgba(255, 152, 0, 0.5);
}

.question-dots {
     display: flex;
     gap: 5px;
     overflow-x: auto;
     padding: 5px;
     max-width: 300px;
}

.question-dot {
     width: 12px;
     height: 12px;
     border-radius: 50%;
     background: var(--glass-bg);
     border: 2px solid var(--glass-border);
     cursor: pointer;
     transition: all var(--transition-fast);
     flex-shrink: 0;
}

.question-dot.current {
     background: var(--gold);
     border-color: var(--gold);
     transform: scale(1.2);
}

.question-dot.answered {
     background: var(--primary-color);
     border-color: var(--primary-color);
}

/* ===== FOOTER ===== */
.footer {
     text-align: center;
     padding: 25px;
     color: var(--text-muted);
     font-size: 0.9rem;
     margin-top: auto;
}

.exam-footer,
.bank-footer,
.results-footer {
     display: flex;
     justify-content: space-between;
     align-items: center;
     padding: 20px;
     background: var(--glass-bg);
     backdrop-filter: blur(20px);
     border-radius: var(--radius-md);
     margin-top: 20px;
     gap: 20px;
     flex-wrap: wrap;
}

.answered-count,
.progress-display {
     display: flex;
     align-items: center;
     gap: 10px;
     font-size: 1rem;
     color: var(--text-secondary);
}

.progress-bar-container {
     width: 150px;
     height: 8px;
     background: var(--glass-bg);
     border-radius: var(--radius-full);
     overflow: hidden;
}

.progress-fill {
     height: 100%;
     background: linear-gradient(90deg, var(--success), #8BC34A);
     width: 0%;
     transition: width var(--transition-normal);
}

/* ===== RESULTS PAGE ===== */
.results-main {
     flex: 1;
     display: flex;
     flex-direction: column;
     align-items: center;
     padding: 20px;
     gap: 30px;
}

.results-summary {
     display: flex;
     align-items: center;
     gap: 50px;
     background: var(--glass-bg);
     backdrop-filter: blur(20px);
     border-radius: var(--radius-lg);
     padding: 40px;
     border: 1px solid var(--glass-border);
     animation: fadeIn 0.6s ease;
}

.score-circle {
     position: relative;
     width: 180px;
     height: 180px;
}

.score-circle svg {
     transform: rotate(-90deg);
     width: 100%;
     height: 100%;
}

.score-bg {
     fill: none;
     stroke: var(--glass-bg);
     stroke-width: 8;
}

.score-fill {
     fill: none;
     stroke: var(--success);
     stroke-width: 8;
     stroke-linecap: round;
     stroke-dasharray: 283;
     stroke-dashoffset: 283;
     transition: stroke-dashoffset 1s ease-out;
}

.score-content {
     position: absolute;
     top: 50%;
     left: 50%;
     transform: translate(-50%, -50%);
     text-align: center;
}

.score-percentage {
     font-size: 2.5rem;
     font-weight: 700;
     color: var(--gold);
}

.score-details {
     text-align: right;
}

.score-details h2 {
     font-size: 1.8rem;
     color: var(--gold);
     margin-bottom: 10px;
}

.score-text {
     font-size: 1.2rem;
     color: var(--text-secondary);
     margin-bottom: 20px;
}

.performance-stats {
     display: grid;
     grid-template-columns: repeat(2, 1fr);
     gap: 15px;
}

.stat {
     display: flex;
     flex-direction: column;
     align-items: center;
     background: var(--glass-bg);
     padding: 15px;
     border-radius: var(--radius-sm);
     text-align: center;
}

.stat-icon {
     font-size: 1.5rem;
     margin-bottom: 5px;
}

.stat-value {
     font-size: 1.4rem;
     font-weight: 700;
     color: var(--gold);
}

.stat-label {
     font-size: 0.85rem;
     color: var(--text-muted);
}

/* ===== RECOMMENDATIONS ===== */
.recommendations {
     width: 100%;
     max-width: 800px;
     background: var(--glass-bg);
     backdrop-filter: blur(20px);
     border-radius: var(--radius-lg);
     padding: 30px;
     border: 1px solid var(--glass-border);
}

.recommendations h3 {
     font-size: 1.4rem;
     color: var(--gold);
     margin-bottom: 20px;
     text-align: center;
}

.recommendation-item {
     background: var(--glass-bg);
     padding: 20px;
     border-radius: var(--radius-sm);
     margin-bottom: 15px;
     border-right: 4px solid var(--warning);
}

.recommendation-item h4 {
     color: var(--gold);
     margin-bottom: 8px;
}

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

/* ===== ANSWERS REVIEW ===== */
.answers-review {
     width: 100%;
     max-width: 800px;
}

.review-header {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 20px;
     flex-wrap: wrap;
     gap: 15px;
}

.review-header h3 {
     font-size: 1.4rem;
     color: var(--gold);
}

.filter-buttons {
     display: flex;
     gap: 10px;
}

.filter-btn {
     background: var(--glass-bg);
     color: var(--text-secondary);
     border: 1px solid var(--glass-border);
     padding: 8px 18px;
     border-radius: var(--radius-full);
     font-family: inherit;
     font-size: 0.9rem;
     cursor: pointer;
     transition: all var(--transition-normal);
}

.filter-btn:hover,
.filter-btn.active {
     background: var(--glass-hover);
     color: var(--text-primary);
     border-color: var(--gold);
}

.answer-review-item {
     background: var(--glass-bg);
     backdrop-filter: blur(20px);
     border-radius: var(--radius-md);
     padding: 25px;
     margin-bottom: 20px;
     border: 1px solid var(--glass-border);
     animation: fadeIn 0.4s ease;
}

.answer-review-item.correct {
     border-right: 4px solid var(--success);
}

.answer-review-item.incorrect {
     border-right: 4px solid var(--error);
}

.review-question {
     font-weight: 600;
     margin-bottom: 15px;
     color: var(--gold);
     line-height: 1.7;
}

.review-answer {
     margin-bottom: 12px;
     padding: 10px 15px;
     background: rgba(255, 255, 255, 0.05);
     border-radius: var(--radius-sm);
}

.review-explanation {
     background: rgba(255, 255, 255, 0.05);
     padding: 15px;
     border-radius: var(--radius-sm);
     font-size: 0.95rem;
     line-height: 1.8;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background: rgba(102, 126, 234, 0.95);
     display: none;
     justify-content: center;
     align-items: center;
     flex-direction: column;
     gap: 20px;
     z-index: 9999;
     color: white;
     font-size: 1.2rem;
}

.loading-spinner {
     width: 50px;
     height: 50px;
     border: 3px solid rgba(255, 255, 255, 0.3);
     border-top-color: var(--gold);
     border-radius: 50%;
     animation: spin 1s linear infinite;
}

@keyframes spin {
     to {
          transform: rotate(360deg);
     }
}

/* ===== CELEBRATION EFFECTS ===== */
.celebration {
     position: fixed;
     top: 50%;
     left: 50%;
     transform: translate(-50%, -50%);
     font-size: 5rem;
     animation: celebration 1s ease-out forwards;
     z-index: 10000;
     pointer-events: none;
}

@keyframes celebration {
     0% {
          opacity: 0;
          transform: translate(-50%, -50%) scale(0.5);
     }

     50% {
          opacity: 1;
          transform: translate(-50%, -50%) scale(1.3);
     }

     100% {
          opacity: 0;
          transform: translate(-50%, -50%) scale(1);
     }
}

.encouragement {
     position: fixed;
     top: 50%;
     left: 50%;
     transform: translate(-50%, -50%);
     background: var(--warning-light);
     color: white;
     padding: 20px 40px;
     border-radius: var(--radius-md);
     font-size: 1.2rem;
     animation: encouragement 2s ease-out forwards;
     z-index: 10000;
     pointer-events: none;
}

@keyframes encouragement {
     0% {
          opacity: 0;
          transform: translate(-50%, -50%) translateY(20px);
     }

     20% {
          opacity: 1;
          transform: translate(-50%, -50%) translateY(0);
     }

     80% {
          opacity: 1;
          transform: translate(-50%, -50%) translateY(0);
     }

     100% {
          opacity: 0;
          transform: translate(-50%, -50%) translateY(-20px);
     }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
     .container {
          padding: 15px;
     }

     .title {
          font-size: 2rem;
     }

     .header-content {
          flex-direction: column;
          text-align: center;
     }

     .mode-tabs {
          flex-direction: column;
          max-width: 300px;
          margin-left: auto;
          margin-right: auto;
     }

     .mode-tab {
          justify-content: center;
     }

     .cards-grid {
          grid-template-columns: 1fr;
          gap: 20px;
     }

     .card {
          padding: 25px 20px;
     }

     .question-container {
          padding: 25px;
     }

     .question-text {
          font-size: 1.05rem;
          padding: 20px;
     }

     .option {
          padding: 15px 18px;
          font-size: 1rem;
     }

     .results-summary {
          flex-direction: column;
          text-align: center;
          padding: 30px;
          gap: 30px;
     }

     .score-details {
          text-align: center;
     }

     .exam-footer,
     .bank-footer,
     .results-footer {
          flex-direction: column;
          gap: 15px;
     }

     .question-navigation {
          flex-direction: column;
     }

     .nav-btn {
          width: 100%;
     }

     .question-dots {
          display: none;
     }
}

@media (max-width: 480px) {
     .title {
          font-size: 1.6rem;
     }

     .logo-icon {
          font-size: 2.2rem;
     }

     .subtitle {
          font-size: 0.95rem;
     }

     .card {
          padding: 20px 15px;
     }

     .question-container {
          padding: 20px 15px;
     }

     .question-text {
          font-size: 1rem;
          padding: 15px;
     }

     .option {
          padding: 14px 16px;
          font-size: 0.95rem;
     }

     .score-circle {
          width: 140px;
          height: 140px;
     }

     .score-percentage {
          font-size: 2rem;
     }
}

/* ===== ARABIC TEXT OPTIMIZATION ===== */
.question-text,
.option,
.review-explanation,
.explanation {
     font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
     line-height: 1.9;
     text-align: right;
     direction: rtl;
     unicode-bidi: plaintext;
     word-break: break-word;
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.card,
.question-container,
.results-summary {
     will-change: transform;
     transform: translateZ(0);
}

.option,
.nav-btn,
.start-btn,
.finish-btn {
     will-change: transform, background-color;
}

/* ===== PRINT STYLES ===== */
@media print {
     body {
          background: white;
          color: black;
     }

     .header,
     .footer,
     .question-navigation,
     .mode-tabs {
          display: none;
     }

     .card,
     .question-container,
     .answer-review-item {
          background: white;
          border: 1px solid #ccc;
          box-shadow: none;
     }
}