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

:root {
  --primary-color: #4f46e5;
  --secondary-color: #10b981;
  --danger-color: #ef4444;
  --dark-color: #1f2937;
  --light-color: #f9fafb;
  --gray-color: #6b7280;
  --border-color: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --radius: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, Tahoma, Geneva, Verdana, sans-serif;
  color: var(--dark-color);
  line-height: 1.6;
  background-color: #ffffff;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ====================== ОБЩИЕ СТИЛИ ====================== */

button {
  cursor: pointer;
  border: none;
  font-size: 1rem;
  transition: all 0.3s ease;
  border-radius: 8px;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.3;
}

/* Hero секция */
.hero {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(16, 185, 129, 0.06) 0%, transparent 40%),
    radial-gradient(ellipse at 60% 80%, rgba(124, 58, 237, 0.05) 0%, transparent 40%),
    linear-gradient(180deg, #fafbfc 0%, #f3f5f9 50%, #f8fafc 100%);
  padding: 100px 0 120px;
  position: relative;
  overflow: hidden;
}

/* Декоративные элементы фона */
.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 700px;
  height: 700px;
  background:
    radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
  border-radius: 50%;
  filter: blur(60px);
  animation: heroGlow 8s ease-in-out infinite alternate;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, transparent 60%);
  border-radius: 50%;
  filter: blur(50px);
  animation: heroGlow 10s ease-in-out infinite alternate-reverse;
}

@keyframes heroGlow {
  0% {
    transform: scale(1) translate(0, 0);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.1) translate(20px, -20px);
    opacity: 1;
  }
}

/* Геометрические узоры */
.hero-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.4;
}

.hero-pattern::before {
  content: '';
  position: absolute;
  top: 15%;
  left: 5%;
  width: 120px;
  height: 120px;
  border: 2px solid rgba(99, 102, 241, 0.15);
  border-radius: 30px;
  transform: rotate(15deg);
}

.hero-pattern::after {
  content: '';
  position: absolute;
  bottom: 20%;
  right: 8%;
  width: 80px;
  height: 80px;
  border: 2px solid rgba(16, 185, 129, 0.12);
  border-radius: 50%;
}

.hero .container {
  display: flex;
  align-items: center;
  gap: 80px;
  position: relative;
  z-index: 1;
}

.hero-content {
  flex: 1;
  max-width: 650px;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 800;
  color: var(--dark-color);
  margin-bottom: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero h1 span {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.4rem;
  color: var(--gray-color);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.search-box {
  display: flex;
  gap: 16px;
  margin-bottom: 3.5rem;
  background: white;
  padding: 8px;
  border-radius: 16px;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.07),
    0 10px 40px -10px rgba(79, 70, 229, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.search-box .search-input {
  flex: 1;
  padding: 16px 24px;
  font-size: 1.05rem;
  border: none;
  background: transparent;
}

.search-box .search-input:focus {
  outline: none;
  box-shadow: none;
}

.btn-search {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: white;
  padding: 18px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-search:hover {
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

.hero-stats {
  display: flex;
  gap: 60px;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #4f46e5, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.stat-label {
  color: var(--gray-color);
  font-size: 1rem;
  font-weight: 500;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.illustration {
  position: relative;
  width: 350px;
  height: 350px;
}

.book {
  position: absolute;
  width: 180px;
  height: 240px;
  background: linear-gradient(145deg, #4f46e5, #6366f1);
  border-radius: 12px 24px 24px 12px;
  box-shadow: -20px 20px 40px rgba(79, 70, 229, 0.3);
  top: 30px;
  left: 20px;
}

.book::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20px;
  bottom: 20px;
  width: 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.person {
  position: absolute;
  width: 140px;
  height: 140px;
  background: linear-gradient(145deg, #10b981, #34d399);
  border-radius: 50%;
  top: 80px;
  right: 20px;
  box-shadow: 20px 20px 40px rgba(16, 185, 129, 0.3);
}

.person::before {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 50%;
  top: 25px;
  left: 30px;
}

/* Популярные предметы */
.subjects {
  padding: 120px 0;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  position: relative;
}

.subjects::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent);
}

.subjects h2 {
  text-align: center;
  font-size: 2.8rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
  font-weight: 800;
}

.subjects h2 + p {
  text-align: center;
  color: var(--gray-color);
  font-size: 1.15rem;
  margin-bottom: 3.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.subject-card {
  background: white;
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.subject-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4f46e5, #10b981);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.subject-card:hover {
  transform: translateY(-12px);
  box-shadow:
    0 20px 40px -15px rgba(79, 70, 229, 0.25),
    0 0 0 1px rgba(79, 70, 229, 0.1);
}

.subject-card:hover::before {
  transform: scaleX(1);
}

.subject-icon {
  font-size: 3.5rem;
  margin-bottom: 1.25rem;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.subject-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--dark-color);
  font-weight: 700;
}

.subject-card p {
  color: var(--gray-color);
  font-size: 0.95rem;
  font-weight: 500;
}

/* Почему мы */
.about {
  padding: 120px 0;
  background:
    radial-gradient(ellipse at 80% 80%, rgba(16, 185, 129, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
}

.about h2 {
  text-align: center;
  font-size: 2.8rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
  font-weight: 800;
}

.about > .container > p {
  text-align: center;
  color: var(--gray-color);
  font-size: 1.15rem;
  margin-bottom: 4rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature {
  background: white;
  padding: 2.5rem 2rem;
  border-radius: 24px;
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(229, 231, 235, 0.5);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature:hover {
  transform: translateY(-10px);
  box-shadow:
    0 20px 40px -15px rgba(79, 70, 229, 0.2),
    0 0 0 1px rgba(79, 70, 229, 0.1);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.75rem;
  font-size: 2rem;
  color: var(--primary-color);
  transition: all 0.4s ease;
}

.feature:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, #c7d2fe 0%, #a5b4fc 100%);
}

.feature h3 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
  font-weight: 700;
}

.feature p {
  color: var(--gray-color);
  line-height: 1.7;
  font-size: 1rem;
}

/* Отзывы */
.reviews {
  padding: 120px 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(79, 70, 229, 0.04) 0%, transparent 50%), white;
  position: relative;
}

.reviews::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.15), transparent);
}

.reviews h2 {
  text-align: center;
  font-size: 2.8rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
  font-weight: 800;
}

.reviews > .container > p {
  text-align: center;
  color: var(--gray-color);
  font-size: 1.15rem;
  margin-bottom: 4rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.review-card {
  background: white;
  border: 1px solid rgba(229, 231, 235, 0.6);
  border-radius: 24px;
  padding: 2.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.review-card::before {
  content: '"';
  position: absolute;
  top: 20px;
  left: 30px;
  font-size: 6rem;
  color: rgba(79, 70, 229, 0.08);
  font-family: Georgia, serif;
  line-height: 1;
}

.review-card:hover {
  box-shadow: 0 20px 40px -15px rgba(79, 70, 229, 0.15);
  transform: translateY(-6px);
  border-color: rgba(79, 70, 229, 0.2);
}

.review-stars {
  color: #f59e0b;
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
  letter-spacing: 6px;
}

.review-card > p {
  font-size: 1.1rem;
  color: var(--dark-color);
  line-height: 1.8;
  margin-bottom: 1.75rem;
  font-style: italic;
  position: relative;
  z-index: 1;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 16px;
}

.author-avatar {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.author-name {
  font-weight: 700;
  color: var(--dark-color);
  font-size: 1.1rem;
}

.author-role {
  color: var(--gray-color);
  font-size: 0.95rem;
}

/* CTA секция */
.cta {
  padding: 120px 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #7c3aed 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 30%);
  animation: ctaGlow 15s ease-in-out infinite;
}

@keyframes ctaGlow {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-2%, -2%);
  }
}

.cta .container {
  position: relative;
  z-index: 1;
}

.cta h2 {
  font-size: 3rem;
  color: white;
  margin-bottom: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cta p {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2.75rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  background-color: white;
  color: var(--primary-color);
  padding: 16px 36px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 12px;
}

.btn-primary:hover {
  background-color: #f3f4f6;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: transparent;
  color: white;
  padding: 16px 36px;
  font-size: 1.1rem;
  font-weight: 600;
  border: 2px solid white;
  border-radius: 12px;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Навигация */
.navbar {
  background-color: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--dark-color);
}

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

.logo-text {
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2.2rem;
}

.nav-menu a {
  color: var(--dark-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary-color);
}

.auth-buttons {
  display: flex;
  gap: 12px;
}

.btn-login {
  background: transparent;
  color: var(--primary-color);
  padding: 10px 20px;
  font-weight: 600;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
}

.btn-login:hover {
  background-color: var(--light-color);
}

.btn-signup {
  background-color: var(--primary-color);
  color: white;
  padding: 10px 24px;
  font-weight: 600;
}

/* ====================== СТРАНИЦА РЕПЕТИТОРОВ ====================== */

.tutors-page {
  padding: 60px 0 100px;
}

.tutors-page h1 {
  text-align: center;
  font-size: 2.6rem;
  margin-bottom: 2.5rem;
}

.filters-and-sort {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  background: white;
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-select,
.filter-input,
.search-input {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  min-width: 180px;
}

.filter-select:focus,
.filter-input:focus,
.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.search-input {
  min-width: 280px;
}

.sort-container {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.sort-container label {
  font-weight: 500;
  color: var(--gray-color);
}

/* Сетка репетиторов */
.tutors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.tutor-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.tutor-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin: 20px auto;
  box-shadow: var(--shadow);
}

.tutor-info {
  padding: 0 1.5rem 1.5rem;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tutor-info h3 {
  margin-bottom: 6px;
  font-size: 1.35rem;
}

.specialty {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 12px;
}

.rating {
  color: #f59e0b;
  font-weight: 600;
  margin-bottom: 8px;
}

.price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 12px;
}

.description {
  color: var(--gray-color);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex: 1;
}

.tutor-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.btn-book {
  flex: 1;
  background-color: var(--primary-color);
  color: white;
  padding: 12px;
  font-weight: 600;
}

.btn-book:hover {
  background-color: #4338ca;
}

.btn-favorite {
  flex: 1;
  background-color: #f3f4f6;
  color: #374151;
  padding: 12px;
  font-weight: 600;
}

.btn-favorite:hover {
  background-color: #e5e7eb;
}

/* ====================== ЛИЧНЫЙ КАБИНЕТ ====================== */

.profile-page {
  padding: 60px 0;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 3rem;
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
}

.profile-header h1 {
  font-size: 2.2rem;
}

.tabs {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 2rem;
  gap: 2px;
}

.tab-btn {
  padding: 14px 28px;
  background: none;
  border: none;
  font-weight: 600;
  color: var(--gray-color);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s;
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
}

.tab-content {
  min-height: 400px;
}

.lessons-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lesson-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lesson-info h3 {
  margin-bottom: 6px;
}

.lesson-info p {
  color: var(--gray-color);
  margin-bottom: 4px;
}

.lesson-status {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.completed {
  background-color: #d1fae5;
  color: #10b981;
}

.btn-cancel {
  background-color: var(--danger-color);
  color: white;
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-cancel:hover {
  background-color: #dc2626;
}

.empty-state {
  text-align: center;
  color: var(--gray-color);
  font-size: 1.1rem;
  padding: 3rem 1rem;
}

/* ====================== СТРАНИЦА ПРЕДМЕТОВ ====================== */

.subjects-page {
  padding: 60px 0 100px;
}

.subjects-page h1 {
  text-align: center;
  margin-bottom: 3rem;
}

.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.8rem;
}

/* Используем уже существующие стили .subject-card */

/* ====================== ДОПОЛНИТЕЛЬНЫЕ УЛУЧШЕНИЯ ====================== */

.no-results {
  text-align: center;
  font-size: 1.3rem;
  color: var(--gray-color);
  padding: 4rem 1rem;
  grid-column: 1 / -1;
}

/* Адаптивность */
@media (max-width: 992px) {
  .filters-and-sort {
    flex-direction: column;
    align-items: stretch;
  }

  .sort-container {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    gap: 1.2rem;
    font-size: 0.95rem;
  }

  .tutors-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

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

@media (max-width: 480px) {
  .filters {
    flex-direction: column;
  }

  .filter-select,
  .filter-input,
  .search-input {
    min-width: 100%;
  }

  .tutor-card {
    margin: 0;
  }
}

/* ====================== МОДАЛЬНЫЕ ОКНА ====================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  border-radius: var(--radius);
  width: 100%;
  max-width: 450px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  font-size: 1.5rem;
  color: var(--dark-color);
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--gray-color);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: var(--dark-color);
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-color);
}

/* ====================== ФОРМЫ ====================== */

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-label input[type='checkbox'] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.btn-save {
  background-color: var(--primary-color);
  color: white;
  padding: 12px 24px;
  font-weight: 600;
  border-radius: 8px;
}

.btn-save:hover {
  background-color: #4338ca;
}

/* ====================== РЕДАКТИРОВАНИЕ ПРОФИЛЯ ====================== */

.profile-name-container {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-edit-profile {
  background: var(--light-color);
  color: var(--gray-color);
  padding: 8px 16px;
  font-size: 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.btn-edit-profile:hover {
  background: var(--border-color);
  color: var(--dark-color);
}

.profile-info {
  flex: 1;
}

.profile-info p {
  color: var(--gray-color);
  margin-top: 0.5rem;
}

/* ====================== ИЗБРАННОЕ ====================== */

.btn-favorite {
  background-color: #f3f4f6;
  color: #374151;
  padding: 12px;
  font-weight: 600;
  border-radius: 8px;
}

.btn-favorite:hover {
  background-color: #e5e7eb;
}

.btn-favorite.active {
  background-color: #dbeafe;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-remove-favorite {
  background-color: #fee2e2;
  color: var(--danger-color);
  padding: 10px 16px;
  font-weight: 600;
  border-radius: 8px;
  margin-top: 10px;
}

.btn-remove-favorite:hover {
  background-color: #fecaca;
}

/* ====================== ВЫХОД ====================== */

.btn-logout {
  background-color: var(--danger-color);
  color: white;
  padding: 10px 20px;
  font-weight: 600;
  border-radius: 8px;
}

.btn-logout:hover {
  background-color: #dc2626;
}
