/* ============================================
   41-MAKTAB - TO'LIQ STIL FAYLI
   Zamonaviy va rangli dizayn
   ============================================ */

/* ===== ROOT O'ZGARUVCHILAR ===== */
:root {
  /* Asosiy ranglar - Binafsha va pushti palitrasi */
  --primary: #6366f1;        /* Binafsha-ko'k */
  --primary-dark: #4f46e5;    /* To'q binafsha */
  --primary-light: #818cf8;   /* Och binafsha */
  --secondary: #ec4899;       /* Pushti */
  --secondary-dark: #db2777;  /* To'q pushti */
  --secondary-light: #f472b6; /* Och pushti */
  --accent: #06b6d4;          /* Moviy */
  --accent-dark: #0891b2;     /* To'q moviy */
  
  /* Qo'shimcha ranglar */
  --success: #10b981;         /* Yashil */
  --warning: #f59e0b;         /* Sariq */
  --danger: #ef4444;          /* Qizil */
  --info: #3b82f6;            /* Ko'k */
  
  /* Neytral ranglar */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Gradientlar */
  --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-secondary: linear-gradient(135deg, #ec4899, #f43f5e);
  --gradient-accent: linear-gradient(135deg, #06b6d4, #3b82f6);
  --gradient-warm: linear-gradient(135deg, #f59e0b, #ef4444);
  --gradient-cool: linear-gradient(135deg, #10b981, #06b6d4);
  --gradient-mixed: linear-gradient(135deg, #6366f1, #ec4899, #06b6d4);
  
  /* Fon ranglari */
  --bg-primary: #f0f2f5;
  --bg-secondary: #ffffff;
  --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --bg-soft: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  
  /* Matn ranglari */
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --text-white: #ffffff;
  
  /* O'lchamlar */
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
  --border-radius-full: 9999px;
  
  /* Soyalar */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-colored: 0 10px 30px -5px rgba(99, 102, 241, 0.3);
  
  /* Animatsiyalar */
  --transition-fast: 150ms;
  --transition-base: 300ms;
  --transition-slow: 500ms;
  --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ===== UMUMIY STILLAR ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

/* Orqa fon animatsiyasi */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 40% 80%, rgba(6, 182, 212, 0.03) 0%, transparent 40%);
  pointer-events: none;
  z-index: -1;
}

.container {
  width: 90%;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
}

/* ===== HEADER ===== */
.header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo img {
  width: 55px;
  height: 55px;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  padding: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: all var(--transition-base) ease;
  box-shadow: var(--shadow-md);
}

.logo:hover img {
  transform: rotate(5deg) scale(1.05);
  border-color: var(--primary);
}

.brand h1 {
  font-size: 26px;
  font-weight: 700;
  background: var(--gradient-mixed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.brand p {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Navigatsiya */
.nav {
  margin-left: auto;
  margin-right: 30px;
}

.nav ul {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav ul li a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 15px;
  padding: 10px 18px;
  border-radius: var(--border-radius-full);
  transition: all var(--transition-base) ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.nav ul li a::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--border-radius-full);
  z-index: -1;
  transition: transform var(--transition-base) var(--transition-bounce);
}

.nav ul li a:hover::before,
.nav ul li a.active::before {
  transform: translate(-50%, -50%) scale(1);
}

.nav ul li a:hover,
.nav ul li a.active {
  color: var(--text-white);
}

/* Nav Tools */
.nav-tools {
  display: flex;
  align-items: center;
  gap: 15px;
}

.search-box {
  padding: 10px 18px;
  border: 2px solid var(--gray-200);
  border-radius: var(--border-radius-full);
  font-size: 14px;
  width: 220px;
  transition: all var(--transition-base) ease;
  background: var(--white);
}

.search-box:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  width: 260px;
}

.dark-btn {
  background: var(--gradient-primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 20px;
  cursor: pointer;
  transition: all var(--transition-base) ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.dark-btn:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: var(--shadow-colored);
}

/* ===== HERO SECTION ===== */
.hero {
  background: var(--gradient-mixed);
  color: var(--white);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 15s infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, 20px); }
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  position: relative;
  z-index: 1;
}

.hero-text {
  flex: 1;
}

.hero-text .hero-location {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(5px);
  padding: 8px 16px;
  border-radius: var(--border-radius-full);
  font-size: 14px;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.3);
}

.hero-text h1 {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  animation: slideInLeft 1s ease;
}

.hero-text p {
  font-size: 18px;
  opacity: 0.95;
  margin-bottom: 30px;
  animation: slideInLeft 1s ease 0.2s both;
}

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

.hero-img {
  flex: 1;
  display: flex;
  justify-content: center;
  animation: float 6s ease-in-out infinite;
}

.hero-img img {
  max-width: 100%;
  width: 350px;
  height: auto;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  box-shadow: var(--shadow-2xl);
  border: 4px solid rgba(255,255,255,0.3);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--border-radius-full);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all var(--transition-base) var(--transition-bounce);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.2);
  border-radius: inherit;
  z-index: -1;
  transition: transform var(--transition-base) var(--transition-bounce);
}

.btn:hover::before {
  transform: translate(-50%, -50%) scale(1);
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 8px 20px -8px var(--primary);
}

.btn-secondary {
  background: var(--gradient-secondary);
  color: var(--white);
  box-shadow: 0 8px 20px -8px var(--secondary);
}

.btn-accent {
  background: var(--gradient-accent);
  color: var(--white);
  box-shadow: 0 8px 20px -8px var(--accent);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--gradient-primary);
  color: var(--white);
  border-color: transparent;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

/* ===== ABOUT SECTION ===== */
.about {
  padding: 80px 0;
  text-align: center;
  background: var(--white);
  position: relative;
}

.about h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 20px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about p {
  max-width: 800px;
  margin: 0 auto;
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.about strong {
  color: var(--primary);
}

/* ============================================
   PAGE TITLE - BARCHA SAHIFALAR UCHUN
   ============================================ */

/* Asosiy stillar */
.page-title {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
  color: white;
}

.page-title .container {
  position: relative;
  z-index: 10;
}

.page-title h1 {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 15px;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  animation: titleSlideDown 0.8s ease;
}

.page-title p {
  font-size: 20px;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
  opacity: 0.95;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: titleSlideUp 0.8s ease 0.2s both;
}

/* Animatsiyalar */
@keyframes titleSlideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* SAHIFALARGA MOS RANGLAR */

/* Yangiliklar sahifasi */
.page-title.news-title {
  background: linear-gradient(135deg, #2563eb, #7c3aed, #db2777);
}

/* Loyihalar sahifasi */
.page-title.projects-title {
  background: linear-gradient(135deg, #059669, #10b981, #34d399);
}

/* Testlar sahifasi */
.page-title.test-title {
  background: linear-gradient(135deg, #d97706, #f59e0b, #fbbf24);
}

/* Aloqa sahifasi */
.page-title.contact-title {
  background: linear-gradient(135deg, #7c3aed, #8b5cf6, #a78bfa);
}

/* ORQA FON EFFEKTLARI (barcha sahifalar uchun bir xil) */

/* Geometrik shakllar */
.page-title::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s ease-in-out infinite;
  z-index: 1;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: -50%;
  right: -10%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: floatReverse 25s ease-in-out infinite;
  z-index: 1;
}

/* Floating element */
.page-title .floating-element {
  position: absolute;
  top: 20%;
  left: 5%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 15s ease-in-out infinite reverse;
  z-index: 1;
}

/* Chiziqli naqsh */
.page-title .pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M10,50 Q30,30 50,50 T90,50" stroke="rgba(255,255,255,0.05)" fill="none" stroke-width="2"/></svg>');
  background-size: 50px 50px;
  animation: movePattern 30s linear infinite;
  z-index: 1;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(30px, -30px) rotate(10deg);
  }
}

@keyframes floatReverse {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(-30px, 30px) rotate(-10deg);
  }
}

@keyframes movePattern {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 100px 100px;
  }
}

/* MOBIL VERSIYA */
@media (max-width: 768px) {
  .page-title {
    padding: 60px 0 40px;
  }
  
  .page-title h1 {
    font-size: 36px;
  }
  
  .page-title p {
    font-size: 18px;
    padding: 0 20px;
  }
  
  .page-title::before,
  .page-title::after,
  .page-title .floating-element {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 480px) {
  .page-title {
    padding: 50px 0 30px;
  }
  
  .page-title h1 {
    font-size: 28px;
  }
  
  .page-title p {
    font-size: 16px;
  }
  
  .page-title::before,
  .page-title::after,
  .page-title .floating-element {
    width: 150px;
    height: 150px;
  }
}

/* DARK MODE */
body.dark .page-title::before,
body.dark .page-title::after,
body.dark .page-title .floating-element {
  opacity: 0.2;
}

/* ===== NEWS SECTION ===== */
.news {
  padding: 80px 0;
  background: var(--bg-primary);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 30px;
}

.news-card {
  background: var(--white);
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base) var(--transition-bounce);
  position: relative;
}

.news-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-2xl), 0 0 0 2px var(--primary-light);
}

.news-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform var(--transition-slow) ease;
}

.news-card:hover img {
  transform: scale(1.1);
}

.news-body {
  padding: 25px;
  position: relative;
}

.news-body::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 25px;
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: 50%;
  border: 4px solid var(--white);
}

.news-body h3 {
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
  padding-top: 10px;
}

.news-body p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 15px;
}

.news-body time {
  display: inline-block;
  font-size: 14px;
  color: var(--text-muted);
  background: var(--gray-100);
  padding: 5px 12px;
  border-radius: var(--border-radius-full);
}

/* ===== PROJECTS SECTION ===== */
.projects {
  padding: 80px 0;
  background: linear-gradient(135deg, #f6f9fc 0%, #edf2f9 100%);
  position: relative;
  overflow: hidden;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 30px;
}

.project-card {
  background: var(--white);
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base) var(--transition-bounce);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-mixed);
  background-size: 200% 100%;
  animation: gradientMove 3s ease infinite;
  z-index: 1;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.project-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-2xl), 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.project-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform var(--transition-slow) ease;
}

.project-card:hover img {
  transform: scale(1.08);
}

.project-body {
  padding: 25px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.project-body h3 {
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

.project-body h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--gradient-primary);
  transition: width var(--transition-base) ease;
  border-radius: var(--border-radius-full);
}

.project-card:hover h3::after {
  width: 60px;
}

.project-body p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 20px;
  flex: 1;
}

.project-body .btn {
  align-self: center;
  background: var(--gradient-primary);
  color: var(--white);
  padding: 10px 24px;
  font-size: 14px;
}

/* ============================================
   TEST BO'LIMI STILLARI
   ============================================ */

.test-section {
  padding: 60px 0 100px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  min-height: 80vh;
  position: relative;
  overflow: hidden;
}

.test-section::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.03) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
}

.test-section::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.03) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
}

/* Section Header */
.test-section .section-header {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
  z-index: 1;
}

.test-section .section-title {
  font-size: 42px;
  font-weight: 700;
  background: linear-gradient(135deg, #2563eb, #7c3aed, #db2777);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.test-section .section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #7c3aed, #db2777);
  border-radius: 2px;
}

.test-section .section-description {
  font-size: 18px;
  color: #4b5563;
  max-width: 600px;
  margin: 20px auto 0;
}

/* Class Selector (dars jadvalidagidek) */
.test-section .class-selector {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: 0 20px 40px -15px rgba(37, 99, 235, 0.2);
  position: relative;
  z-index: 1;
}

.test-section .selector-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
}

.test-section .label-icon {
  font-size: 28px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.3);
}

.test-section .class-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.test-section .class-btn {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 40px;
  padding: 14px 28px;
  font-size: 17px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 100px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.test-section .class-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #2563eb, #7c3aed, #db2777);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.test-section .class-btn:hover {
  transform: translateY(-3px);
  border-color: transparent;
  color: white;
  box-shadow: 0 15px 25px -8px rgba(37, 99, 235, 0.4);
}

.test-section .class-btn:hover::before {
  opacity: 1;
}

.test-section .class-btn.active {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border-color: transparent;
  color: white;
  box-shadow: 0 15px 25px -8px rgba(37, 99, 235, 0.4);
}

/* Subjects Grid */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
  position: relative;
  z-index: 1;
}

.subject-card {
  background: white;
  border-radius: 20px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.1);
}

.subject-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #7c3aed, #db2777);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.subject-card:hover::before {
  transform: translateX(0);
}

.subject-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: #2563eb;
  box-shadow: 0 20px 30px -10px rgba(37, 99, 235, 0.3);
}

.subject-icon {
  font-size: 48px;
  margin-bottom: 15px;
  display: inline-block;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  width: 80px;
  height: 80px;
  line-height: 80px;
  text-align: center;
  border-radius: 50%;
  color: white;
  box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.3);
}

.subject-card h3 {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 10px;
}

.subject-card p {
  color: #4b5563;
  font-size: 15px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.subject-info {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 15px;
}

.subject-info span {
  background: #f1f5f9;
  padding: 6px 15px;
  border-radius: 30px;
  font-size: 14px;
  color: #2563eb;
  font-weight: 500;
}

/* Large Test Card */
.subject-card.large-test {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  grid-column: span 2;
}

.subject-card.large-test h3,
.subject-card.large-test p {
  color: white;
}

.subject-card.large-test .subject-icon {
  background: white;
  color: #2563eb;
}

.subject-card.large-test .subject-info span {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Student Info Form */
.student-info-form {
  max-width: 500px;
  margin: 40px auto;
  position: relative;
  z-index: 1;
  animation: slideUp 0.5s ease;
}

.form-card {
  background: white;
  border-radius: 30px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(37, 99, 235, 0.25);
  border: 1px solid rgba(37, 99, 235, 0.1);
}

.form-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
}

.form-icon {
  font-size: 32px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
}

.form-header h3 {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.input-group {
  margin-bottom: 25px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  color: #1e293b;
  font-weight: 600;
  font-size: 16px;
}

.input-group input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 15px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #f8fafc;
}

.input-group input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  background: white;
}

.form-actions {
  display: flex;
  gap: 15px;
  margin-top: 35px;
}

.btn {
  padding: 14px 28px;
  border: none;
  border-radius: 40px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -8px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  background: #f1f5f9;
  color: #1e293b;
  border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
}

/* Test Container */
.test-container {
  background: white;
  border-radius: 30px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(37, 99, 235, 0.25);
  margin-top: 30px;
  animation: slideUp 0.5s ease;
  position: relative;
  z-index: 1;
}

.test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f1f5f9;
  flex-wrap: wrap;
  gap: 15px;
}

.test-header h2 {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.test-progress {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #f8fafc;
  padding: 10px 20px;
  border-radius: 40px;
  border: 1px solid #e2e8f0;
}

.progress-bar {
  width: 150px;
  height: 10px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #7c3aed, #db2777);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.test-timer {
  font-size: 18px;
  font-weight: 600;
  color: #2563eb;
  background: #f8fafc;
  padding: 10px 20px;
  border-radius: 40px;
  border: 1px solid #e2e8f0;
}

.exit-btn {
  background: #fee2e2;
  color: #ef4444;
  border: 2px solid #fecaca;
  padding: 10px 20px;
  border-radius: 40px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.exit-btn:hover {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
  transform: translateY(-2px);
}

/* Question Container */
.question-container {
  margin-bottom: 30px;
}

.question-card {
  background: #f8fafc;
  border-radius: 20px;
  padding: 30px;
  border: 2px solid #e2e8f0;
}

.question-number {
  display: inline-block;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 20px;
}

.question-text {
  font-size: 22px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 30px;
  line-height: 1.5;
}

.answers-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.answer-option {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 15px;
  padding: 18px 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 15px;
}

.answer-option:hover {
  border-color: #2563eb;
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(37, 99, 235, 0.1);
}

.answer-option input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: #2563eb;
}

.answer-option.selected {
  border-color: #2563eb;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(124, 58, 237, 0.05));
}

.answer-option.correct {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.answer-option.incorrect {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* Test Navigation */
.test-navigation {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

.nav-btn {
  padding: 14px 32px;
  border: none;
  border-radius: 40px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.prev-btn {
  background: #f1f5f9;
  color: #1e293b;
  border: 2px solid #e2e8f0;
}

.prev-btn:hover:not(:disabled) {
  background: #e2e8f0;
  transform: translateX(-3px);
}

.next-btn {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.3);
}

.next-btn:hover {
  transform: translateX(3px);
  box-shadow: 0 15px 25px -8px rgba(37, 99, 235, 0.4);
}

.finish-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.3);
}

.finish-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 25px -8px rgba(16, 185, 129, 0.4);
}

.nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Results Container */
.results-container {
  max-width: 700px;
  margin: 40px auto;
  position: relative;
  z-index: 1;
  animation: scaleIn 0.5s ease;
}

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

.results-card {
  background: white;
  border-radius: 30px;
  padding: 50px;
  box-shadow: 0 25px 50px -12px rgba(37, 99, 235, 0.3);
  text-align: center;
  border: 1px solid rgba(37, 99, 235, 0.1);
}

.results-header {
  margin-bottom: 30px;
}

.results-icon {
  font-size: 64px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 auto 20px;
  color: white;
  box-shadow: 0 15px 30px -8px rgba(37, 99, 235, 0.3);
}

.results-header h2 {
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.score-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.score-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 36px;
  font-weight: 700;
  box-shadow: 0 20px 30px -10px rgba(37, 99, 235, 0.3);
  position: relative;
}

.score-circle::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  opacity: 0.3;
  z-index: -1;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.1); opacity: 0.5; }
}

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

.score-details p {
  font-size: 18px;
  margin-bottom: 12px;
  color: #1e293b;
}

.score-details strong {
  color: #2563eb;
  font-size: 24px;
  margin-left: 8px;
}

/* Results Analysis */
.results-analysis {
  background: #f8fafc;
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 30px;
}

.results-analysis h3 {
  font-size: 22px;
  color: #1e293b;
  margin-bottom: 20px;
  text-align: left;
}

.analysis-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.analysis-item .label {
  min-width: 120px;
  font-weight: 600;
  color: #1e293b;
}

.analysis-item .progress-bar {
  flex: 1;
  height: 20px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.correct-bar {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.incorrect-bar {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.analysis-item span:last-child {
  min-width: 50px;
  font-weight: 600;
  color: #2563eb;
}

/* Results Message */
.results-message {
  margin: 30px 0;
  padding: 20px;
  border-radius: 15px;
  font-size: 18px;
  font-weight: 600;
}

.results-message.excellent {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.results-message.good {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

.results-message.average {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.results-message.poor {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

/* Results Actions */
.results-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.action-btn {
  padding: 14px 28px;
  border: none;
  border-radius: 40px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.restart-btn {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.3);
}

.restart-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px -8px rgba(37, 99, 235, 0.4);
}

.back-btn {
  background: #f1f5f9;
  color: #1e293b;
  border: 2px solid #e2e8f0;
}

.back-btn:hover {
  background: #e2e8f0;
  transform: translateY(-3px);
}

.details-btn {
  background: #10b981;
  color: white;
  box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.3);
}

.details-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px -8px rgba(16, 185, 129, 0.4);
}

/* Detailed Results Modal */
.detailed-results {
  background: white;
  border-radius: 20px;
  padding: 30px;
  max-height: 500px;
  overflow-y: auto;
}

.detailed-results h3 {
  font-size: 24px;
  color: #2563eb;
  margin-bottom: 20px;
}

.result-item {
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 15px;
  border-left: 4px solid;
}

.result-item.correct {
  background: rgba(16, 185, 129, 0.1);
  border-left-color: #10b981;
}

.result-item.incorrect {
  background: rgba(239, 68, 68, 0.1);
  border-left-color: #ef4444;
}

.result-item p {
  margin: 8px 0;
  color: #1e293b;
}

/* Dark Mode */
body.dark .test-section {
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

body.dark .test-section .section-description {
  color: #94a3b8;
}

body.dark .test-section .class-selector {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(37, 99, 235, 0.2);
}

body.dark .test-section .selector-label {
  color: #f1f5f9;
}

body.dark .test-section .class-btn {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

body.dark .subject-card {
  background: #1e293b;
}

body.dark .subject-card h3 {
  color: #f1f5f9;
}

body.dark .subject-card p {
  color: #94a3b8;
}

body.dark .subject-info span {
  background: #2d3a4f;
  color: #60a5fa;
}

body.dark .form-card {
  background: #1e293b;
}

body.dark .input-group label {
  color: #f1f5f9;
}

body.dark .input-group input {
  background: #2d3a4f;
  border-color: #334155;
  color: white;
}

body.dark .test-container {
  background: #1e293b;
}

body.dark .test-header {
  border-bottom-color: #334155;
}

body.dark .test-progress {
  background: #2d3a4f;
  border-color: #334155;
}

body.dark .question-card {
  background: #2d3a4f;
  border-color: #334155;
}

body.dark .question-text {
  color: #f1f5f9;
}

body.dark .answer-option {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

body.dark .results-card {
  background: #1e293b;
}

body.dark .score-details p {
  color: #f1f5f9;
}

body.dark .results-analysis {
  background: #2d3a4f;
}

body.dark .analysis-item .label {
  color: #f1f5f9;
}

/* Responsive */
@media (max-width: 768px) {
  .test-section .section-title {
    font-size: 32px;
  }
  
  .subjects-grid {
    grid-template-columns: 1fr;
  }
  
  .subject-card.large-test {
    grid-column: span 1;
  }
  
  .test-header {
    flex-direction: column;
    text-align: center;
  }
  
  .test-progress {
    width: 100%;
    justify-content: center;
  }
  
  .progress-bar {
    width: 100%;
  }
  
  .score-display {
    flex-direction: column;
    gap: 20px;
  }
  
  .score-details {
    text-align: center;
  }
  
  .results-actions {
    flex-direction: column;
  }
  
  .action-btn {
    width: 100%;
    justify-content: center;
  }
  
  .form-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .test-section .class-btn {
    padding: 12px 18px;
    font-size: 15px;
    min-width: 70px;
  }
  
  .test-container {
    padding: 20px;
  }
  
  .question-text {
    font-size: 18px;
  }
  
  .answer-option {
    padding: 15px 20px;
  }
  
  .results-card {
    padding: 30px 20px;
  }
  
  .score-circle {
    width: 120px;
    height: 120px;
    font-size: 28px;
  }
}

/* Question Styles */
.question-container {
  margin-bottom: 30px;
}

.question {
  background: var(--gray-50);
  padding: 30px;
  border-radius: var(--border-radius-lg);
  margin-bottom: 25px;
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-md);
}

.question-number {
  display: inline-block;
  background: var(--gradient-primary);
  color: var(--white);
  padding: 5px 15px;
  border-radius: var(--border-radius-full);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 15px;
}

.question h3 {
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 25px;
  line-height: 1.6;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.answer-option {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--border-radius-md);
  padding: 15px 20px;
  cursor: pointer;
  transition: all var(--transition-base) ease;
  display: flex;
  align-items: center;
  gap: 15px;
}

.answer-option:hover {
  border-color: var(--primary);
  background: var(--gray-50);
  transform: translateX(5px);
}

.answer-option input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}

.answer-option.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(236, 72, 153, 0.05));
}

.answer-option.correct {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.1);
}

.answer-option.incorrect {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

/* Test Navigation */
.test-navigation {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

/* Student Info Form */
.student-info-form {
  max-width: 500px;
  margin: 0 auto;
}

.form-container {
  background: var(--white);
  border-radius: var(--border-radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-2xl);
  text-align: center;
}

.form-container h2 {
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 30px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.input-group {
  margin-bottom: 25px;
  text-align: left;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
}

.input-group input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--gray-200);
  border-radius: var(--border-radius-md);
  font-size: 15px;
  transition: all var(--transition-base) ease;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

/* Results Container */
.results-container {
  max-width: 800px;
  margin: 0 auto;
}

.results-card {
  background: var(--white);
  border-radius: var(--border-radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-2xl);
  text-align: center;
}

.results-header h2 {
  color: var(--text-primary);
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 30px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.score-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 32px;
  font-weight: 700;
  box-shadow: var(--shadow-2xl);
  position: relative;
}

.score-circle::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50%;
  background: var(--gradient-primary);
  opacity: 0.3;
  z-index: -1;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.1); opacity: 0.5; }
}

.score-details p {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.score-details strong {
  color: var(--primary);
  font-size: 24px;
}

.results-analysis {
  text-align: left;
  margin-bottom: 40px;
}

.results-analysis h3 {
  color: var(--text-primary);
  margin-bottom: 20px;
  font-size: 24px;
  font-weight: 600;
}

.analysis-item {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 15px;
}

.analysis-item .label {
  min-width: 120px;
  font-weight: 600;
  color: var(--text-primary);
}

.bar {
  flex: 1;
  height: 30px;
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  padding: 0 15px;
  color: var(--white);
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.bar.correct {
  background: var(--gradient-cool);
}

.bar.incorrect {
  background: var(--gradient-warm);
}

.results-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* ============================================
   DARS JADVALI - YANGILANGAN (DINAMIK USTUNLAR)
   ============================================ */

.schedule {
  padding: 80px 0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  position: relative;
}

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

.section-title {
  font-size: 42px;
  font-weight: 700;
  background: linear-gradient(135deg, #2563eb, #7c3aed, #db2777);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #7c3aed, #db2777);
  border-radius: 2px;
}

.section-description {
  font-size: 18px;
  color: #4b5563;
  max-width: 600px;
  margin: 20px auto 0;
}

/* Sinf tanlash */
.class-selector {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: 0 20px 40px -15px rgba(37, 99, 235, 0.2);
}

.selector-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
}

.label-icon {
  font-size: 28px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.3);
}

.class-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.class-btn {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 40px;
  padding: 14px 28px;
  font-size: 17px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 100px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.class-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #2563eb, #7c3aed, #db2777);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.class-btn:hover {
  transform: translateY(-3px);
  border-color: transparent;
  color: white;
  box-shadow: 0 15px 25px -8px rgba(37, 99, 235, 0.4);
}

.class-btn:hover::before {
  opacity: 1;
}

.class-btn.active {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border-color: transparent;
  color: white;
  box-shadow: 0 15px 25px -8px rgba(37, 99, 235, 0.4);
}

/* Jadval konteyneri */
.schedule-container {
  margin-bottom: 40px;
  min-height: 400px;
  animation: fadeIn 0.5s ease;
  overflow-x: auto;
}

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

/* Dars jadvali - DINAMIK USTUNLAR UCHUN */
.schedule-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  background: transparent;
  min-width: 500px;
}

.schedule-table thead tr {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.schedule-table th {
  color: white;
  font-weight: 600;
  font-size: 16px;
  padding: 18px 15px;
  text-align: center;
  position: relative;
  border: none;
  white-space: nowrap;
}

.schedule-table th:first-child {
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
}

.schedule-table th:last-child {
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
}

.schedule-table tbody tr {
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
}

.schedule-table tbody tr:hover {
  transform: scale(1.01) translateY(-2px);
  box-shadow: 0 15px 30px -10px rgba(37, 99, 235, 0.2);
}

.schedule-table td {
  padding: 16px 15px;
  text-align: center;
  color: #4b5563;
  font-size: 15px;
  border: none;
  background: white;
  white-space: nowrap;
}

.schedule-table td:first-child {
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
  font-weight: 700;
  color: #2563eb;
  background: linear-gradient(135deg, #f8fafc, white);
  border-left: 4px solid #2563eb;
}

.schedule-table td:last-child {
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
}

/* Fanlar uchun rangli stillar */
.schedule-table td[data-lesson="matematika"] { color: #2563eb; font-weight: 500; }
.schedule-table td[data-lesson="ona-tili"] { color: #7c3aed; font-weight: 500; }
.schedule-table td[data-lesson="adabiyot"] { color: #7c3aed; font-weight: 500; }
.schedule-table td[data-lesson="ingliz-tili"] { color: #db2777; font-weight: 500; }
.schedule-table td[data-lesson="fizika"] { color: #10b981; font-weight: 500; }
.schedule-table td[data-lesson="kimyo"] { color: #f59e0b; font-weight: 500; }
.schedule-table td[data-lesson="biologiya"] { color: #84cc16; font-weight: 500; }
.schedule-table td[data-lesson="tarix"] { color: #ef4444; font-weight: 500; }
.schedule-table td[data-lesson="geografiya"] { color: #06b6d4; font-weight: 500; }
.schedule-table td[data-lesson="informatika"] { color: #8b5cf6; font-weight: 500; }
.schedule-table td[data-lesson="texnologiya"] { color: #a855f7; font-weight: 500; }
.schedule-table td[data-lesson="jismoniy-tarbiya"] { color: #14b8a6; font-weight: 500; }

/* Qo'shimcha ma'lumot */
.schedule-footer {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 50px;
  flex-wrap: wrap;
}

.info-item {
  background: white;
  padding: 12px 28px;
  border-radius: 40px;
  box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.info-item:hover {
  transform: translateY(-3px);
  border-color: #2563eb;
  box-shadow: 0 15px 25px -8px rgba(37, 99, 235, 0.2);
}

.info-icon {
  font-size: 22px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
}

/* Dark mode */
body.dark .schedule {
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

body.dark .section-description {
  color: #94a3b8;
}

body.dark .class-selector {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(37, 99, 235, 0.2);
}

body.dark .selector-label {
  color: #f1f5f9;
}

body.dark .class-btn {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

body.dark .class-btn:hover,
body.dark .class-btn.active {
  color: white;
}

body.dark .schedule-table tbody tr {
  background: #1e293b;
}

body.dark .schedule-table td {
  background: #1e293b;
  color: #cbd5e1;
}

body.dark .schedule-table td:first-child {
  background: #2d3a4f;
  color: #60a5fa;
}

body.dark .info-item {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

/* Responsive */
@media (max-width: 768px) {
  .section-title {
    font-size: 32px;
  }
  
  .class-selector {
    padding: 20px;
  }
  
  .class-btn {
    padding: 12px 20px;
    font-size: 15px;
    min-width: 80px;
  }
  
  .schedule-table {
    font-size: 14px;
    min-width: 400px;
  }
  
  .schedule-table th,
  .schedule-table td {
    padding: 12px 8px;
  }
  
  .schedule-footer {
    gap: 15px;
  }
  
  .info-item {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .info-icon {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 28px;
  }
  
  .class-buttons {
    gap: 10px;
  }
  
  .class-btn {
    padding: 10px 16px;
    font-size: 14px;
    min-width: 70px;
  }
  
  .schedule-table {
    font-size: 12px;
    min-width: 350px;
  }
  
  .schedule-table th,
  .schedule-table td {
    padding: 10px 4px;
  }
  
  .info-item {
    width: 100%;
    justify-content: center;
  }
}

/* ===== CONTACT SECTION ===== */
.contact {
  padding: 80px 0;
  background: linear-gradient(135deg, #f6f9fc 0%, #edf2f9 100%);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 40px;
}

.contact-form,
.contact-info {
  background: var(--white);
  border-radius: var(--border-radius-xl);
  padding: 35px;
  box-shadow: var(--shadow-xl);
  transition: transform var(--transition-base) ease;
}

.contact-form:hover,
.contact-info:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-2xl);
}

.contact-form h2,
.contact-info h2 {
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 25px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Form */
form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 15px;
}

input,
textarea {
  padding: 14px 18px;
  border: 2px solid var(--gray-200);
  border-radius: var(--border-radius-md);
  font-size: 15px;
  font-family: inherit;
  transition: all var(--transition-base) ease;
  background: var(--white);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* Contact Info */
.contact-info ul {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
}

.contact-info li {
  font-size: 16px;
  margin-bottom: 18px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-info li strong {
  color: var(--primary);
  min-width: 80px;
}

.contact-info a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-base) ease;
  word-break: break-all;
}

.contact-info a:hover {
  color: var(--secondary);
  text-decoration: underline;
}

/* Map */
.map {
  margin-top: 25px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.map iframe {
  width: 100%;
  height: 300px;
  border: none;
  display: block;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 40px 0 20px;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-mixed);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.footer p {
  color: var(--gray-400);
  font-size: 14px;
}

.footer address {
  font-style: normal;
  text-align: right;
}

.footer address p {
  color: var(--gray-300);
  margin: 5px 0;
}

.footer address p:first-child {
  color: var(--primary-light);
}

/* ===== DARK MODE ===== */
body.dark {
  --bg-primary: #0f172a;
  --white: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --gray-100: #1e293b;
  --gray-200: #334155;
  --gray-300: #475569;
  --gray-400: #64748b;
  --gray-500: #94a3b8;
}

body.dark .header {
  background: rgba(15, 23, 42, 0.85);
  border-bottom-color: rgba(99, 102, 241, 0.2);
}

body.dark .search-box {
  background: var(--gray-200);
  border-color: var(--gray-300);
  color: var(--text-primary);
}

body.dark .news-card,
body.dark .project-card,
body.dark .test-card,
body.dark .form-container,
body.dark .contact-form,
body.dark .contact-info,
body.dark .test-container {
  background: #1e293b;
  border-color: #334155;
}

body.dark .question {
  background: #0f172a;
}

body.dark .answer-option {
  background: #1e293b;
  border-color: #334155;
}

body.dark .answer-option:hover {
  background: #2d3a4f;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .hero-text h1 {
    font-size: 40px;
  }
  
  .test-card.large-test {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 15px;
  }
  
  .nav {
    margin: 0;
  }
  
  .nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
  }
  
  .nav ul li a {
    padding: 8px 14px;
    font-size: 14px;
  }
  
  .nav-tools {
    width: 100%;
    justify-content: center;
  }
  
  .hero-content {
    flex-direction: column;
    text-align: center;
  }
  
  .hero-text h1 {
    font-size: 32px;
  }
  
  .hero-img img {
    width: 250px;
  }
  
  .page-title h1 {
    font-size: 32px;
  }
  
  .news-grid,
  .projects-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .test-header {
    flex-direction: column;
    text-align: center;
  }
  
  .test-progress {
    flex-direction: column;
    width: 100%;
  }
  
  .progress-bar {
    width: 100%;
  }
  
  .score-display {
    flex-direction: column;
    gap: 20px;
  }
  
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  
  .footer address {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    width: 95%;
  }
  
  .hero {
    padding: 60px 0;
  }
  
  .hero-text h1 {
    font-size: 28px;
  }
  
  .hero-text p {
    font-size: 16px;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .page-title {
    padding: 60px 0 40px;
  }
  
  .page-title h1 {
    font-size: 28px;
  }
  
  .page-title p {
    font-size: 16px;
  }
  
  .news-body,
  .project-body,
  .form-container,
  .contact-form,
  .contact-info {
    padding: 20px;
  }
  
  .lesson-table {
    font-size: 13px;
  }
  
  .lesson-table th,
  .lesson-table td {
    padding: 8px 4px;
  }
  
  .analysis-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .analysis-item .label {
    min-width: auto;
  }
  
  .bar {
    width: 100%;
  }
}

/* ===== ANIMATION CLASSES ===== */
.fade-in {
  animation: fadeIn 1s ease;
}

.slide-up {
  animation: slideUp 0.8s ease;
}

.slide-in-right {
  animation: slideInRight 0.8s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== UTILITY CLASSES ===== */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-gradient {
  background: var(--gradient-mixed);
}

.shadow-colored {
  box-shadow: var(--shadow-colored);
}

.rounded-full {
  border-radius: var(--border-radius-full);
}

.rounded-lg {
  border-radius: var(--border-radius-lg);
}

.rounded-xl {
  border-radius: var(--border-radius-xl);
}

/* Kutubxona sahifasi uchun rang */
.page-title.library-title {
  background: linear-gradient(135deg, #8b5cf6, #06b6d4, #10b981);
}
