* { -webkit-tap-highlight-color: transparent; }
input[type="search"]::-webkit-search-cancel-button { display: none; }

/* Gilroy font */
@font-face {
  font-family: 'Gilroy';
  src: url('https://copella.live/assets/fonts/Gilroy-SemiBold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
.modal .modal-content { max-height: 90vh; }
#stationListContainer::after,
#apiSearchResultsContainer::after,
#recordingsList::after,
#scheduleList::after { content: ''; display: block; height: 6rem; }
.volume-slider-container { transition: opacity 0.2s, visibility 0.2s; }
.player-controls .volume-control-wrapper:hover .volume-slider-container { opacity: 1; visibility: visible; }
@media (min-width: 640px) { .volume-slider-container { opacity: 0; visibility: hidden; } }
input[type=range] { -webkit-appearance: none; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; background: rgba(255,255,255,0.2); border-radius: 4px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; margin-top: -6px; width: 16px; height: 16px; background: #fff; border-radius: 50%; cursor: pointer; }
html, body { background-color: #0A0A0A; }

/* Стили для встраиваемого интерфейса */
.app-container {
  /* Убираем фиксированную высоту для лучшей адаптации */
  min-height: calc(100vh - 2rem);
}

/* Стили для кнопки "Назад" */
.back-btn {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.back-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Компактный хедер */
.app-header {
  background: #1a1a1a;
}

/* Уменьшаем общую высоту заголовка и увеличиваем логотип */
.app-header .header-logo {
  image-rendering: -webkit-optimize-contrast;
}

@media (max-width: 640px) {
  .app-header .header-logo { height: 3.5rem; }
}
@media (min-width: 641px) {
  .app-header .header-logo { height: 4rem; }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 640px) {
  .app-container {
    padding: 1rem;
    min-height: calc(100vh - 1rem);
  }
  
  
  .back-btn span {
    display: none;
  }
  
  .back-btn {
    padding: 0.5rem;
  }
}

/* Улучшенные переходы */
.player-panel {
  transition: all 0.3s ease;
}

.stations-panel {
  transition: all 0.3s ease;
}

/* Мобильная адаптивность для поиска и кнопок */
@media (max-width: 640px) {
  .stations-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .search-container {
    margin-right: 0 !important;
  }
  
  .station-actions {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .action-btn {
    padding: 0.75rem !important;
  }
  
  .action-btn svg {
    width: 1.25rem !important;
    height: 1.25rem !important;
  }
  
  .player-panel {
    padding: 1rem !important;
  }
  
  .player-panel .absolute.top-4.right-4 {
    top: 0.75rem;
    right: 0.75rem;
  }
  
  .player-panel .absolute.top-4.right-4 button {
    padding: 0.5rem !important;
  }
  
  .player-panel .absolute.top-4.right-4 svg {
    width: 1rem !important;
    height: 1rem !important;
  }
}

/* Убираем все тени */
* {
  box-shadow: none !important;
}

/* Убираем тени из Tailwind классов */
.shadow-sm, .shadow, .shadow-md, .shadow-lg, .shadow-xl, .shadow-2xl {
  box-shadow: none !important;
}

/* Анимации для записи */
@keyframes pulse-border {
  0%, 100% {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4) !important;
  }
  50% {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0) !important;
  }
}

@keyframes pulse-record-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4) !important;
  }
  50% {
    box-shadow: 0 0 0 12px rgba(239, 68, 68, 0) !important;
  }
}

.animate-pulse-border {
  animation: pulse-border 1.5s ease-in-out infinite !important;
}

.animate-pulse-record-glow {
  animation: pulse-record-glow 1.5s ease-in-out infinite !important;
}

/* Стили для карусели глобального поиска */
#apiSearchResultsContainer {
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  touch-action: pan-x pinch-zoom;
}

#apiSearchResultsContainer::-webkit-scrollbar {
  display: none;
}

.api-search-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 200px;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 4px 8px;
}

.api-search-item {
  scroll-snap-align: start;
}

.api-search-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
  border: none;
  border-radius: 12px;
  padding: 12px;
  height: 100%;
  transition: all 0.2s ease;
}

.api-search-card:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

.api-search-thumb {
  width: 100%;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  background: #222;
  display: block;
}

.api-search-meta {
  display: grid;
  gap: 4px;
}

.api-search-name {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.25;
  font-family: 'Gilroy', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text-primary);
}

.api-search-country {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
}

.api-search-actions {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.api-search-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(26,26,26,0.8);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.api-search-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--accent-green);
}

.api-search-btn:disabled {
  background: rgba(34,197,94,0.2);
  color: var(--accent-green);
  border-color: var(--accent-green);
}

/* Строгий дизайн - цветные эффекты отключены */

/* Новые анимации для микрофункций */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
  20%, 40%, 60%, 80% { transform: translateX(2px); }
}

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

.notification-badge {
  font-size: 10px;
  line-height: 1;
}

.tooltip {
  white-space: nowrap;
  transform: translateY(-100%);
  margin-top: -8px;
}

.loading-spinner {
  display: inline-block;
}
