* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: rgba(1, 50, 46, 0.98);
  --primary-gradient: linear-gradient(135deg, rgba(1, 50, 46, 0.98) 0%, rgba(1, 50, 46, 0.75) 25%, rgba(1, 50, 46, 0.5) 100%);
  --text-light: #ffffff;
  --text-dark: #000000;
  --bg-light: #ffffff;
  --bg-dark: #000000;
  --card-bg-light: #f5f5f5;
  --card-bg-dark: #1a1a1a;
  --border-light: #e0e0e0;
  --border-dark: #333333;
}

body {
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  text-align: right;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.light-mode {
  background: var(--primary-gradient);
  color: #2c2c2c;
}

body.dark-mode {
  background: var(--bg-dark);
  color: var(--text-light);
}

.hidden {
  display: none !important;
}

/* Logo Styles */
.logo-container {
  position: relative;
  display: inline-block;
}

.logo-small {
  width: 80px;
  height: 80px;
}

.logo-medium {
  width: 200px;
  height: 200px;
}

.logo-large {
  width: 300px;
  height: 300px;
}

.logo-outer-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(1, 50, 46, 0.98);
  border: 8px solid rgba(1, 50, 46, 0.98);
  overflow: hidden;
  z-index: 1;
}

.greek-key-pattern {
  width: 100%;
  height: 100%;
  opacity: 0.3;
}

.logo-inner-circle {
  position: relative;
  width: 85%;
  height: 85%;
  border-radius: 50%;
  background: rgba(1, 50, 46, 0.98);
  margin: 7.5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.logo-inner-circle::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.logo-crown {
  margin-top: 8%;
  margin-bottom: 2%;
  z-index: 3;
}

.crown-svg {
  width: 40px;
  height: 25px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.logo-small .crown-svg {
  width: 20px;
  height: 12px;
}

.logo-est {
  font-size: 0.5rem;
  color: white;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 3%;
  z-index: 3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.logo-small .logo-est {
  font-size: 0.35rem;
}

.logo-large .logo-est {
  font-size: 0.7rem;
}

.logo-arabic-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  margin-bottom: 3%;
  z-index: 3;
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.5),
    0 0 10px rgba(255, 255, 255, 0.2);
  letter-spacing: 0.05em;
  font-family: 'Cairo', sans-serif;
  position: relative;
}

.logo-small .logo-arabic-name {
  font-size: 1rem;
}

.logo-large .logo-arabic-name {
  font-size: 2.5rem;
}

.logo-app {
  font-size: 0.6rem;
  color: white;
  letter-spacing: 0.2em;
  font-weight: 600;
  margin-bottom: 3%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.3em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.logo-small .logo-app {
  font-size: 0.4rem;
}

.logo-large .logo-app {
  font-size: 0.8rem;
}

.logo-star {
  font-size: 0.8em;
  opacity: 0.9;
}

.logo-english-training {
  font-size: 0.45rem;
  color: white;
  letter-spacing: 0.15em;
  font-weight: 600;
  margin-bottom: 5%;
  z-index: 3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  transform: scaleY(0.9);
}

.logo-small .logo-english-training {
  font-size: 0.3rem;
}

.logo-large .logo-english-training {
  font-size: 0.6rem;
}

.logo-image {
  object-fit: contain;
  display: block;
}

.logo-small-img {
  width: 80px;
  height: 80px;
}

.logo-medium-img {
  width: 200px;
  height: 200px;
}

.logo-large-img {
  width: 300px;
  height: 300px;
  animation: float 2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.navbar.light {
  background: #f5f0e8;
  border-bottom: 2px solid rgba(1, 50, 46, 0.2);
}

.navbar.dark {
  background: #000000;
  border-bottom: 2px solid #000000;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.nav-links {
  display: flex;
  gap: 2rem;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  background: rgba(1, 50, 46, 0.1);
}

body.dark-mode .nav-links a:hover {
  background: #000000;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.instagram-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.instagram-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.instagram-link:hover {
  transform: scale(1.1);
}

.instagram-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

body.dark-mode .instagram-icon {
  filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.1));
}

.theme-toggle {
  background: none;
  border: 2px solid rgba(1, 50, 46, 0.3);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  border-color: rgba(1, 50, 46, 0.98);
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(1, 50, 46, 0.3);
}

/* Home Page */
.home {
  min-height: 100vh;
  padding: 2rem;
  transition: all 0.3s ease;
}

.hero-section {
  text-align: center;
  padding: 4rem 2rem;
  margin-bottom: 3rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark-mode .hero-title {
  color: rgba(1, 50, 46, 0.98);
  text-shadow: 0 0 20px rgba(1, 50, 46, 0.5);
}

.hero-subtitle {
  font-size: 1.3rem;
  opacity: 0.9;
  max-width: 800px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.feature-card {
  background: #f5f0e8;
  padding: 2rem;
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(1, 50, 46, 0.2);
}

body.dark-mode .feature-card {
  background: #000000;
  border-color: #000000;
  color: #fff;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(1, 50, 46, 0.3);
  border-color: rgba(1, 50, 46, 0.98);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: rgba(1, 50, 46, 0.98);
}

body.dark-mode .feature-card h3 {
  color: rgba(1, 50, 46, 0.98);
  text-shadow: 0 0 10px rgba(1, 50, 46, 0.5);
}

.feature-card p {
  opacity: 0.8;
  line-height: 1.6;
}

.lessons-section {
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
  color: rgba(1, 50, 46, 0.98);
}

body.dark-mode .section-title {
  text-shadow: 0 0 15px rgba(1, 50, 46, 0.5);
}

.lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
}

.lesson-card {
  background: #f5f0e8;
  padding: 1.5rem;
  border-radius: 15px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(1, 50, 46, 0.2);
  text-align: center;
}

body.dark-mode .lesson-card {
  background: #000000;
  border-color: #000000;
  color: #fff;
}

.lesson-card:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(1, 50, 46, 0.4);
  border-color: rgba(1, 50, 46, 0.98);
}

.lesson-number {
  font-size: 1.2rem;
  font-weight: 700;
  color: rgba(1, 50, 46, 0.98);
  margin-bottom: 0.5rem;
}

body.dark-mode .lesson-number {
  text-shadow: 0 0 10px rgba(1, 50, 46, 0.5);
}

.lesson-title {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.lesson-words {
  font-size: 0.9rem;
  opacity: 0.6;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .lessons-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  
  .nav-container {
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-around;
    gap: 0.5rem;
  }
  
  .nav-links a {
    font-size: 0.9rem;
    padding: 0.4rem 0.6rem;
  }
}
