* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(145deg, #eef4f8, #dce7ef);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #1f2933;
}

.app {
    width: min(92vw, 430px);
    padding: 32px 24px;
    text-align: center;
}

.title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
}

.station-name {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.status {
    font-size: 14px;
    color: #5f6c76;
    margin-bottom: 35px;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
}

.control-button {
    width: 64px;
    height: 64px;
    border: none;
    border-radius: 50%;
    background: white;
    font-size: 25px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.control-button:active {
    transform: scale(0.94);
}

.play-button {
    width: 78px;
    height: 78px;
    font-size: 30px;
}

.shuffle-button {
    width: 48px;
    height: 48px;
    padding: 0;
    font-size: 22px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.shuffle-button.shuffle-active {
    background: #d8eaf7;
    color: #155b88;
    outline: 2px solid #7eb7dc;
    outline-offset: 1px;
}

.shuffle-button:focus-visible {
    outline: 2px solid #4b91bd;
    outline-offset: 3px;
}

.stations-button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 14px;
    background: white;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}

.station-list {
    display: block;
    margin-top: 20px;
    background: white;
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);

    max-height: 360px;
    overflow-y: auto;
}

.station-item {
    padding: 14px;
    text-align: left;
    border-radius: 10px;
    cursor: pointer;
}

.station-item:hover {
    background: #eef3f6;
}

.station-item.active {
    background: #dfeaf1;
    font-weight: 600;
}

.station-number {
    display: inline-block;
    width: 35px;
    color: #687781;
}

.filters {
    margin: 20px 0;
}

.search {
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 14px;
    background: white;
    font-size: 16px;
    outline: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 10px;
}

.filter-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.filter-row select {
    flex: 1;
    width: 100%;
    padding: 13px 12px;
    border: none;
    border-radius: 12px;
    background: white;
    font-size: 14px;
    color: #1f2933;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    outline: none;
}

.genre-dropdown {
    position: relative;
    width: 100%;
}

.genre-button {
    width: 100%;
    padding: 13px 12px;
    border: none;
    border-radius: 12px;
    background: white;
    font-size: 14px;
    color: #1f2933;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    outline: none;
    text-align: left;
    cursor: pointer;
}

.genre-menu {
    display: none;
    position: absolute;
    z-index: 100;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: white;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    text-align: left;
}

.genre-menu.open {
    display: block;
}

.genre-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.genre-option:hover {
    background: #eef3f6;
}

.genre-option input {
    width: 17px;
    height: 17px;
    margin: 0;
}

.no-results {
    padding: 20px;
    color: #687781;
    text-align: center;
}


@media (max-width: 430px) {

    .filter-row {
        gap: 8px;
    }

    .filter-row select {
        font-size: 13px;
    }
}

.about {
    margin-top: 28px;
    padding: 20px 18px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 16px;
    text-align: left;
}

.about h2 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.about p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #5f6c76;
}

.footer {
    margin-top: 20px;
    padding-bottom: 10px;
    font-size: 12px;
    color: #7a8790;
    text-align: center;
}

.footer strong {
    color: #5f6c76;
}

/* Station title + info button */
.station-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.station-title-row .station-name {
    margin: 0;
}

.info-button {
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 17px;
    line-height: 1;
    font-family: Arial, sans-serif;
    color: #555;
    cursor: pointer;
    flex-shrink: 0;
}

.info-button:active {
    transform: scale(0.95);
}

/* Station information panel */
.station-info {
    display: none;
    margin: 10px auto 0;
    padding: 12px 16px;
    max-width: 520px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    text-align: left;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.station-info.visible {
    display: block;
}

/* Station information details */
.station-info-logo {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin: 0 auto 10px;
    border-radius: 8px;
}

.station-info-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 6px;
    text-align: center;
}

.station-info-website {
    margin-top: 8px;
    text-align: center;
}

.station-info-website a {
    color: inherit;
    text-decoration: underline;
}
