/* Область заголовка и фильтров */
.header-section {
  background: var(--color-background);
  padding: 10px 0 var(--spacing-xl) 0;
  margin-bottom: var(--spacing-xl);
  box-shadow: var(--shadow-medium);
  width: 100%;
  max-width: 100vw;
  position: relative;
}

#site-title {
  text-align: center;
  font-size: clamp(1.8rem, 6vw, 2.5rem);
  font-weight: var(--font-weight-boldest);
  color: var(--color-text);
  margin: 5px auto 5px auto;
  text-shadow: var(--shadow-small);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
}

.highlight-onra {
  color: #00BFFF;
  text-shadow: 0 0 8px rgba(0, 191, 255, 0.5);
}

.seo-text {
  font-size: 0.7em;
  font-weight: 400;
  color: var(--color-text);
  opacity: 0.8;
}

.seo-heading {
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin: var(--spacing-md) 0;
  text-align: center;
}

.seo-content {
  background: var(--color-background-light);
  padding: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-small);
}

.seo-content h2 {
  color: var(--color-primary);
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  margin-bottom: var(--spacing-md);
}

.seo-content h3 {
  color: var(--color-text);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  margin: var(--spacing-md) 0 var(--spacing-sm) 0;
}

.seo-content p {
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
}

.site-icon {
  width: clamp(32px, 8vw, 48px);
  height: clamp(32px, 8vw, 48px);
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 191, 255, 0.5));
}

#no-internet-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#no-internet-message {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  color: white;
  text-align: center;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(255, 107, 107, 0.4);
  max-width: 400px;
  width: 90%;
  backdrop-filter: blur(10px);
}

/* Оверлей уведомлений для избранного */
#notification-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  cursor: pointer;
}

#notification-message {
  background: linear-gradient(135deg, #ff7a00, #ff9500);
  color: white;
  text-align: center;
  padding: 24px 32px;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(255, 122, 0, 0.4);
  max-width: 450px;
  width: 90%;
  backdrop-filter: blur(15px);
  border: 2px solid rgba(255, 255, 255, 0.1);
  animation: notificationSlideIn 0.3s ease-out;
}

.notification-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 2.4rem);
}

.notification-icon {
  font-size: clamp(1.4rem, 4.5vw, 1.8rem);
  animation: notificationPulse 2s infinite;
}

@keyframes notificationSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes notificationPulse {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1);
  }
  50% { 
    opacity: 0.8; 
    transform: scale(1.05);
  }
}

/* Оверлей подтверждения */
#confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#confirm-dialog {
  background: linear-gradient(135deg, #4a4a4a, #2a2a2a);
  color: white;
  text-align: center;
  padding: 32px;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  max-width: 400px;
  width: 90%;
  backdrop-filter: blur(15px);
  border: 2px solid rgba(255, 255, 255, 0.1);
  animation: confirmSlideIn 0.3s ease-out;
}

.confirm-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.confirm-icon {
  font-size: 3rem;
  color: #ff6b6b;
  animation: confirmPulse 2s infinite;
}

.confirm-message {
  font-size: clamp(1.1rem, 4vw, 1.3rem);
  font-weight: 600;
  line-height: 1.4;
}

.confirm-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  width: 100%;
}

.confirm-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 100px;
}

.confirm-btn.cancel {
  background: #6c757d;
  color: white;
}

.confirm-btn.cancel:hover {
  background: #5a6268;
  transform: translateY(-2px);
}

.confirm-btn.confirm {
  background: #ff6b6b;
  color: white;
}

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

@keyframes confirmSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes confirmPulse {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1);
  }
  50% { 
    opacity: 0.8; 
    transform: scale(1.1);
  }
}

.no-internet-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  font-size: clamp(0.9rem, 3vw, 1.1rem);
}

.no-internet-icon {
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

#tab-controls {
  max-width: 800px;
  width: 100%;
  margin: 12px auto 0 auto;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  box-sizing: border-box;
  padding: 0 10px;
  overflow-x: hidden;
}

#tab-controls button {
  cursor: pointer;
  padding: 8px 24px;
  border-radius: 8px;
  border: 1px solid #367cff;
  background: #367cff;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  transition: all .2s;
  flex-shrink: 1;
  min-width: 0;
}

#tab-controls button.active {
  background-color: #367cff;
  color: white;
  border-color: #367cff;
}

#tab-controls button:hover {
  background-color: #2a5ecb;
  border-color: #2a5ecb;
}

#tab-favorites {
  background-color: #ff7a00 !important;
  color: white !important;
  border-color: #ff7a00 !important;
}

#clear-favorites {
  background-color: #e24049 !important;
  color: white !important;
  border: 1px solid #e24049 !important;
  border-radius: 8px;
  font-weight: 600;
  transition: background-color .2s;
}

#clear-favorites:hover {
  background-color: #c7363e !important;
  border-color: #c7363e !important;
}

#filter-controls {
  max-width: 800px;
  width: 100%;
  margin: 12px auto 8px auto;
  padding: 0 10px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  box-sizing: border-box;
  position: relative;
  overflow-x: hidden;
}

#filter-controls label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: var(--color-text);
  font-weight: 600;
  min-width: 160px;
}

select {
  padding: 8px 12px;
  font-size: 1rem;
  margin-top: 4px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  min-width: 160px;
  background: var(--color-select-bg);
  color: var(--color-select-text);
  cursor: pointer;
  transition: all 0.2s;
}

select:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(54, 124, 255, 0.3);
}

select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(54, 124, 255, 0.2);
}

select option {
  font-size: inherit;
  padding: 4px 8px;
  background: var(--color-select-bg);
  color: var(--color-select-text);
}

select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: var(--color-background-light);
  border-color: var(--color-border);
}

.station-count-info {
  text-align: center;
  margin: 12px auto;
  padding: 8px 16px;
  background: #f0f8ff;
  border: 1px solid #367cff;
  border-radius: 8px;
  color: #367cff;
  font-size: clamp(0.9rem, 3vw, 1rem);
  font-weight: 600;
  max-width: 800px;
  box-sizing: border-box;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: translateY(0);
}

.station-count-info[style*='display: none'] {
  opacity: 0;
  transform: translateY(-10px);
}

#station-list {
  margin: 4px auto 40px auto;
  width: 100%;
  max-width: 800px;
  box-sizing: border-box;
  padding: 0 10px;
  overflow-x: visible;
}

/* Выравнивание списка станций по левой стороне на широких экранах */
@media (min-width: 1024px) {
  #station-list {
    margin: 4px 0 40px 0;
    max-width: calc(100% - 340px); /* 300px для рекламы + 40px отступ */
    padding: 0 20px 0 10px;
  }
}

.station-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  margin: 10px 0;
  background: var(--color-station-bg);
  color: var(--color-station-text);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  cursor: default;
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow-x: hidden;
  min-width: 0;
}

.station-row:hover {
  background: var(--color-station-bg-active);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border-color: var(--color-primary);
}

.station-row.active {
  background: var(--color-station-bg-active);
  color: var(--color-station-text-active);
  box-shadow: 0 6px 20px rgba(54, 124, 255, 0.3);
  transform: translateY(-2px);
  border-color: var(--color-primary);
}

/* Touch feedback эффекты */
.station-row:active {
  transform: scale(0.98);
  transition: transform var(--touch-feedback-duration) ease;
}

.play-btn:active,
.fav-btn:active {
  transform: scale(0.95);
  transition: transform var(--touch-feedback-duration) ease;
}

/* Swipe индикаторы */
.swipe-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, var(--color-primary) 50%, transparent 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1;
}

.station-row.swipe-active .swipe-indicator {
  opacity: 0.3;
}

.station-logo {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: #eee;
  object-fit: contain;
  flex-shrink: 0;
  transition: opacity 0.3s ease;
}

/* Lazy loading стили */
.station-logo[data-src] {
  opacity: 0;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
}

.station-logo.loaded {
  opacity: 1;
  animation: none;
}

@keyframes loading-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.station-name {
  flex: 1;
  overflow: hidden;
  max-width: 400px;
  min-width: 140px;
  position: relative;
  font-size: clamp(0.85rem, 4vw, 1.1rem);
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  word-wrap: break-word;
  hyphens: auto;
}

.station-country {
  font-size: clamp(0.7rem, 3vw, 0.87rem);
  color: var(--color-country-code, #666);
  width: 45px;
  min-width: 45px;
  max-width: 45px;
  text-transform: uppercase;
  text-align: right;
  flex-shrink: 0;
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: gray;
  flex-shrink: 0;
}

.status-online {
  background-color: #43d97b;
}

.status-offline {
  background-color: #e24049;
}

.status-checking {
  background-color: #ffa500;
  animation: pulse 1s infinite;
}
