/* 202_styles.css - Clean Modern Radio Station Website */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #fafafa;
    color: #2d2d2d;
    line-height: 1.6;
    padding-bottom: 100px; /* Space for fixed player */
    min-height: 100vh;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

.header-image {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
}

header h1 {
    color: #3a3a3a;
    font-size: 2.5em;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Search */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 40px;
}

.search-input {
    width: 100%;
    padding: 14px 50px 14px 20px;
    font-size: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.2s ease;
    color: #2d2d2d;
}

.search-input:focus {
    outline: none;
    border-color: #6b7280;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.1);
}

.search-input::placeholder {
    color: #9ca3af;
}

.clear-search {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: #9ca3af;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-search:hover {
    background: #f3f4f6;
    color: #4b5563;
}

/* Stations Container */
.stations-container {
    margin-bottom: 30px;
}

.genre-section {
    margin-bottom: 50px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.genre-title {
    font-size: 1.5em;
    color: #374151;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.genre-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.genre-title a:hover {
    color: #1b74e4;
    text-decoration: underline;
}

.stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.station-card {
    transition: transform 0.2s ease;
}

.station-button {
    width: 100%;
    padding: 16px 20px;
    background: #ffffff;
    color: #374151;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
}

.station-button:hover {
    border-color: #9ca3af;
    background: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.station-button:active {
    transform: translateY(0);
    background: #f3f4f6;
}

.station-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #6b7280;
    font-size: 16px;
}

/* Player */
:root {
    --accent: #1b74e4;
}

.player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e7e7e7;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 84px;
    font-family: system-ui, -apple-system, sans-serif;
}

.player__top {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.player__audio {
    display: none;
}

.player__art {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
}

.player__art-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.player__art-placeholder {
    width: 100%;
    height: 100%;
    background: #e7e7e7;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

.player__art-placeholder::after {
    content: '♪';
    font-size: 24px;
    color: #999;
}

.player__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.player__station {
    font-size: 15px;
    font-weight: 600;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.player__artist {
    font-size: 13px;
    font-weight: 400;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.player__title {
    font-size: 13px;
    font-weight: 400;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.player__controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.player__btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.player__btn:hover {
    opacity: 0.7;
}

.player__btn:active {
    opacity: 0.5;
}

.player__btn--play {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #ffffff;
    font-size: 16px;
}

.player__btn--stop {
    width: 32px;
    height: 32px;
    color: #666;
    font-size: 14px;
}

.player__volume {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 4px;
}

.player__volume-icon {
    width: 16px;
    height: 16px;
    color: #666;
    flex-shrink: 0;
}

.player__volume-slider {
    width: 80px;
    height: 3px;
    -webkit-appearance: none;
    appearance: none;
    background: #e7e7e7;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.player__volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #666;
    cursor: pointer;
    transition: background 0.2s ease;
}

.player__volume-slider::-webkit-slider-thumb:hover {
    background: #444;
}

.player__volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #666;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease;
}

.player__volume-slider::-moz-range-thumb:hover {
    background: #444;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding-bottom: 120px;
    }

    .container {
        padding: 24px 16px;
    }

    header {
        margin-bottom: 32px;
        padding: 16px 0;
    }

    header h1 {
        font-size: 2em;
    }

    .search-container {
        margin-bottom: 32px;
    }

    .genre-section {
        padding: 24px 20px;
        margin-bottom: 32px;
    }

    .genre-title {
        font-size: 1.3em;
        margin-bottom: 20px;
    }

    .stations-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .station-button {
        padding: 14px 16px;
        font-size: 14px;
    }

  .player {
    height: auto;
    min-height: 96px;
    flex-wrap: wrap;
    padding: 12px 14px;
    justify-content: center;
  }

  /* ✅ Top row becomes full width and centers its contents */
  .player__top {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;   /* this centers the whole group */
    gap: 12px;
    flex-wrap: nowrap;
  }

  .player__art {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    flex-shrink: 0;
  }

  .player__text {
    flex: 0 1 auto;
    min-width: 120px;
    max-width: calc(100% - 68px); /* 56px art + 12px gap */
    text-align: center;
  }

  .player__station {
    font-size: 14px;
    text-align: center;
  }

  .player__artist,
  .player__title {
    font-size: 12px;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* ✅ Controls centered underneath */
  .player__controls {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
  }

  .player__volume {
    margin-left: 0;
    display: none; /* Hide volume slider on mobile - use device volume controls */
  }

  .player__volume-slider {
    width: 100px;
  }

}

@media (max-width: 480px) {
    .container {
        padding: 20px 12px;
    }

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

    .search-input {
        font-size: 14px;
        padding: 12px 45px 12px 15px;
    }

    .genre-section {
        padding: 20px 16px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}
