:root {
    /* Tons do Atlântico + Basalto */
    --ocean-deep: #0a1628;
    --ocean-dark: #0f1e30;
    --ocean-blue: #1a3a52;
    --basalt-dark: #1c2632;
    --basalt: #2a3744;
    --primary-color: #0891b2;
    --primary-dark: #0e7490;
    --secondary-color: #06b6d4;
    --accent: #22d3ee;
    --accent-bright: #67e8f9;
    --background: #0a1628;
    --surface: rgba(26, 58, 82, 0.4);
    --surface-light: rgba(42, 55, 68, 0.5);
    --text-primary: #f0f9ff;
    --text-secondary: #bae6fd;
    --shadow: rgba(0, 0, 0, 0.4);
    --glass-border: rgba(103, 232, 249, 0.15);
    --glass-shadow: rgba(34, 211, 238, 0.2);
}

/* Tema Claro */
body.light-theme {
    --ocean-deep: #e0f2fe;
    --ocean-dark: #bae6fd;
    --ocean-blue: #7dd3fc;
    --basalt-dark: #cbd5e1;
    --basalt: #94a3b8;
    --primary-color: #0891b2;
    --primary-dark: #0e7490;
    --secondary-color: #06b6d4;
    --accent: #0891b2;
    --accent-bright: #06b6d4;
    --background: #f0f9ff;
    --surface: rgba(255, 255, 255, 0.7);
    --surface-light: rgba(224, 242, 254, 0.8);
    --text-primary: #0c4a6e;
    --text-secondary: #075985;
    --shadow: rgba(8, 145, 178, 0.1);
    --glass-border: rgba(6, 182, 212, 0.2);
    --glass-shadow: rgba(8, 145, 178, 0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background:
        radial-gradient(ellipse at top left, rgba(34, 211, 238, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, var(--ocean-deep) 0%, var(--ocean-dark) 50%, var(--basalt-dark) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
    transition: background 0.5s ease, color 0.3s ease;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(34, 211, 238, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.08) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

body.light-theme {
    background:
        radial-gradient(ellipse at top left, rgba(6, 182, 212, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(8, 145, 178, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, var(--ocean-deep) 0%, var(--ocean-dark) 50%, #e0f2fe 100%);
}

body.light-theme::before {
    background:
        radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(8, 145, 178, 0.1) 0%, transparent 40%);
}

.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--surface);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    color: var(--accent-bright);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow:
        0 8px 32px var(--glass-shadow),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow:
        0 12px 40px var(--glass-shadow),
        inset 0 1px 1px rgba(255, 255, 255, 0.15);
    background: rgba(26, 58, 82, 0.6);
    border-color: var(--accent);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.icon-theme {
    width: 24px;
    height: 24px;
}

.container {
    max-width: 800px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.6s ease;
}

.logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.logo svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 8px rgba(79, 209, 197, 0.3));
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.title {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-bright) 0%, var(--accent) 50%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
    filter: drop-shadow(0 0 20px rgba(34, 211, 238, 0.3));
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 2px;
}

.player-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.player-card,
.info-card,
.category-card {
    background: var(--surface);
    border-radius: 24px;
    padding: 2rem;
    box-shadow:
        0 8px 32px var(--glass-shadow),
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.6s ease;
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.player-card::before,
.info-card::before,
.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--accent-bright),
        transparent
    );
    opacity: 0.3;
}

.category-card {
    padding: 1.5rem;
}

.category-card h3 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-btn {
    background: var(--surface-light);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow:
        0 4px 16px var(--glass-shadow),
        0 0 20px rgba(34, 211, 238, 0.2);
    border-color: var(--accent);
}

.category-btn.active {
    background: linear-gradient(135deg, var(--accent), var(--secondary-color));
    color: white;
    font-weight: 600;
    border-color: var(--accent-bright);
    box-shadow:
        0 4px 16px var(--glass-shadow),
        0 0 30px rgba(34, 211, 238, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.now-playing {
    margin-bottom: 2rem;
}

.track-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.track-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.visualizer {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 40px;
    justify-content: center;
}

.bar {
    width: 6px;
    background: linear-gradient(to top, var(--primary-color), var(--accent));
    border-radius: 3px;
    animation: pulse 1s ease-in-out infinite;
}

.bar:nth-child(1) { animation-delay: 0s; height: 20%; }
.bar:nth-child(2) { animation-delay: 0.2s; height: 40%; }
.bar:nth-child(3) { animation-delay: 0.4s; height: 60%; }
.bar:nth-child(4) { animation-delay: 0.6s; height: 40%; }
.bar:nth-child(5) { animation-delay: 0.8s; height: 20%; }

@keyframes pulse {
    0%, 100% { height: 20%; opacity: 0.5; }
    50% { height: 100%; opacity: 1; }
}

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.control-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: 1px solid var(--glass-border);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow:
        0 8px 24px var(--glass-shadow),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.control-btn:hover::before {
    opacity: 1;
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow:
        0 12px 32px var(--glass-shadow),
        0 0 40px rgba(34, 211, 238, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
    border-color: var(--accent-bright);
}

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

.control-btn.secondary {
    width: 50px;
    height: 50px;
    background: var(--surface-light);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow:
        0 4px 16px var(--glass-shadow),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.control-btn.secondary:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow:
        0 8px 24px var(--glass-shadow),
        0 0 30px rgba(34, 211, 238, 0.2);
}

.icon {
    width: 24px;
    height: 24px;
}

.hidden {
    display: none !important;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.volume-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.volume-slider {
    width: 100px;
    height: 6px;
    border-radius: 3px;
    background: var(--surface-light);
    outline: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--secondary-color);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
}

.extra-controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.control-btn-small {
    background: var(--surface-light);
    border: none;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.control-btn-small:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.control-btn-small.active {
    background: var(--accent);
    color: white;
}

.icon-small {
    width: 18px;
    height: 18px;
}

.progress-container {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--surface-light);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 0.5rem;
    position: relative;
}

.progress-bar:hover {
    height: 8px;
    transition: height 0.2s ease;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent), var(--accent-bright));
    width: 0%;
    transition: width 0.3s ease;
    pointer-events: none;
    box-shadow: 0 0 10px var(--accent);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5));
    filter: blur(4px);
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0 2px;
}

.playlist-info {
    text-align: center;
}

.playlist-count {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.info-card h3 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.info-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.playlist-card,
.history-card {
    background: var(--surface);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow:
        0 8px 32px var(--glass-shadow),
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.6s ease 0.3s both;
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--glass-border);
    margin-top: 1.5rem;
    position: relative;
    overflow: hidden;
}

.playlist-card::before,
.history-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--accent-bright),
        transparent
    );
    opacity: 0.3;
}

.playlist-header,
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.playlist-header h3,
.history-header h3 {
    color: var(--accent);
    font-size: 1.25rem;
    margin: 0;
}

.toggle-playlist,
.toggle-history {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.toggle-playlist:hover,
.toggle-history:hover {
    background: var(--surface-light);
    color: var(--accent);
}

.toggle-playlist svg,
.toggle-history svg {
    transition: transform 0.3s ease;
}

.toggle-playlist.open svg,
.toggle-history.open svg {
    transform: rotate(180deg);
}

.playlist-list,
.history-list {
    max-height: 300px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.playlist-list.hidden,
.history-list.hidden {
    max-height: 0;
    overflow: hidden;
}

.playlist-empty,
.history-empty {
    color: var(--text-secondary);
    text-align: center;
    padding: 1rem;
    font-size: 0.875rem;
}

.playlist-item,
.history-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--surface-light);
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.playlist-item:hover,
.history-item:hover {
    background: var(--surface-light);
    color: var(--text-primary);
    padding-left: 1rem;
}

.playlist-item:last-child,
.history-item:last-child {
    border-bottom: none;
}

.playlist-item.playing {
    background: var(--surface-light);
    color: var(--accent);
    font-weight: 600;
    border-left: 3px solid var(--accent);
}

.playlist-item-number {
    color: var(--text-secondary);
    font-weight: normal;
    min-width: 30px;
}

.playlist-item.playing .playlist-item-number {
    color: var(--accent);
    font-weight: bold;
}

.history-item-number {
    color: var(--accent);
    font-weight: bold;
    min-width: 20px;
}

.footer {
    text-align: center;
    margin-top: 3rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    animation: fadeIn 1s ease;
}

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Botão de Compartilhar Flutuante */
.share-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--secondary-color));
    border: 1px solid var(--glass-border);
    color: white;
    cursor: pointer;
    box-shadow:
        0 8px 32px var(--glass-shadow),
        0 0 40px rgba(34, 211, 238, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    animation: fadeIn 0.5s ease, pulse-share 2s ease-in-out infinite;
}

.share-fab:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow:
        0 12px 40px var(--glass-shadow),
        0 0 60px rgba(34, 211, 238, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
    border-color: var(--accent-bright);
}

.share-fab:active {
    transform: scale(0.95);
}

.share-fab svg {
    width: 28px;
    height: 28px;
}

@keyframes pulse-share {
    0%, 100% {
        box-shadow:
            0 8px 32px var(--glass-shadow),
            0 0 40px rgba(34, 211, 238, 0.4);
    }
    50% {
        box-shadow:
            0 8px 32px var(--glass-shadow),
            0 0 60px rgba(34, 211, 238, 0.6);
    }
}

/* Modal de Compartilhamento */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.share-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.share-modal-content {
    background: var(--surface);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 24px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 80px var(--glass-shadow),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    animation: slideUp 0.4s ease;
}

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

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.share-modal-header h3 {
    color: var(--accent);
    margin: 0;
    font-size: 1.5rem;
}

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: var(--surface-light);
    color: var(--accent);
    transform: rotate(90deg);
}

.close-modal svg {
    width: 24px;
    height: 24px;
}

.share-message {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.share-btn {
    background: var(--surface-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.share-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 209, 197, 0.3);
}

.share-btn svg {
    width: 32px;
    height: 32px;
}

/* Cores específicas para cada rede social */
.share-btn.whatsapp:hover {
    background: #25D366;
}

.share-btn.facebook:hover {
    background: #1877F2;
}

.share-btn.twitter:hover {
    background: #1DA1F2;
}

.share-btn.telegram:hover {
    background: #0088cc;
}

.share-btn.linkedin:hover {
    background: #0077B5;
}

.share-btn.email:hover {
    background: #EA4335;
}

.share-btn.copy:hover {
    background: var(--accent);
}

.share-btn.copied {
    background: #48bb78;
    color: white;
}

@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .player-card,
    .info-card {
        padding: 1.5rem;
    }

    .volume-control {
        display: none;
    }

    .controls {
        gap: 0.5rem;
    }
}
