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

:root {
    --primary-color: #6B46C1;
    --primary-dark: #553C9A;
    --primary-light: #8B5CF6;
    --secondary-color: #9333EA;
    --accent-yellow: #FBBF24;
    --accent-yellow-bright: #FCD34D;
    --text-color: #ffffff;
    --text-secondary: #FBBF24;
    --shadow: 0 10px 30px rgba(107, 70, 193, 0.4);
    --shadow-yellow: 0 5px 20px rgba(251, 191, 36, 0.5);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--primary-dark);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(147, 51, 234, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(139, 92, 246, 0.25) 0%, transparent 50%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
    margin: 0;
    box-sizing: border-box;
}

/* Formas geométricas decorativas no fundo - sutis e orgânicas */
body::before {
    content: '';
    position: fixed;
    top: -40%;
    right: -15%;
    width: 600px;
    height: 600px;
    background: var(--accent-yellow);
    border-radius: 50% 40% 60% 30%;
    opacity: 0.06;
    z-index: 0;
    animation: float 25s ease-in-out infinite;
    filter: blur(60px);
}

body::after {
    content: '';
    position: fixed;
    bottom: -25%;
    left: -8%;
    width: 550px;
    height: 550px;
    background: var(--primary-light);
    border-radius: 40% 60% 50% 70% / 60% 40% 70% 50%;
    opacity: 0.08;
    z-index: 0;
    animation: floatReverse 30s ease-in-out infinite;
    filter: blur(70px);
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(50px, 50px) rotate(180deg);
    }
}

@keyframes floatReverse {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(-50px, -50px) rotate(-180deg);
    }
}

.container {
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.radio-card {
    background: rgba(107, 70, 193, 0.4);
    backdrop-filter: blur(20px);
    border-radius: 50px 25px 50px 25px;
    padding: 50px 40px;
    box-shadow: 
        0 25px 80px rgba(107, 70, 193, 0.4),
        0 10px 40px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 2px 10px rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(251, 191, 36, 0.25);
    text-align: center;
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

/* Decoração geométrica no card - mais sutil */
.radio-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: var(--accent-yellow);
    border-radius: 50% 40% 60% 30%;
    opacity: 0.08;
    z-index: -1;
    filter: blur(40px);
}

.radio-card::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -15%;
    width: 350px;
    height: 350px;
    background: var(--primary-light);
    border-radius: 60% 40% 50% 70%;
    opacity: 0.1;
    z-index: -1;
    filter: blur(50px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-container {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.radio-logo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: contain;
    object-position: center;
    border: 3px solid rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.15);
    background: #ffffff;
    background-color: #ffffff;
    padding: 18px;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
    display: block;
    box-sizing: border-box;
}

.radio-logo:hover {
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Garantir fundo branco para todos os tipos de imagem (PNG, JPG, SVG, etc) */
.radio-logo[src$=".png"],
.radio-logo[src$=".jpg"],
.radio-logo[src$=".jpeg"],
.radio-logo[src$=".svg"],
.radio-logo[src$=".gif"],
.radio-logo[src$=".webp"],
.radio-logo[src*=".png"],
.radio-logo[src*=".jpg"],
.radio-logo[src*=".jpeg"],
.radio-logo[src*=".svg"] {
    background-color: #ffffff !important;
    background: #ffffff !important;
}

.radio-name {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-color);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.2;
}

.description-container {
    min-height: 80px;
    margin-bottom: 35px;
    position: relative;
}

.radio-description,
.track-info-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    line-height: 1.7;
    padding: 18px 24px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    text-align: center;
}

.track-info-description {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.track-artist-large {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.track-name-large {
    font-size: 18px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.description-container .radio-description:not(.active),
.description-container .track-info-description:not(.active) {
    opacity: 0;
    transform: translateY(10px);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    pointer-events: none;
    visibility: hidden;
}

.description-container .radio-description.active,
.description-container .track-info-description.active {
    opacity: 1;
    transform: translateY(0);
    position: relative;
    visibility: visible;
}

/* Garantir que apenas um esteja visível por vez */
.radio-description,
.track-info-description {
    width: 100%;
}

.player-container {
    margin: 30px 0;
}

.player-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.play-btn {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-yellow) 0%, var(--accent-yellow-bright) 100%);
    border: 3px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--primary-dark);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-weight: bold;
}

.play-btn:hover {
    transform: scale(1.08);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.35),
        0 6px 16px rgba(0, 0, 0, 0.25),
        inset 0 2px 4px rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.play-btn:active {
    transform: scale(0.98);
}

.play-btn:active {
    transform: scale(0.95);
}

.play-btn.playing .play-icon {
    display: none;
}

.play-btn:not(.playing) .pause-icon {
    display: none;
}

.pause-icon {
    font-size: 28px;
}

.player-info {
    margin-top: 20px;
}

.now-playing {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-color);
    min-height: 100px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.track-cover-container {
    flex-shrink: 0;
}

.track-cover {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.track-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.track-status {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.9;
}

.track-status.playing {
    color: var(--accent-yellow);
}

.track-status.paused {
    color: rgba(255, 255, 255, 0.7);
}

.track-status.connecting,
.track-status.buffering {
    color: #3b82f6;
}

.track-status.error {
    color: #ef4444;
}

.track-artist {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.track-name {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Animação suave para capa */
.track-cover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.track-cover:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Layout quando há capa */
.now-playing.has-cover .track-info {
    text-align: left;
}

/* Layout quando não há capa */
.now-playing:not(.has-cover) {
    justify-content: center;
}

.now-playing:not(.has-cover) .track-info {
    text-align: center;
}

.volume-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}

.volume-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 18px;
    color: var(--text-color);
}

.volume-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.volume-control > span:first-of-type {
    font-size: 24px;
}

#volumeValue {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-yellow);
    min-width: 45px;
    text-align: center;
    background: rgba(251, 191, 36, 0.2);
    padding: 4px 8px;
    border-radius: 8px;
}

#volumeSlider {
    width: 200px;
    height: 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    -webkit-appearance: none;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-yellow);
    cursor: pointer;
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.3),
        0 0 0 2px rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

#volumeSlider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-yellow);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.social-share {
    margin-top: 35px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-share h3 {
    font-size: 18px;
    margin-bottom: 18px;
    color: var(--text-color);
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 14px 18px;
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.18);
}

.download-section {
    margin-top: 35px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
}

.download-section h2 {
    font-size: 22px;
    margin-bottom: 22px;
    color: var(--text-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-radius: 18px;
    text-decoration: none;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.download-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.2);
}

.download-btn span {
    font-size: 32px;
}

.download-btn .btn-label {
    display: block;
    font-size: 12px;
    opacity: 0.8;
}

.download-btn .btn-text {
    display: block;
    font-size: 18px;
    font-weight: bold;
}

.install-pwa-prompt {
    margin-top: 25px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.install-pwa-prompt p {
    margin-bottom: 16px;
    font-size: 15px;
    color: var(--text-color);
    font-weight: 500;
}

.install-btn {
    padding: 12px 28px;
    background: var(--accent-yellow);
    color: var(--primary-dark);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Responsive */
/* Responsive */
@media (max-width: 600px) {
    body::before,
    body::after {
        display: none;
    }
    
    .radio-card {
        padding: 35px 25px;
        border-radius: 35px 20px 35px 20px;
    }
    
    .radio-logo {
        width: 150px;
        height: 150px;
        padding: 15px;
        background: #ffffff !important;
        background-color: #ffffff !important;
    }
    
    .radio-name {
        font-size: 26px;
    }
    
    .description-container {
        min-height: 70px;
        margin-bottom: 25px;
    }
    
    .radio-description,
    .track-info-description {
        padding: 14px 18px;
        font-size: 15px;
    }
    
    .track-artist-large {
        font-size: 20px;
    }
    
    .track-name-large {
        font-size: 16px;
    }
    
    .play-btn {
        width: 85px;
        height: 85px;
        font-size: 32px;
    }
    
    .now-playing {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px 20px;
        min-height: auto;
    }
    
    .track-cover {
        width: 100px;
        height: 100px;
        margin-bottom: 12px;
    }
    
    .track-info {
        width: 100%;
        align-items: center;
    }
    
    .track-artist {
        font-size: 18px;
    }
    
    .track-name {
        font-size: 14px;
    }
    
    #volumeSlider {
        width: 140px;
    }
    
    .volume-control {
        padding: 12px 16px;
        gap: 10px;
    }
    
    .download-buttons {
        gap: 12px;
    }
    
    .download-btn {
        padding: 14px 20px;
        border-radius: 16px;
    }
    
    .share-buttons {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .share-btn {
        padding: 12px 16px;
    }
}

@media (max-width: 400px) {
    .radio-logo {
        width: 100px;
        height: 100px;
    }
    
    .radio-name {
        font-size: 20px;
    }
    
    .play-btn {
        width: 60px;
        height: 60px;
        font-size: 22px;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(251, 191, 36, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-yellow);
    animation: spin 1s ease-in-out infinite;
}

/* Logo quando está tocando - sem animações, apenas estado visual */
.radio-logo.playing {
    border-color: rgba(255, 255, 255, 0.3);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Indicador visual quando precisa de interação do usuário */
body.needs-interaction .play-btn {
    animation: pulse-attention 2s ease-in-out infinite;
}

@keyframes pulse-attention {
    0%, 100% {
        box-shadow: 
            0 10px 30px rgba(0, 0, 0, 0.3),
            0 4px 12px rgba(0, 0, 0, 0.2),
            inset 0 2px 4px rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 
            0 12px 36px rgba(0, 0, 0, 0.4),
            0 6px 16px rgba(0, 0, 0, 0.3),
            inset 0 2px 4px rgba(255, 255, 255, 0.4);
    }
}
