/* 
   ESTILOS GLOBAIS - "ULTRA MODERNO" RÁDIO MÃE D'ÁGUA 
   (Apple Music / Spotify Premium Style com foco total nas cores da Logo)
*/

:root {
    /* Identidade da Logo (Estrito) */
    --c-primary: #2E2A85; /* Azul Escuro */
    --c-primary-dark: #191652; /* Fundo absoluto */
    --c-secondary: #F9E44B; /* Amarelo Vibrante */
    --c-accent: #F15A24; /* Coral/Alaranjado */
    
    /* Cores Neutas Premium */
    --c-white: #FFFFFF;
    --c-text-primary: rgba(255,255,255,0.95);
    --c-text-secondary: rgba(255,255,255,0.6);
    
    /* Glassmorphism / UI Elements */
    --glass-bg: rgba(46, 42, 133, 0.2);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    
    --font-main: 'Outfit', sans-serif;
    --app-height: 100vh;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body, html {
    width: 100%; height: 100%;
    background-color: var(--c-primary-dark);
    font-family: var(--font-main);
    color: var(--c-text-primary);
    overflow: hidden; /* App Feel - Sem rolagem padrão */
    overscroll-behavior-y: none;
}

/* =======================================================
   AMBIENT BACKGROUND (Blur / Blobs)
======================================================= */
.ambient-bg {
    position: fixed; inset: 0;
    z-index: -1;
    overflow: hidden;
    background: var(--c-primary-dark);
}
.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    border-radius: 50%;
    animation: drift 20s infinite alternate ease-in-out;
}
.blob-1 {
    top: -10%; left: -10%;
    width: 60vw; height: 60vw;
    background: var(--c-primary);
}
.blob-2 {
    bottom: -20%; right: -10%;
    width: 70vw; height: 70vw;
    background: var(--c-accent);
    animation-delay: -5s;
}
.blob-3 {
    top: 40%; left: 30%;
    width: 50vw; height: 50vw;
    background: var(--c-secondary);
    opacity: 0.2;
    animation-duration: 25s;
}

.bg-img-overlay {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0.15; mix-blend-mode: overlay;
    transition: background-image 1s ease;
}

@keyframes drift {
    0% { transform: translate(0,0) scale(1); }
    100% { transform: translate(15%, 15%) scale(1.1); }
}

/* =======================================================
   INTERFACE PRINCIPAL
======================================================= */
.app-view {
    display: flex; flex-direction: column;
    height: 100%; height: var(--app-height);
    max-width: 500px; margin: 0 auto;
    position: relative;
    transition: opacity 0.6s ease-out;
}

/* Header Minimal */
.top-nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px;
    margin-bottom: auto; /* Empurra o resto pro centro */
}
.nav-title {
    font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px;
    color: var(--c-secondary); background: rgba(0,0,0,0.3); padding: 4px 12px; border-radius: 20px;
}
.icon-btn {
    color: var(--c-white); font-size: 28px; cursor: pointer;
    text-decoration: none; opacity: 0.8; transition: 0.2s;
}
.icon-btn:active { transform: scale(0.9); opacity: 1; }

/* =======================================================
   PLAYER STAGE (Centro)
======================================================= */
.player-stage {
    display: flex; flex-direction: column; align-items: center;
    padding: 0 30px; margin-bottom: 20vh; /* Espaço inferior para respirar */
}

/* Disco/Artwork */
.artwork-container {
    position: relative;
    width: 280px; height: 280px;
    border-radius: 50%;
    margin-bottom: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
}
.artwork-image {
    width: 100%; height: 100%; border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--c-secondary);
    z-index: 2; position: relative;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.artwork-container.playing .artwork-image {
    animation: spin 15s linear infinite;
}
.artwork-container.paused .artwork-image {
    transform: scale(0.95);
}

/* Rings Glow (Atrás do vinyl) */
.artwork-rings {
    position: absolute; inset: -20px;
    border-radius: 50%;
    border: 2px solid var(--c-accent);
    opacity: 0; transform: scale(0.8);
    transition: 0.5s;
    z-index: 1;
}
.artwork-container.playing .artwork-rings {
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes pulse-ring {
    0% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 20px var(--c-accent); }
    100% { transform: scale(1.3); opacity: 0; box-shadow: 0 0 50px var(--c-accent); }
}

/* Tipografia Track */
.track-info { text-align: center; width: 100%; margin-bottom: 40px; }
.track-title {
    font-size: 1.8rem; font-weight: 800; color: var(--c-white);
    margin-bottom: 8px; line-height: 1.2;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.track-artist {
    font-size: 1.1rem; font-weight: 500; color: var(--c-secondary);
}

/* Controles de Play e Volume */
.transport-controls {
    display: flex; align-items: center; justify-content: center; gap: 30px; width: 100%;
}
.vol-icon { font-size: 24px; color: var(--c-text-secondary); }

.play-btn-master {
    width: 80px; height: 80px; border-radius: 50%; border: none;
    background: var(--c-secondary); color: var(--c-primary-dark);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; position: relative;
    box-shadow: 0 10px 25px rgba(249, 228, 75, 0.3);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.play-btn-master:active { transform: scale(0.9); }
.shadow-icon { font-size: 40px; }

/* Slider Moderno */
.slider-container { width: 100%; margin-top: 30px; padding: 0 20px; }
.premium-slider {
    width: 100%; -webkit-appearance: none; background: transparent; height: 30px;
}
.premium-slider::-webkit-slider-runnable-track {
    width: 100%; height: 6px; background: rgba(255,255,255,0.15); border-radius: 3px;
}
.premium-slider::-webkit-slider-thumb {
    -webkit-appearance: none; height: 16px; width: 16px; border-radius: 50%;
    background: var(--c-white); margin-top: -5px; box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* =======================================================
   BOTTOM SHEET (Bio e Links - Glassmorphism puro)
======================================================= */
.sheet-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100;
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.sheet-overlay.active { opacity: 1; pointer-events: auto; }

.bottom-sheet {
    position: fixed; bottom: 0; left: 0; right: 0;
    max-width: 500px; margin: 0 auto;
    background: rgba(30, 27, 89, 0.85);
    backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid rgba(255,255,255,0.1);
    border-radius: 30px 30px 0 0;
    padding: 10px 24px 40px 24px;
    z-index: 101;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.2, 1, 0.3, 1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.4);
}
.bottom-sheet.active { transform: translateY(0); }

.sheet-handle {
    width: 40px; height: 5px; background: rgba(255,255,255,0.3);
    border-radius: 3px; margin: 0 auto 24px auto;
}

.sheet-title { color: var(--c-secondary); margin-bottom: 20px; font-weight: 700; font-size: 1.2rem;}

.bio-card {
    background: rgba(0,0,0,0.2); padding: 16px; border-radius: 16px; margin-bottom: 20px;
}
.bio-row {
    font-size: 0.95rem; color: var(--c-white); margin-bottom: 8px; line-height: 1.4;
}
.bio-row:last-child { margin-bottom: 0; }

.contact-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--c-accent); color: var(--c-white);
    text-decoration: none; padding: 16px; border-radius: 16px;
    font-weight: 700; font-size: 1.1rem; margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(241, 90, 36, 0.3);
}

.social-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 12px;
}
.social-item {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px; padding: 12px 0;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    text-decoration: none; color: var(--c-white); transition: background 0.2s;
}
.social-item:active { background: rgba(255,255,255,0.1); }
.social-item .icon { font-size: 24px; color: var(--c-secondary); }
.social-item span { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600;}

/* PWA Toast Minimalista */
.toast-notification {
    position: fixed; top: -100px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 400px;
    background: rgba(255,255,255,0.1); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 20px;
    padding: 16px; display: flex; align-items: center; justify-content: space-between;
    z-index: 999; transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast-notification.show { top: 20px; }
.toast-content { display: flex; align-items: center; gap: 12px; }
.toast-icon { font-size: 32px; color: var(--c-secondary); }
.toast-text { color: var(--c-white); display: flex; flex-direction: column; }
.toast-text strong { font-size: 0.95rem; }
.toast-text span { font-size: 0.8rem; color: var(--c-text-secondary); }
.toast-btn { 
    background: var(--c-secondary); color: var(--c-primary-dark); font-weight: 700;
    border: none; padding: 8px 16px; border-radius: 12px; cursor: pointer;
}

/* Correções para Safari (Altura de Tela de App) */
@supports (-webkit-touch-callout: none) {
    .app-view { height: -webkit-fill-available; }
}
