* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 2px solid #eee;
  margin-bottom: 2rem;
}

.nav-home {
  font-size: 1.3rem;
  font-weight: 700;
  color: #2c3e50;
  text-decoration: none;
}

.nav-home:hover {
  color: #3498db;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: #666;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: #3498db;
}

.page-content p {
  margin-bottom: 1.25rem;
}

h1, h2, h3 {
  margin-bottom: 0.5rem;
}

.page-content h2 {
  margin-top: 2.5rem;
}

.page-content h3 {
  margin-top: 2rem;
}

.page-content h2 + p,
.page-content h3 + p {
  margin-top: 0;
}

.lesson-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #eee;
}

.lesson-header h1 {
  font-size: 2rem;
  color: #1a1a1a;
}

.lang-labels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
  font-weight: bold;
  color: #666;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.5rem;
  padding: 0.75rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.pair:hover {
  background-color: #f8f9fa;
}

.pair:nth-child(even) {
  background-color: #fafbfc;
}

.pair:nth-child(even):hover {
  background-color: #f0f2f5;
}

.col-primary,
.col-secondary {
  padding: 0.25rem 0.5rem;
}

.col-primary {
  border-right: 1px solid #e0e0e0;
}

.audio-players {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.audio-player {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.audio-player audio {
  width: 100%;
  height: 2.5rem;
}

.audio-lang {
  font-size: 0.8rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lesson-image {
  text-align: center;
  margin: 1rem 0 1.5rem;
}

.lesson-image img {
  width: 70%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: #2980b9;
  text-decoration: none;
  font-size: 0.95rem;
}

.back-link:hover {
  text-decoration: underline;
  color: #1a5276;
}

.lang-pair-section {
  margin-bottom: 2rem;
}

.lang-pair-section h2 {
  font-size: 1.4rem;
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 0.4rem;
  margin-bottom: 0.8rem;
}

.lang-pair-section ul {
  list-style: none;
  padding: 0;
}

.lang-pair-section li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.lang-pair-section li:last-child {
  border-bottom: none;
}

.lang-pair-section a {
  text-decoration: none;
  color: #2980b9;
  font-size: 1.1rem;
}

.lang-pair-section a:hover {
  text-decoration: underline;
  color: #1a5276;
}

.subtitle {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 2rem;
}

.lang-pair-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.lang-pair-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s;
}

.lang-pair-card:hover {
  border-color: #3498db;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
  transform: translateY(-2px);
}

.flag-pair {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.flag {
  width: 48px;
  height: 36px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.lang-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.lesson-count {
  font-size: 0.85rem;
  color: #888;
}

.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.difficulty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s;
}

.difficulty-card:hover {
  border-color: #3498db;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
  transform: translateY(-2px);
}

.difficulty-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.breadcrumb {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #2980b9;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.lesson-list {
  list-style: none;
  padding: 0;
}

.lesson-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

.lesson-list li:last-child {
  border-bottom: none;
}

.lesson-list a {
  text-decoration: none;
  color: #2980b9;
  font-size: 1.1rem;
}

.lesson-list a:hover {
  text-decoration: underline;
  color: #1a5276;
}

@media (max-width: 768px) {
  .pair {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .col-primary {
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.5rem;
    margin-bottom: 0.25rem;
  }

  .lang-labels {
    grid-template-columns: 1fr;
  }

  .lang-pair-grid {
    grid-template-columns: 1fr;
  }

  .audio-players {
    grid-template-columns: 1fr;
  }

  .difficulty-grid {
    grid-template-columns: 1fr;
  }

  .lesson-image img {
    width: 90%;
  }
}
