/* --- VARIABLES --- */
:root,
[data-bs-theme="light"] {
  --clr-primary: hsl(210, 100%, 60%);
  --clr-primary-dark: hsl(210, 100%, 50%);
  --clr-secondary: hsl(270, 100%, 70%);
  
  --clr-bg-light: #f8fafc;
  --clr-bg-dark: #0f172a;
  --clr-bg-dark-alt: #1e293b;

  --clr-card-light: #ffffff;
  --clr-card-dark: #1e293b;
  
  --clr-txt-light: #334155;
  --clr-txt-dark: #e2e8f0;
  --clr-txt-muted-light: #64748b;
  --clr-txt-muted-dark: #94a3b8;

  --clr-border-light: #e2e8f0;
  --clr-border-dark: #334155;

  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* --- THEMES --- */
body.light {
  --bg: var(--clr-bg-light);
  --bg-alt: #ffffff;
  --txt: var(--clr-txt-light);
  --txt-muted: var(--clr-txt-muted-light);
  --card-bg: var(--clr-card-light);
  --card-shadow: rgba(0, 0, 0, 0.05);
  --border: var(--clr-border-light);
  --primary: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
  --primary-solid: var(--clr-primary);
  --footer-bg: #f1f5f9;
  --nav-bg: rgba(255, 255, 255, 0.95);
  --nav-shadow: rgba(0, 0, 0, 0.1);
}

body.dark {
  --bg: var(--clr-bg-dark);
  --bg-alt: var(--clr-bg-dark-alt);
  --txt: var(--clr-txt-dark);
  --txt-muted: var(--clr-txt-muted-dark);
  --card-bg: var(--clr-card-dark);
  --card-shadow: rgba(0, 0, 0, 0.3);
  --border: var(--clr-border-dark);
  --primary: linear-gradient(135deg, hsl(210, 90%, 60%), hsl(270, 90%, 70%));
  --primary-solid: hsl(210, 90%, 60%);
  --footer-bg: #0f172a;
  --nav-bg: rgba(15, 23, 42, 0.95);
  --nav-shadow: rgba(0, 0, 0, 0.5);
}

/* --- BASE --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--txt);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.section-py {
  padding: 80px 0;
}

.min-vh-50 {
  min-height: 50vh;
}

.min-vh-100 {
  min-height: 100vh;
}

/* --- NAVBAR --- */
/** header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: var(--nav-bg);
  box-shadow: 0 2px 12px var(--nav-shadow);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
} **/

/**nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
} **/

.logo {
  font-weight: 900;
  font-size: 1.5rem;
  background: var(--primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  user-select: none;
  white-space: nowrap;
}

.navbar-nav .nav-link {
  font-weight: 600;
  color: var(--txt);
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: var(--radius);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  background: var(--primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 6px var(--primary-solid));
}

#btn-theme-toggle {
  color: var(--txt);
  border: none;
  background: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

#btn-theme-toggle:hover {
  background: var(--primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- HERO SECTION --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -30%;
  left: -20%;
  width: 140%;
  height: 150%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(120, 209, 236, 0.15), transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(155, 101, 244, 0.15), transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(75, 202, 201, 0.15), transparent 30%);
  z-index: -1;
}

.hero-content h1 {
  font-weight: 900;
  margin-bottom: 20px;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
}

.hero-content .lead {
  font-size: 1.3rem;
  margin-bottom: 30px;
  color: var(--txt-muted);
}

.hero-points {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-points .point {
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--txt);
  padding: 12px 16px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.hero-points .point:hover {
  transform: translateX(8px);
}

.hero-points .point .icon {
  font-size: 1.5rem;
  width: 40px;
  text-align: center;
}

.hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Floating Cards in Hero */
.floating-cards {
  position: relative;
  height: 400px;
}

.floating-card {
  position: absolute;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.card-1 {
  top: 20%;
  left: 10%;
  transform: rotate(-5deg);
  animation: float 6s ease-in-out infinite;
}

.card-2 {
  top: 50%;
  right: 10%;
  transform: rotate(3deg);
  animation: float 6s ease-in-out infinite 2s;
}

.card-3 {
  bottom: 10%;
  left: 30%;
  transform: rotate(-2deg);
  animation: float 6s ease-in-out infinite 4s;
}

.floating-card:hover {
  transform: translateY(-10px) rotate(0deg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--rotation, 0deg)); }
  50% { transform: translateY(-20px) rotate(var(--rotation, 0deg)); }
}

/* --- BUTTONS --- */
.btn-gradient {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 12px 24px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn-gradient:hover::before {
  left: 100%;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn-outline-primary {
  border: 2px solid var(--primary-solid);
  color: var(--primary-solid);
  background: transparent;
  border-radius: var(--radius);
  padding: 12px 24px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background: var(--primary-solid);
  color: white;
  transform: translateY(-2px);
}

/* --- CARDS --- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-card {
  padding: 30px 25px;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.feature-card .card-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
}

.feature-card .card-title {
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--txt);
}

.feature-card .card-desc {
  color: var(--txt-muted);
  line-height: 1.6;
}

/* --- DASHBOARD STYLES --- */
.dashboard-hero {
  padding: 120px 0 60px;
  background: linear-gradient(135deg, var(--primary), transparent);
}

.dashboard-welcome h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.daily-stats-card {
  background: var(--card-bg);
  padding: 25px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.stats-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-solid);
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--txt-muted);
  margin-top: 5px;
}

/* Quick Actions */
.quick-actions-card .card-body {
  padding: 0;
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
}

.action-card {
  display: flex;
  align-items: center;
  padding: 25px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  border-bottom: 1px solid var(--border);
}

.action-card:last-child {
  border-bottom: none;
}

.action-card:hover {
  background: var(--primary);
  color: white;
  transform: none;
  text-decoration: none;
}

.action-card.primary:hover { background: var(--clr-primary); }
.action-card.success:hover { background: #10b981; }
.action-card.info:hover { background: #3b82f6; }

.action-icon {
  font-size: 1.8rem;
  margin-right: 15px;
}

.action-content h6 {
  font-weight: 600;
  margin-bottom: 4px;
}

.action-content p {
  font-size: 0.9rem;
  margin: 0;
  opacity: 0.8;
}

.action-badge {
  background: rgba(255,255,255,0.2);
  color: white;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: auto;
}

/* Progress Cards */
.progress-item {
  margin-bottom: 20px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.progress-value {
  font-weight: 600;
  color: var(--primary-solid);
}

.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 10px;
  transition: width 0.5s ease;
}

.progress-fill.mastered {
  background: linear-gradient(135deg, #10b981, #34d399);
}

.stats-grid-small {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat-small {
  text-align: center;
  padding: 15px;
  background: var(--bg-alt);
  border-radius: var(--radius);
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--txt-muted);
}

/* Activity Card */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  font-size: 1.2rem;
  margin-top: 2px;
}

.activity-content p {
  margin: 0;
  font-size: 0.9rem;
}

/* --- STATS STYLES --- */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-card.primary {
  border-left: 4px solid #3B82F6;
}

.stat-card.success {
  border-left: 4px solid #10B981;
}

.stat-card.warning {
  border-left: 4px solid #F59E0B;
}

.stat-card.info {
  border-left: 4px solid #6366F1;
}

.stat-icon {
  font-size: 2rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: 12px;
}

.stat-content {
  flex: 1;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--txt-muted);
  font-weight: 500;
}

/* Effectiveness Items */
.effectiveness-item {
  padding: 15px 0;
}

.effectiveness-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.effectiveness-label {
  font-size: 0.9rem;
  color: var(--txt-muted);
}

/* Upcoming Reviews */
.upcoming-reviews {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-day {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: var(--bg-alt);
  border-radius: var(--radius);
}

.day-name {
  font-weight: 600;
}

.day-count {
  color: var(--primary-solid);
  font-weight: 600;
}

/* --- WORDS STYLES --- */
.word-card {
  padding: 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border-left: 4px solid var(--primary-solid);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.word-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.word-meta {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--txt-muted);
}

/* --- DECKS STYLES --- */
.deck-card {
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.deck-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.deck-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 0;
  margin-bottom: 15px;
}

.deck-color {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
}

.deck-title {
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.deck-body {
  padding: 0 20px;
  flex: 1;
}

.deck-description {
  color: var(--txt-muted);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.deck-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.stat {
  text-align: center;
  padding: 10px;
  background: var(--bg-alt);
  border-radius: var(--radius);
}

.stat-number {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-solid);
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--txt-muted);
  display: block;
}

.deck-actions {
  display: flex;
  gap: 8px;
  padding: 15px 20px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* Color Picker */
.color-picker {
  margin-top: 10px;
}

.color-options {
  display: flex;
  gap: 10px;
}

.color-options input[type="radio"] {
  display: none;
}

.color-option {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.3s ease;
}

.color-option:hover {
  transform: scale(1.1);
}

.color-options input[type="radio"]:checked + .color-option {
  border-color: var(--txt);
  transform: scale(1.1);
}

/* --- PROFILE STYLES --- */
.profile-header {
  text-align: center;
  padding: 40px 0;
  background: linear-gradient(135deg, var(--primary), transparent);
  margin-bottom: 30px;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  margin: 0 auto 15px;
  font-weight: 700;
}

/* --- FOOTER --- */
.footer {
  background: var(--footer-bg);
  padding: 50px 0 20px;
  margin-top: auto;
}

.footer .logo {
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.footer-text {
  color: var(--txt-muted);
  max-width: 300px;
}

.footer h6 {
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--txt);
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--txt-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-solid);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 30px;
  text-align: center;
  color: var(--txt-muted);
}

/* --- MODALS --- */
.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.modal-header {
  border-bottom: 1px solid var(--border);
}

.modal-footer {
  border-top: 1px solid var(--border);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .hero-btns {
    flex-direction: column;
  }
  
  .hero-btns .btn {
    width: 100%;
    text-align: center;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .actions-grid {
    grid-template-columns: 1fr;
  }
  
  .floating-card {
    position: relative;
    margin-bottom: 20px;
    transform: none !important;
    animation: none;
  }
  
  .floating-cards {
    height: auto;
  }
  
  .deck-stats {
    grid-template-columns: 1fr;
  }
  
  .stats-content {
    grid-template-columns: 1fr;
  }
  
  .deck-actions {
    flex-wrap: wrap;
  }
  
  .stat-card {
    flex-direction: column;
    text-align: center;
  }
}

/* --- UTILITY CLASSES --- */
.text-gradient {
  background: var(--primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-primary {
  background: var(--primary) !important;
}

.flex-grow-1 {
  flex-grow: 1;
}

.d-flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.justify-content-center {
  justify-content: center;
}

.align-items-center {
  align-items: center;
}

.text-center {
  text-align: center;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.py-4 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

/* Loading states */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Alert improvements */
.alert {
  border: none;
  border-radius: var(--radius);
}

.alert-dismissible .btn-close {
  padding: 0.75rem;
}

/* Добавьте эти стили в конец файла */

/* Стили для медиа элементов */
.training-image {
    border: 3px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.training-image:hover {
    transform: scale(1.02);
}

.media-preview {
    max-width: 100px;
    max-height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.audio-player {
    width: 100%;
    margin: 10px 0;
}

.media-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 10px 0;
}

.media-buttons .btn {
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.875rem;
}

/* Адаптивные изображения в таблице */
.table-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* Модальное окно для изображений */
.modal-image {
    max-height: 70vh;
    width: auto;
    max-width: 100%;
    border-radius: var(--radius);
}

/* Анимация для аудио кнопки */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.audio-playing {
    animation: pulse 1s infinite;
}

/* Стили для карточек с медиа */
.word-card-with-media {
    position: relative;
    overflow: hidden;
}

.word-card-with-media::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
}

.media-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 4px;
}

.media-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--txt-muted);
}

.media-dot.has-image {
    background: #3B82F6;
}

.media-dot.has-audio {
    background: #10B981;
}

/* Дополнительные стили для тренировок */
.training-card {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rating-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.rating-buttons .btn {
    min-width: 120px;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.rating-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .training-image {
        max-height: 150px;
    }
    
    .rating-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .rating-buttons .btn {
        width: 200px;
    }
    
    .media-buttons {
        flex-wrap: wrap;
    }
    
    .table-img {
        width: 30px;
        height: 30px;
    }
}

/* Стили для загрузки файлов */
.file-upload-preview {
    margin-top: 10px;
    text-align: center;
}

.file-upload-preview img,
.file-upload-preview audio {
    max-width: 100%;
    border-radius: var(--radius);
    margin-bottom: 10px;
}

.file-info {
    font-size: 0.875rem;
    color: var(--txt-muted);
    margin-top: 5px;
}

.bg-alt {
  background: var(--bg-alt);
}

.hover-primary:hover {
  color: var(--primary-solid) !important;
}

/* Уменьшаем размер иконок пагинации */
.pagination svg.w-5.h-5 {
  width: 1rem;      /* 16px */
  height: 1rem;
}

/* Если нужно ещё меньше */
.pagination svg.w-5.h-5 {
  width: 0.875rem;  /* 14px */
  height: 0.875rem;
}

/* При необходимости уменьшаем отступы внутри кнопок */
.pagination .relative.inline-flex.items-center.px-2.py-2 {
  padding-left: 0.5rem;   /* 8px */
  padding-right: 0.5rem;
  padding-top: 0.25rem;    /* 4px */
  padding-bottom: 0.25rem;
}



/* ============================================================
   ПРИМЕНЕНИЕ ТЕМ КО ВСЕМ ЭЛЕМЕНТАМ
   ============================================================ */
/* ================= КАСТОМНЫЕ ТЕМЫ ================= */
.theme-ocean-deep {
  --bg: #001f3f;
  --bg-alt: #002b55;
  --txt: #d0e0ff;
  --txt-muted: #a0c4ff;
  --card-bg: #002b55;
  --border: #003d7a;
  --primary: linear-gradient(135deg, #0074D9, #a0c4ff);
  --primary-solid: #0074D9;
  --footer-bg: #001a35;
}

.theme-forest-calm {
  --bg: #1b3a1b;
  --bg-alt: #234d23;
  --txt: #d4edda;
  --txt-muted: #a3d9a5;
  --card-bg: #234d23;
  --border: #2e5e2e;
  --primary: linear-gradient(135deg, #28a745, #8fbc8f);
  --primary-solid: #28a745;
  --footer-bg: #152e15;
}

.theme-sunset-glow {
  --bg: #fff3cd;
  --bg-alt: #ffe69c;
  --txt: #212529;
  --txt-muted: #856404;
  --card-bg: #ffe69c;
  --border: #ffc107;
  --primary: linear-gradient(135deg, #fd7e14, #ffc107);
  --primary-solid: #fd7e14;
  --footer-bg: #ffc107;
}

.theme-midnight {
  --bg: #0a0a0a;
  --bg-alt: #151515;
  --txt: #cccccc;
  --txt-muted: #999999;
  --card-bg: #151515;
  --border: #2a2a2a;
  --primary: linear-gradient(135deg, #6f42c1, #bb86fc);
  --primary-solid: #6f42c1;
  --footer-bg: #000000;
}

.theme-solar {
  --bg: #fff8e1;
  --bg-alt: #ffecb3;
  --txt: #212529;
  --txt-muted: #795548;
  --card-bg: #ffecb3;
  --border: #ffca28;
  --primary: linear-gradient(135deg, #f39c12, #ffca28);
  --primary-solid: #f39c12;
  --footer-bg: #ffca28;
}

.theme-retro-pixel {
  --bg: #2d1b69;
  --bg-alt: #3d2b7a;
  --txt: #e0d0ff;
  --txt-muted: #c0b0ff;
  --card-bg: #3d2b7a;
  --border: #4d3b8b;
  --primary: linear-gradient(135deg, #6f42c1, #c0b0ff);
  --primary-solid: #6f42c1;
  --footer-bg: #1d0b4a;
}

.theme-minimalist-white {
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --txt: #000000;
  --txt-muted: #555555;
  --card-bg: #ffffff;
  --border: #000000;
  --primary: linear-gradient(135deg, #000000, #555555);
  --primary-solid: #000000;
  --footer-bg: #ffffff;
}

.theme-neon-night {
  --bg: #0d0d0d;
  --bg-alt: #141414;
  --txt: #39ff14;
  --txt-muted: #39ff14;
  --card-bg: #141414;
  --border: #39ff14;
  --primary: linear-gradient(135deg, #ff073a, #39ff14);
  --primary-solid: #ff073a;
  --footer-bg: #000000;
}

/* ================= ЦВЕТА ДЛЯ ВСЕХ ТЕМ ================= */
/* Если тема кастомная или тёмная, задаём цвет текста явно */
.theme-ocean-deep, .theme-forest-calm, .theme-midnight,
.theme-retro-pixel, .theme-neon-night,
.theme-sunset-glow, .theme-solar, .theme-minimalist-white {
  color: var(--txt);
}

.theme-ocean-deep body, .theme-forest-calm body, .theme-sunset-glow body,
.theme-midnight body, .theme-solar body, .theme-retro-pixel body,
.theme-minimalist-white body, .theme-neon-night body {
  background-color: var(--bg);
  color: var(--txt);
}

/* Карточки, хедер, фильтры — всё переопределяем через переменные */
.theme-ocean-deep .card,
.theme-forest-calm .card,
.theme-sunset-glow .card,
.theme-midnight .card,
.theme-solar .card,
.theme-retro-pixel .card,
.theme-minimalist-white .card,
.theme-neon-night .card {
  background-color: var(--card-bg);
  color: var(--txt);
  border-color: var(--border);
}

.theme-ocean-deep .top-header,
.theme-forest-calm .top-header,
.theme-sunset-glow .top-header,
.theme-midnight .top-header,
.theme-solar .top-header,
.theme-retro-pixel .top-header,
.theme-minimalist-white .top-header,
.theme-neon-night .top-header {
  background-color: var(--bg-alt);
  color: var(--txt);
}

.theme-ocean-deep .form-select,
.theme-forest-calm .form-select,
.theme-sunset-glow .form-select,
.theme-midnight .form-select,
.theme-solar .form-select,
.theme-retro-pixel .form-select,
.theme-minimalist-white .form-select,
.theme-neon-night .form-select {
  background-color: var(--bg-alt);
  color: var(--txt);
  border-color: var(--border);
}

.theme-ocean-deep .main-navigation,
.theme-forest-calm .main-navigation,
.theme-sunset-glow .main-navigation,
.theme-midnight .main-navigation,
.theme-solar .main-navigation,
.theme-retro-pixel .main-navigation,
.theme-minimalist-white .main-navigation,
.theme-neon-night .main-navigation {
  background-color: var(--bg-alt);
  color: var(--txt);
}

/* Ссылки в навигации */
.theme-ocean-deep .navbar-nav .nav-link,
.theme-forest-calm .navbar-nav .nav-link,
.theme-sunset-glow .navbar-nav .nav-link,
.theme-midnight .navbar-nav .nav-link,
.theme-solar .navbar-nav .nav-link,
.theme-retro-pixel .navbar-nav .nav-link,
.theme-minimalist-white .navbar-nav .nav-link,
.theme-neon-night .navbar-nav .nav-link {
  color: var(--txt);
}

/* Футер */
.theme-ocean-deep .footer,
.theme-forest-calm .footer,
.theme-sunset-glow .footer,
.theme-midnight .footer,
.theme-solar .footer,
.theme-retro-pixel .footer,
.theme-minimalist-white .footer,
.theme-neon-night .footer {
  background-color: var(--footer-bg);
  color: var(--txt);
}

/* Текст muted */
.theme-ocean-deep .text-muted,
.theme-forest-calm .text-muted,
.theme-sunset-glow .text-muted,
.theme-midnight .text-muted,
.theme-solar .text-muted,
.theme-retro-pixel .text-muted,
.theme-minimalist-white .text-muted,
.theme-neon-night .text-muted {
  color: var(--txt-muted) !important;
}