* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: radial-gradient(circle at 20% 80%, rgb(30, 20, 40) 0%, rgb(15, 10, 20) 50%, rgb(10, 10, 15) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    transition: background 0.8s ease-in-out;
}
header {
    background: rgba(0,0,0,0.0);
    color: white;
    padding: 1rem;
    text-align: center;
    backdrop-filter: blur(10px);
}
nav a {
    color: white;
    margin: 0 1rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    cursor: pointer;
}
nav a:hover {
    color: #ffd700;
}
main {
    padding: 2rem 0;
    min-height: calc(100vh - 190px);
    width: 100%;
    margin: 0;
}
.view-toggle {
    text-align: right;
    margin-bottom: 1rem;
	margin-right: 2%;
}
#toggleViewBtn {
    background: #7c6193;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}
#toggleViewBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(143,119,163,0.4);
}
.stations-grid {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 1rem 0;
    height: 550px;
    scroll-behavior: smooth;
    padding-bottom: 1rem;
    padding-left: 2%;
    padding-right: 10%;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.stations-grid::-webkit-scrollbar {
    display: none;
}
.stations-grid--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    padding: 1rem 2%;
}
.station-card {
    flex: 0 0 320px;
    height: 480px;
    min-height: 400px;
    max-height: 550px;
    scroll-snap-align: start;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 2px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0;
    padding-top: 30px;
}
.stations-grid--grid .station-card {
    flex: none;
    width: 200px;
    height: 200px;
    min-height: 200px;
    max-height: 200px;
}
.station-art {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 0 !important;
}
.station-cover {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    filter: brightness(0.5) contrast(1.1) !important;
    transition: filter 0.4s, opacity 0.5s ease-in-out !important;
}
.station-card:hover .station-cover {
    filter: brightness(0.9) contrast(1.0) !important;
}
.station-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent 0%, rgba(0,0,0,0.8) 70%);
    z-index: 1;
    transition: opacity 0.4s;
    pointer-events: none;
}
.station-card:hover::after {
    background: linear-gradient(transparent 0%, rgba(0,0,0,0.9) 60%);
}
.station-content {
    position: relative;
    z-index: 2;
    padding: 1.5rem;
    color: white;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.station-card h3 {
    font-size: 1.9rem;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    font-family: "Bitcount Grid Single", system-ui;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings:
        "slnt" 0,
        "CRSV" 0.9,
        "ELSH" 0,
        "ELXP" 0;
}
.stations-grid--grid .station-card h3 {
    font-size: 1.2rem;
}
.station-track {
    margin-top: auto;
}
.track-title-small {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    text-shadow: 0 1px 5px rgba(0,0,0,0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.stations-grid--grid .track-title-small {
    font-size: 0.8rem;
}
.artist-name-small {
    font-size: 0.85rem;
    opacity: 0.9;
    text-shadow: 0 1px 5px rgba(0,0,0,0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stations-grid--grid .artist-name-small {
    font-size: 0.7rem;
}
.station-card:hover:not(.active-station) {
    transform: translateY(10px) scale(1.03) !important;
    border-color: rgba(255,255,255,0.4) !important;
    box-shadow: 0 25px 50px rgba(0,0,0,0.6) !important;
}
.station-card.active-station {
    position: relative !important;
    z-index: 10 !important;
}
#player {
    position: fixed;
    bottom: 50px;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(20px);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
}
.player-container {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 1rem;
    width: 100%;
}
.album-art {
    flex-shrink: 0;
}
#albumCover {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
}
.track-info {
    flex: 1;
    color: white;
    min-width: 0;
}
#currentStationName {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}
.track-title {
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.125rem;
    cursor: pointer;
}
.artist-name {
    font-size: 0.9rem;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
#audioPlayer {
    display: none;
}
#stopBtn {
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
}
#stopBtn {
    background: #7c6193;
    box-shadow: 0 4px 15px rgba(143,119,163,0.4);
}
#stopBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(143,119,163,0.6);
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
#site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 1rem;
    text-align: center;
    z-index: 500;
}
#site-footer nav a {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 1.5rem;
    font-size: 0.9rem;
}
#site-footer nav a:hover {
    color: #ffd700;
}
/* Station Page Styles */
.station-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    color: white;
}
.station-page__upper {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
.station-page__cover {
    width: 300px;
    height: 300px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    transition: opacity 0.5s ease-in-out;
}
.station-page__details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.station-page__name {
    font-size: 2.5rem;
    font-family: "Bitcount Grid Single", system-ui;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.9);
}
.station-page__track {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.station-page__artist {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}
.station-page__play-btn {
    background: #7c6193;
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    align-self: flex-start;
}
.station-page__play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(143,119,163,0.6);
}
.station-page__lower {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.station-page__history {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 1rem;
    scrollbar-width: thin;
    scrollbar-color: #7c6193 transparent;
}
.station-page__history::-webkit-scrollbar {
    width: 8px;
}
.station-page__history::-webkit-scrollbar-track {
    background: transparent;
}
.station-page__history::-webkit-scrollbar-thumb {
    background: #7c6193;
    border-radius: 4px;
}
.station-page__history-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.station-page__history-title {
    font-size: 1rem;
    font-weight: 600;
}
.station-page__history-artist {
    font-size: 0.9rem;
    opacity: 0.8;
}
.station-page__history-time {
    font-size: 0.8rem;
    opacity: 0.6;
}
.station-page__meta {
    font-size: 1rem;
    line-height: 1.5;
    opacity: 0.8;
}
.station-page__loading {
    text-align: center;
    color: rgba(255,255,255,0.6);
    padding: 2rem;
}
.station-page__loading div {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}
@media (max-width: 768px) {
    .player-container {
        padding: 1rem;
        flex-wrap: wrap;
    }
    #albumCover {
        width: 50px;
        height: 50px;
    }
    .track-info {
        flex: 1 1 100%;
    }
    .stations-grid {
        gap: 1rem;
        height: 280px;
        padding: 0.5rem 0;
    }
    .stations-grid--grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .station-card {
        flex: 0 0 240px;
        height: 260px;
        min-height: 260px;
        max-height: 260px;
    }
    .stations-grid--grid .station-card {
        width: 150px;
        height: 150px;
        min-height: 150px;
        max-height: 150px;
    }
    .station-card h3 {
        font-size: 1.1rem;
    }
    .stations-grid--grid .station-card h3 {
        font-size: 0.9rem;
    }
    .track-title-small {
        font-size: 0.95rem;
    }
    .stations-grid--grid .track-title-small {
        font-size: 0.7rem;
    }
    .stations-grid--grid .artist-name-small {
        font-size: 0.6rem;
    }
    #site-footer {
        padding: 0.75rem;
    }
    #site-footer nav a {
        margin: 0 1rem;
        font-size: 0.85rem;
    }
    #toggleViewBtn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    .station-page {
        padding: 1rem;
    }
    .station-page__upper {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .station-page__cover {
        width: 200px;
        height: 200px;
        margin: 0 auto;
    }
    .station-page__name {
        font-size: 1.8rem;
    }
    .station-page__track {
        font-size: 1.2rem;
    }
    .station-page__artist {
        font-size: 1rem;
    }
    .station-page__play-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    .station-page__lower {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .station-page__history {
        max-height: 200px;
    }
}
@media (max-width: 480px) {
    .station-card {
        flex: 0 0 220px;
        height: 240px;
        min-height: 240px;
        max-height: 240px;
    }
    .stations-grid {
        height: 260px;
    }
    .stations-grid--grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    .stations-grid--grid .station-card {
        width: 120px;
        height: 120px;
        min-height: 120px;
        max-height: 120px;
    }
    .stations-grid--grid .station-card h3 {
        font-size: 0.8rem;
    }
    .stations-grid--grid .track-title-small {
        font-size: 0.65rem;
    }
    .stations-grid--grid .artist-name-small {
        font-size: 0.55rem;
    }
    #site-footer nav a {
        margin: 0 0.75rem;
        font-size: 0.8rem;
    }
    .station-page__cover {
        width: 150px;
        height: 150px;
    }
    .station-page__name {
        font-size: 1.5rem;
    }
    .station-page__track {
        font-size: 1rem;
    }
    .station-page__artist {
        font-size: 0.9rem;
    }
}