@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --brand-primary: #8b5cf6;
    --brand-secondary: #6366f1;
    --bg-gradient: linear-gradient(135deg, #f8faff 0%, #eff2ff 100%);
    --card-bg: rgba(255,255,255,0.9);
    --card-bg-solid: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --input-bg: #ffffff;
    --surface-1: #f8fafc;
    --surface-2: #f1f5f9;
    --surface-3: #f5f3ff;
}

body.dark {
    --bg-gradient: linear-gradient(135deg, #0d0d1a 0%, #111827 100%);
    --card-bg: rgba(22,22,40,0.95);
    --card-bg-solid: #16162a;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #2d2d4a;
    --input-bg: #1e1e35;
    --surface-1: #1a1a30;
    --surface-2: #1e1e35;
    --surface-3: #1e1a35;
}

body, html {
    min-height: 100%;
    margin: 0;
    overflow-x: hidden;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    transition: background 0.3s, color 0.3s;
}

/* Dark mode overrides */
body.dark .glass-card {
    background: rgba(22, 22, 42, 0.9) !important;
    backdrop-filter: blur(24px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(139, 92, 246, 0.12) !important;
    color: var(--text-primary) !important;
}

/* Remove white frame when showing dark-themed player/history views */
#app-card:has(#section-result.active) {
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
}

body.dark .app-section,
body.dark .new-homepage,
body.dark .section-card,
body.dark .home-card,
body.dark .modal-content,
body.dark .sidebar,
body.dark .picker-item,
body.dark .style-btn,
body.dark .history-item,
body.dark .playlist-item,
body.dark .menu-dropdown,
body.dark .signin-card { background: var(--card-bg-solid) !important; color: var(--text-primary) !important; border-color: var(--border-color) !important; }

/* Ensure text and placeholder always visible in both modes */
textarea, input[type=text] { color: #1e293b !important; }
textarea::placeholder { color: #94a3b8 !important; }

body.dark textarea,
body.dark input[type=text],
body.dark input[type=password] { background: var(--input-bg) !important; color: var(--text-primary) !important; border-color: var(--border-color) !important; }
body.dark textarea::placeholder { color: #64748b !important; }

body.dark .text-slate-500,
body.dark .text-slate-400,
body.dark .text-slate-600 { color: var(--text-secondary) !important; }

body.dark .text-slate-800,
body.dark .text-slate-900,
body.dark h1, body.dark h2, body.dark h3 { color: var(--text-primary) !important; }

body.dark .bg-white,
body.dark [style*="background: white"],
body.dark [style*="background:#fff"],
body.dark [style*="background: #fff"] { background: var(--card-bg-solid) !important; }

body.dark .border-slate-100,
body.dark .border-slate-200 { border-color: var(--border-color) !important; }

body.dark .home-hero { background: transparent !important; }
body.dark .home-tagline, body.dark .home-subtagline { color: var(--text-secondary) !important; }
body.dark .history-empty, body.dark .history-title { color: var(--text-primary) !important; }
body.dark .history-meta { color: var(--text-secondary) !important; }
body.dark .tab-btn { color: var(--text-secondary) !important; }
body.dark .tab-btn.active { color: #8b5cf6 !important; border-color: #8b5cf6 !important; }
body.dark .picker-item { color: var(--text-secondary) !important; }
body.dark .picker-item.active { color: #8b5cf6 !important; }
body.dark .style-btn { border-color: var(--border-color) !important; }
body.dark .style-title { color: var(--text-primary) !important; }
body.dark .style-desc { color: var(--text-secondary) !important; }
body.dark .bento-quote, body.dark .bento-history { background: var(--card-bg-solid) !important; }
body.dark .home-card-title { color: var(--text-primary) !important; }
body.dark .home-card-desc { color: var(--text-secondary) !important; }
body.dark .home-card { background: var(--surface-1) !important; border-color: var(--border-color) !important; }
body.dark .sidebar-overlay { background: rgba(0,0,0,0.7) !important; }
body.dark .hamburger-btn span { background: #1e293b !important; }


/* ── Top Bar (consolidated navigation) ────────────────────────────────── */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 200;
}
body.dark .top-bar {
    background: rgba(15, 15, 30, 0.9) !important;
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}
.top-bar-logo {
    font-size: 1.3rem;
}
.top-bar-brand {
    font-size: 1rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.02em;
}
body.dark .top-bar-brand { color: #f1f5f9 !important; }

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-bar-balance {
    font-size: 0.8rem;
    font-weight: 700;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
}
body.dark .top-bar-balance {
    background: rgba(139, 92, 246, 0.15) !important;
    color: #a78bfa !important;
}

.top-bar-nav-group {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    margin-left: 0.25rem;
    padding-left: 0.5rem;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
}
body.dark .top-bar-nav-group { border-color: rgba(255, 255, 255, 0.08) !important; }

.top-bar-icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}
.top-bar-icon-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}
body.dark .top-bar-icon-btn { color: #94a3b8 !important; }
body.dark .top-bar-icon-btn:hover { background: rgba(255, 255, 255, 0.08) !important; }

/* Nav EQ animation (playing indicator) */
.nav-eq {
    display: none;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
}

.nav-eq.active {
    display: flex;
}

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

.nav-eq-bar {
    width: 3px;
    background: #8b5cf6;
    border-radius: 1px;
    animation: nav-eq-bounce 1s ease-in-out infinite;
}

.nav-eq-bar:nth-child(1) {
    height: 6px;
    animation-delay: 0s;
}

.nav-eq-bar:nth-child(2) {
    height: 10px;
    animation-delay: 0.2s;
}

.nav-eq-bar:nth-child(3) {
    height: 4px;
    animation-delay: 0.4s;
}

@keyframes nav-eq-bounce {
    0%, 100% { height: 4px; }
    50% { height: 14px; }
}

.top-bar-profile-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
}
.top-bar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(99, 102, 241, 0.3);
}

/* Profile dropdown */
.top-bar-dropdown {
    position: fixed;
    top: 60px;
    right: 1.25rem;
    background: white;
    border-radius: 14px;
    padding: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
    min-width: 220px;
    display: none;
    z-index: 201;
}
.top-bar-dropdown.open { display: block; animation: fadeIn 0.15s ease; }
body.dark .top-bar-dropdown { background: #1e1e35 !important; border-color: #2d2d4a !important; }

.top-bar-dropdown-name {
    padding: 0.5rem 0.75rem 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
}
body.dark .top-bar-dropdown-name { color: #f1f5f9 !important; }

.top-bar-dropdown-email {
    padding: 0 0.75rem 0.5rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

.top-bar-dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 0.25rem 0;
}
body.dark .top-bar-dropdown-divider { background: #2d2d4a !important; }

.top-bar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: none;
    background: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background 0.15s;
}
.top-bar-dropdown-item:hover { background: #f5f3ff; }
body.dark .top-bar-dropdown-item { color: #f1f5f9 !important; }
body.dark .top-bar-dropdown-item:hover { background: #2d2d4a !important; }
.top-bar-dropdown-item.danger { color: #ef4444 !important; }
.top-bar-dropdown-item i { width: 16px; text-align: center; }

.top-bar-dropdown-balance {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #6366f1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
body.dark .top-bar-dropdown-balance { color: #a78bfa !important; }

/* Top bar mobile responsive */
@media (max-width: 640px) {
    .top-bar { padding: 0 0.75rem; }
    .top-bar-brand { font-size: 0.85rem; }
    .balance-label { display: none; } /* "motivations" hidden on mobile, shows "3 left" */
    .top-bar-balance { font-size: 0.7rem; padding: 0.25rem 0.5rem; }
    .top-bar-icon-btn { width: 32px; height: 32px; font-size: 0.85rem; }
    .top-bar-avatar { width: 32px; height: 32px; }
    .top-bar-profile-btn { width: 32px; height: 32px; }
    .top-bar-nav-group { gap: 0; padding-left: 0.35rem; margin-left: 0.15rem; }
}

/* Hide old navigation elements — replaced by top bar */
.hamburger-btn, .sidebar, .sidebar-overlay, .top-nav, .home-btn, .tab-header { display: none !important; }

.full-page-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4.5rem 1rem 2rem;
}

.glass-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(24px);
    border-radius: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.6);
    border: none;
    width: 100%;
    max-width: 560px;
    padding: 2.5rem;
    transition: all 0.3s ease;
}

.gradient-text {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── Redesigned Goal Section ────────────────────────────────────────────── */
.goal-hero {
    text-align: center;
    margin-bottom: 1.5rem;
}

.goal-heading {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

body.dark .goal-heading { color: #f1f5f9 !important; }

.goal-subheading {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
    max-width: 440px;
    margin: 0 auto;
}

body.dark .goal-subheading { color: #94a3b8; }

.goal-input-group {
    margin-bottom: 1.25rem;
}

.goal-textarea {
    width: 100%;
    padding: 1.25rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: all 0.2s;
    background: white;
    color: #1e293b;
    line-height: 1.5;
}

.goal-textarea::placeholder {
    color: #94a3b8;
}

.goal-textarea:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.15);
}

body.dark .goal-textarea {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f1f5f9 !important;
}

body.dark .goal-textarea::placeholder { color: #64748b !important; }

body.dark .goal-textarea:focus {
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2) !important;
}

.goal-cta {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #a78bfa, #6366f1);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

.goal-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.35);
}

.goal-cta:active {
    transform: translateY(0);
}

.goal-cta i {
    font-size: 0.85rem;
    transition: transform 0.2s;
}

.goal-cta:hover i {
    transform: translateX(3px);
}

.goal-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1.25rem;
    gap: 0.75rem;
}

.goal-footer .motivations-badge {
    margin-top: 0;
}

.goal-sample {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.goal-sample-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    background: transparent;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.goal-sample-btn:hover {
    border-color: #a78bfa;
    color: #6366f1;
}

body.dark .goal-sample-btn {
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #94a3b8 !important;
}

body.dark .goal-sample-btn:hover {
    border-color: #8b5cf6 !important;
    color: #a78bfa !important;
}

.goal-sample-btn .sample-play-icon {
    font-size: 0.65rem;
}

/* Sample EQ animation (inside sample button) */
.sample-eq {
    display: none;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}

.sample-eq.active {
    display: flex;
}

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

.sample-eq-bar {
    width: 2.5px;
    background: #6366f1;
    border-radius: 1px;
    animation: nav-eq-bounce 1s ease-in-out infinite;
}

.goal-sample-btn.is-playing .sample-eq-bar {
    background: currentColor;
}

.sample-eq-bar:nth-child(1) { height: 5px; animation-delay: 0s; }
.sample-eq-bar:nth-child(2) { height: 9px; animation-delay: 0.2s; }
.sample-eq-bar:nth-child(3) { height: 3px; animation-delay: 0.4s; }

.btn-primary {
    background: linear-gradient(135deg, #a78bfa, #6366f1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 12px 24px rgba(124, 58, 237, 0.2);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(124, 58, 237, 0.3);
}

.btn-primary:active:not(:disabled) {
    transform: scale(0.95);
    transition-duration: 0.1s;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.logo-box {
    width: 64px;
    height: 64px;
    background: #f5f3ff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
}

.lightning-m {
    width: 36px;
    height: 36px;
    fill: #8b5cf6;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #e2e8f0;
    transition: .4s;
    border-radius: 30px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider { background: linear-gradient(135deg, #a78bfa, #818cf8); }
input:checked + .slider:before { transform: translateX(26px); }

.app-section { display: none; position: relative; z-index: 1; }
.app-section.active { display: block; animation: slideInRight 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.app-section.slide-out-left { animation: slideOutLeft 0.25s cubic-bezier(0.55, 0, 1, 0.45) forwards; }
.app-section.slide-out-right { animation: slideOutRight 0.25s cubic-bezier(0.55, 0, 1, 0.45) forwards; }
.app-section.slide-in-left { animation: slideInLeft 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.app-section.slide-in-up { animation: slideInUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.app-section.slide-out-down { animation: slideOutDown 0.25s cubic-bezier(0.55, 0, 1, 0.45) forwards; }

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
@keyframes confettiFall {
    0% { opacity: 1; transform: translateY(0) rotate(0deg); }
    100% { opacity: 0; transform: translateY(110vh) rotate(360deg); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutLeft {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-60px); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-60px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(60px); }
}
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(80px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideOutDown {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(80px); }
}

.loader {
    border: 6px solid #f1f5f9;
    border-top: 6px solid #8b5cf6;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Empty state styling */
.empty-state-content { text-align: center; }
.empty-state-title { color: white; font-weight: 700; font-size: 1.1rem; }
.empty-state-subtitle { color: #94a3b8; font-size: 0.9rem; margin-top: 0.5rem; text-align: center; }
.empty-state-link { color: #8b5cf6; text-decoration: underline; font-weight: 600; cursor: pointer; }
.empty-state-link:hover { color: #a78bfa; }

/* Spotify-style Player */
.player-container {
    background: linear-gradient(180deg, #1e1b4b 0%, #0f0e1a 100%);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 0;
}

.player-track {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 12px;
    transition: background 0.2s;
}

.player-track:hover {
    background: rgba(255,255,255,0.05);
}

.track-artwork {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #a78bfa, #6366f1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.track-artwork svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.track-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-info {
    flex: 1;
    min-width: 0;
}

.track-title {
    color: white;
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    color: #a1a1aa;
    font-size: 0.85rem;
}

.track-duration {
    color: #a1a1aa;
    font-size: 0.85rem;
    margin-right: 0.5rem;
}

.track-menu {
    color: #a1a1aa;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s;
    position: relative;
}

.track-menu:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.menu-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background: #282828;
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 180px;
    white-space: nowrap;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: none;
    z-index: 100;
}

.menu-dropdown.active {
    display: block;
}

.menu-item {
    padding: 0.75rem 1rem;
    color: #e4e4e7;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s;
}

.menu-item:hover {
    background: rgba(255,255,255,0.1);
}

/* Audio Visualizer */
.visualizer-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    height: 60px;
    padding: 1rem 0;
    margin: 1rem 0;
}

.visualizer-bar {
    width: 4px;
    background: linear-gradient(to top, #6366f1, #a78bfa);
    border-radius: 2px;
    transition: height 0.1s ease;
}

/* Player Controls */
.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem 0;
}

.control-btn {
    color: #a1a1aa;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

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

.play-btn-main {
    width: 56px;
    height: 56px;
    min-width: 56px;
    flex-shrink: 0;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.play-btn-main:hover {
    background: #8b5cf6;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
}

.play-btn-main i {
    color: #0f0e1a;
    font-size: 1.25rem;
    margin-left: 2px;
    transition: color 0.2s;
}

.play-btn-main:hover i,
.play-btn-main:active i {
    color: white;
}

.play-btn-main:active {
    background: #8b5cf6;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
}

/* Progress Bar */
.progress-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.5rem;
}

.progress-time {
    color: #a1a1aa;
    font-size: 0.75rem;
    min-width: 40px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: #3f3f46;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    transition: height 0.15s;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s;
    position: relative;
}

/* Scrubber thumb — appears on hover */
.progress-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    transition: transform 0.15s;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

.progress-bar:hover .progress-fill {
    background: #a78bfa;
}

.progress-bar:hover .progress-fill::after {
    transform: translateY(-50%) scale(1);
    background: #a78bfa;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

/* Expand hit area when hovering/dragging */
.progress-bar:hover {
    height: 6px;
}

/* Volume Dropdown */
.volume-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.volume-dropdown {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    background: #1e1b2e;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    min-width: 220px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 50;
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

.volume-dropdown.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) scale(1);
}

.volume-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.volume-group + .volume-group {
    border-top: 1px solid rgba(255,255,255,0.06);
}

.volume-group i {
    color: #a78bfa;
    font-size: 0.85rem;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.volume-group span {
    color: #cbd5e1;
    font-size: 0.75rem;
    min-width: 55px;
    flex-shrink: 0;
}

.volume-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    background: #3f3f46;
    border-radius: 2px;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #a78bfa;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(167, 139, 250, 0.4);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #a78bfa;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 6px rgba(167, 139, 250, 0.4);
}

/* Extra Controls Row */
.extra-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

.extra-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 20px;
    color: #a1a1aa;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.extra-btn:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

.extra-btn i {
    font-size: 0.9rem;
}

/* Playlist Styles */
.playlist-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(180deg, #1e1b4b 0%, #0f0e1a 100%);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.playlist-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}

.playlist-artwork {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.playlist-artwork i {
    color: white;
    font-size: 1.2rem;
}

.playlist-info {
    flex: 1;
}

.playlist-title {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
}

.playlist-count {
    color: #a1a1aa;
    font-size: 0.8rem;
}

.create-playlist-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem;
    background: rgba(139, 92, 246, 0.1);
    border: 2px dashed rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    color: #6d28d9;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

body.dark .create-playlist-btn {
    color: #a78bfa;
}

.create-playlist-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
}

/* Playlist Modal */
.playlist-modal-list {
    max-height: 300px;
    overflow-y: auto;
}

.playlist-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.playlist-option:hover {
    background: #f1f5f9;
}

.playlist-option i {
    color: #8b5cf6;
}

/* Loading State */
.loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.loading-text {
    color: #a1a1aa;
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

/* History Tab System */
.tab-header {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
    background: #f1f5f9;
    border-radius: 16px;
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s;
}

.tab-btn:active {
    transform: scale(0.95);
    transition-duration: 0.1s;
}

.tab-btn.active {
    background: white;
    color: #1e293b;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* History List */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
}

.history-empty i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.history-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(180deg, #1e1b4b 0%, #0f0e1a 100%);
    cursor: pointer;
    transition: all 0.2s;
}

.swipe-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
    background: inherit;
}

.swipe-actions {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    display: none;
    align-items: stretch;
    width: 120px;
}

.swipe-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
}

.swipe-playlist {
    background: #6366f1;
}

.swipe-delete {
    background: #ef4444;
    border-radius: 0 16px 16px 0;
}

.history-item:hover .swipe-content {
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}

.history-artwork {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #a78bfa, #6366f1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.history-artwork svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.history-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-info {
    flex: 1;
    min-width: 0;
}

.history-title {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.history-meta {
    color: #a1a1aa;
    font-size: 0.8rem;
}

.history-play {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.history-play:hover {
    background: #8b5cf6;
    transform: scale(1.1);
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.6);
}

.history-play i {
    color: #0f0e1a;
    font-size: 0.9rem;
    margin-left: 2px;
    transition: color 0.2s;
}

.history-play:hover i {
    color: white;
}


.history-delete {
    color: #94a3b8;
    padding: 0.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.history-delete:hover {
    color: #ef4444;
}

.history-edit {
    color: #94a3b8;
    padding: 0.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.history-edit:hover {
    color: #a78bfa;
}

.history-favorite {
    color: #94a3b8;
    padding: 0.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.history-favorite:hover,
.history-favorite:active {
    color: #f472b6;
}

.history-favorite.active {
    color: #f472b6;
}

.history-playlist {
    color: #94a3b8;
    padding: 0.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.history-playlist:hover {
    color: #a78bfa;
}

.player-favorite {
    color: #a1a1aa;
    cursor: pointer;
    transition: color 0.2s;
    font-size: 1.25rem;
}

.player-favorite:hover {
    color: #f472b6;
}

.player-favorite.active {
    color: #f472b6;
}

/* Edit Name Modal */
.edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.edit-modal.active {
    opacity: 1;
    visibility: visible;
}

.edit-modal-content {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
}

.edit-modal-content h3 {
    margin-bottom: 1rem;
    font-weight: 700;
    color: #1e293b !important;
}

.edit-modal-content input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    margin-bottom: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.edit-modal-content input:focus {
    border-color: #a78bfa;
}

.edit-modal-buttons {
    display: flex;
    gap: 0.75rem;
}

.edit-modal-buttons button {
    flex: 1;
    padding: 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel {
    background: #f1f5f9;
    border: none;
    color: #64748b;
}

.btn-cancel:hover {
    background: #e2e8f0;
}

.btn-save {
    background: linear-gradient(135deg, #a78bfa, #6366f1);
    border: none;
    color: white;
}

.btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-delete {
    background: #ef4444;
    border: none;
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.delete-confirm-icon {
    text-align: center;
    font-size: 2rem;
    color: #ef4444;
    margin-bottom: 0.5rem;
}

.delete-confirm-text {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 32px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-body p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #475569;
    font-size: 1.1rem;
}

.close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #e2e8f0;
}

/* Style selector buttons - 3 column grid */
.style-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.style-btn {
    padding: 0.75rem 0.5rem;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.style-btn:hover {
    border-color: #c4b5fd;
    background: #faf8ff;
    transform: translateY(-2px);
}

.style-btn:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
}

.style-btn.selected {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.style-btn .style-icon {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: #8b5cf6;
}

.style-btn .style-title {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.style-btn .style-desc {
    font-size: 0.65rem;
    color: #64748b;
    line-height: 1.3;
}

/* Ambient sound selector */
.ambient-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.ambient-btn {
    padding: 0.75rem 0.5rem;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.ambient-btn i {
    font-size: 1.25rem;
    color: #64748b;
}

.ambient-btn span {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
}

.ambient-btn:hover {
    border-color: #a78bfa;
    background: #f5f3ff;
}

.ambient-btn.selected {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}

.ambient-btn.selected i,
.ambient-btn.selected span {
    color: #7c3aed;
}

.feature-toggles {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature-card {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border-radius: 20px;
    border: 1px solid #f1f5f9;
}

/* Advanced Options Collapsible */
.advanced-options-container {
    margin-bottom: 1.5rem;
}

.advanced-options-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: transparent;
    border: none;
    color: #64748b;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.2s;
}

.advanced-options-toggle:hover {
    color: #7c3aed;
}

.advanced-chevron {
    transition: transform 0.3s ease;
}

.advanced-options-toggle.open .advanced-chevron {
    transform: rotate(180deg);
}

.advanced-options-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: #f8fafc;
    border-radius: 20px;
}

.advanced-options-content.open {
    max-height: 200px;
    padding: 1rem;
}

.advanced-options-content .feature-toggles {
    margin-bottom: 0;
}

/* Wheel Picker Styles */
.picker-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border-radius: 24px;
    height: 180px;
    overflow: hidden;
    width: 100%;
    margin-bottom: 1rem;
}

.picker-wheel {
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 112px 0;
    text-align: center;
    width: 120px;
}

.picker-wheel::-webkit-scrollbar {
    display: none;
}

.picker-item {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.25);
    font-size: 1.75rem;
    font-weight: 600;
    scroll-snap-align: center;
    transition: all 0.15s ease;
    cursor: pointer;
}

.picker-item.active {
    color: #ffffff;
    font-size: 3rem;
    font-weight: 800;
}

.picker-item.near {
    color: rgba(255, 255, 255, 0.5);
    font-size: 2rem;
}

.picker-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.25rem;
    font-weight: 600;
    margin-left: 8px;
    align-self: center;
}

.picker-center-bar {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 64px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    border: 2px solid rgba(139, 92, 246, 0.4);
    pointer-events: none;
    z-index: 5;
}

.picker-fade-top,
.picker-fade-bottom {
    position: absolute;
    left: 0;
    right: 0;
    height: 100px;
    pointer-events: none;
    z-index: 10;
}

.picker-fade-top {
    top: 0;
    background: linear-gradient(to bottom, #1e1b4b 0%, transparent 100%);
}

.picker-fade-bottom {
    bottom: 0;
    background: linear-gradient(to top, #312e81 0%, transparent 100%);
}

.time-display {
    text-align: center;
    margin-bottom: 0.75rem;
}

.time-display .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #6366f1;
    background: #f5f3ff;
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    display: inline-block;
}

/* Homepage Styles */
.home-hero {
    text-align: center;
    margin-bottom: 2rem;
}

.home-hero .logo-box {
    width: 80px;
    height: 80px;
    border-radius: 24px;
}

.home-hero .lightning-m {
    width: 44px;
    height: 44px;
}

.home-tagline {
    color: #64748b;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.home-subtagline {
    color: #94a3b8;
    font-size: 0.85rem;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.home-card {
    padding: 1.5rem;
    border-radius: 20px;
    border: 2px solid #e2e8f0;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.home-card:hover {
    border-color: #a78bfa;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.15);
}

.home-card.featured {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border-color: transparent;
}

.home-card.featured:hover {
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.35);
}

.home-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.home-card.featured .home-card-icon {
    background: rgba(167, 139, 250, 0.2);
    color: #a78bfa;
}

.home-card:not(.featured) .home-card-icon {
    background: #f5f3ff;
    color: #8b5cf6;
}

.home-card-icon.orange {
    background: #fff7ed;
    color: #f97316;
}

.home-card-icon.green {
    background: #f0fdf4;
    color: #22c55e;
}

.home-card-icon.blue {
    background: #eff6ff;
    color: #3b82f6;
}

.home-card-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #1e293b;
}

.home-card.featured .home-card-title {
    color: white;
}

.home-card-desc {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

.home-card.featured .home-card-desc {
    color: #a1a1aa;
}

.quick-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.quick-btn {
    flex: 1;
    padding: 0.875rem 0.5rem;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.quick-btn:hover {
    border-color: #a78bfa;
    background: #f5f3ff;
}

.quick-btn i {
    display: block;
    font-size: 1.25rem;
    color: #8b5cf6;
    margin-bottom: 0.5rem;
}

.quick-btn span {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.daily-motivation {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
}

.daily-motivation-quote {
    font-size: 1rem;
    font-weight: 600;
    color: #4c1d95;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.daily-motivation-author {
    font-size: 0.8rem;
    color: #7c3aed;
    font-weight: 500;
}

/* Breathing Modal */
.breathing-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f0e1a 0%, #1e1b4b 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.breathing-modal.active {
    opacity: 1;
    visibility: visible;
}

.breathing-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    font-size: 1.25rem;
}

.breathing-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.breathing-circle-container {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.breathing-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a78bfa 0%, #6366f1 100%);
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.5);
    transition: transform 4s ease-in-out, box-shadow 4s ease-in-out;
}

.breathing-circle.inhale {
    transform: scale(1.6);
    box-shadow: 0 0 100px rgba(139, 92, 246, 0.7);
}

.breathing-circle.exhale {
    transform: scale(0.6);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
}

.breathing-circle.hold-in {
    transform: scale(1.6);
    box-shadow: 0 0 100px rgba(139, 92, 246, 0.7);
    transition: none;
}

.breathing-circle.hold-out {
    transform: scale(0.6);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
    transition: none;
}

.breathing-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 3rem;
    text-align: center;
}

.breathing-text.hold {
    opacity: 0.7;
}

.breathing-cycle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    letter-spacing: 0.05em;
}

.breathing-timer {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    margin-top: 1rem;
}

/* Pre-Game Routine Styles */
.pregame-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.pregame-modal.active {
    opacity: 1;
    visibility: visible;
}

.pregame-content {
    background: white;
    border-radius: 32px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

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

.pregame-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: white;
    border-radius: 32px 32px 0 0;
    z-index: 10;
}

.pregame-header h3 {
    font-weight: 800;
    font-size: 1.25rem;
    color: #1e293b;
}

.pregame-body {
    padding: 2rem;
}

.pregame-input-section {
    text-align: center;
}

.pregame-input-section p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.pregame-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 1rem;
    margin-bottom: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.pregame-input:focus {
    border-color: #a78bfa;
}

.pregame-generate-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pregame-generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.pregame-generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pregame-loading {
    text-align: center;
    padding: 3rem 1rem;
}

.pregame-loading .loader {
    margin: 0 auto 1rem;
}

.pregame-loading p {
    color: #64748b;
}

.pregame-routine {
    display: none;
}

.pregame-routine.active {
    display: block;
}

.routine-step {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: #f8fafc;
    border-radius: 16px;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.routine-step:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.routine-step-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.routine-step-content {
    flex: 1;
}

.routine-step-title {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.routine-step-desc {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

.routine-step-duration {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.routine-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.routine-header h4 {
    font-weight: 800;
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.routine-header p {
    color: #64748b;
    font-size: 0.85rem;
}

.routine-restart-btn {
    width: 100%;
    padding: 1rem;
    background: #f1f5f9;
    color: #64748b;
    border: none;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.2s;
}

.routine-restart-btn:hover {
    background: #e2e8f0;
    color: #475569;
}

/* Mobile responsive for homepage */
@media (max-width: 640px) {
    .home-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        flex-wrap: wrap;
    }

    .quick-btn {
        flex: 1 1 calc(50% - 0.375rem);
    }

    .home-hero .logo-box {
        width: 64px;
        height: 64px;
    }

    .home-hero .lightning-m {
        width: 36px;
        height: 36px;
    }
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 99;
}

.sidebar-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.hamburger-btn {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    z-index: 101;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.hamburger-btn:active {
    transform: scale(0.9);
    transition-duration: 0.1s;
}

.hamburger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: #475569;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}


.main-content {
    flex: 1;
    min-height: 100vh;
    background: #0a0e2a;
    padding: 1rem;
    padding-top: 60px; /* space for fixed top bar */
    position: relative;
    overflow: hidden;
}

.lava-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    filter: blur(80px);
}

.lava-blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.45;
}

.lava-blob:nth-child(1) {
    width: 350px; height: 350px;
    background: radial-gradient(circle, #e8607c, #c4486a);
    top: 10%; left: 15%;
    animation: lavaFloat1 14s ease-in-out infinite;
}
.lava-blob:nth-child(2) {
    width: 250px; height: 250px;
    background: radial-gradient(circle, #f4a0b0, #e07090);
    top: 55%; right: 10%;
    animation: lavaFloat2 18s ease-in-out infinite;
}
.lava-blob:nth-child(3) {
    width: 200px; height: 200px;
    background: radial-gradient(circle, #d4708a, #b85878);
    bottom: 15%; left: 35%;
    animation: lavaFloat3 12s ease-in-out infinite;
}
.lava-blob:nth-child(4) {
    width: 180px; height: 180px;
    background: radial-gradient(circle, #f0b0c0, #e090a0);
    top: 30%; right: 30%;
    animation: lavaFloat4 16s ease-in-out infinite;
}
.lava-blob:nth-child(5) {
    width: 280px; height: 280px;
    background: radial-gradient(circle, #c85878, #a04060);
    bottom: 30%; left: 5%;
    animation: lavaFloat5 20s ease-in-out infinite;
}

@keyframes lavaFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(60px, 80px) scale(1.15); }
    50% { transform: translate(-30px, 120px) scale(0.9); }
    75% { transform: translate(40px, -40px) scale(1.1); }
}
@keyframes lavaFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-70px, -60px) scale(1.2); }
    50% { transform: translate(50px, -100px) scale(0.85); }
    75% { transform: translate(-40px, 50px) scale(1.05); }
}
@keyframes lavaFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(80px, -70px) scale(1.1); }
    66% { transform: translate(-50px, -30px) scale(0.95); }
}
@keyframes lavaFloat4 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    30% { transform: translate(-60px, 90px) scale(1.15); }
    60% { transform: translate(70px, 40px) scale(0.9); }
}
@keyframes lavaFloat5 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    20% { transform: translate(50px, -80px) scale(1.1); }
    50% { transform: translate(-40px, -50px) scale(1.2); }
    80% { transform: translate(30px, 60px) scale(0.9); }
}

.hero-banner {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(118, 75, 162, 0.3);
    cursor: pointer;
    transition: transform 0.15s ease;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 50%, #8b5cf6 100%);
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

.hero-banner:hover {
    transform: scale(1.02);
}

.hero-banner:active {
    transform: scale(0.95);
}

.hero-banner.clicked {
    animation: clickPop 0.3s ease;
}

@keyframes clickPop {
    0% { transform: scale(1); }
    50% { transform: scale(0.92); }
    100% { transform: scale(1); }
}

.hero-banner .hero-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.hero-banner .hero-icon i {
    font-size: 1.75rem;
    color: white;
}

.hero-banner .hero-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
}

.hero-banner .hero-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    position: relative;
    z-index: 1;
    line-height: 1.4;
}

.hero-banner .hero-cta {
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

.new-homepage {
    display: none;
}

/* Bento Grid Layout */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr auto auto auto;
    gap: 1rem;
    padding-top: 7rem;
}

.bento-quote {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding-bottom: 1.5rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 60%, rgba(0,0,0,0) 100%);
    transition: opacity 0.3s ease;
}

.bento-motivate {
    grid-column: 1;
    grid-row: 1 / 3;
}

.bento-warmup {
    grid-column: 2;
    grid-row: 1;
}

.bento-favplay {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    gap: 0.75rem;
}

.bento-history {
    grid-column: 1;
    grid-row: 3;
}

.bento-breathe {
    grid-column: 2;
    grid-row: 3;
}


@media (max-width: 640px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .bento-motivate,
    .bento-warmup,
    .bento-favplay,
    .bento-history,
    .bento-breathe {
        grid-column: 1;
        grid-row: auto;
    }
    .bento-favplay {
        flex-direction: column;
    }
}

.section-card {
    width: 100%;
    height: 100%;
    min-height: 200px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.section-card:hover {
    transform: translateY(-4px);
}

.section-card:active {
    transform: scale(0.98);
}

.section-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
}

.section-card .card-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.section-card .card-icon i {
    color: white;
    font-size: 1.25rem;
}

.section-card .card-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.3rem;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
}

.section-card .card-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

/* Card themes */
.card-playlist {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 8px 32px rgba(249, 115, 22, 0.25);
}

.card-playlist::before {
    background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.12) 0%, transparent 50%);
}

.card-favourites {
    background: linear-gradient(135deg, #ec4899 0%, #9333ea 100%);
    box-shadow: 0 8px 32px rgba(236, 72, 153, 0.25);
}

.card-favourites::before {
    background: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.card-breathe {
    background: linear-gradient(135deg, #06b6d4 0%, #155e75 100%);
    box-shadow: 0 8px 32px rgba(6, 182, 212, 0.25);
}

.card-breathe::before {
    background: radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.card-warmup {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.25);
}

.card-warmup::before {
    background: radial-gradient(circle at 75% 25%, rgba(255, 255, 255, 0.12) 0%, transparent 50%);
}

.card-history {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.25);
}

.card-history::before {
    background: radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.section-card .card-cta {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
    transition: background 0.2s;
}

.section-card .card-cta:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Quote Box */
.quote-box {
    width: 100%;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    border: none;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    padding: 1.25rem 2.5rem 1.25rem 5rem;
    margin-top: 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.3);
    transition: background 0.4s ease, box-shadow 0.4s ease;
}


.quote-box::before {
    content: '"';
    position: absolute;
    top: -30px;
    left: 15px;
    font-size: 120px;
    font-family: Georgia, serif;
    color: rgba(139, 92, 246, 0.15);
    line-height: 1;
}

.quote-content {
    flex: 1;
    min-width: 0;
}

.quote-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.quote-author {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.quote-author::before {
    content: '— ';
}

.quote-speaker-btn {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.quote-speaker-btn:hover {
    background: rgba(139, 92, 246, 0.35);
    transform: scale(1.1);
}

.quote-speaker-btn i {
    color: rgba(139, 92, 246, 0.8);
    font-size: 1.1rem;
    pointer-events: none;
}

.quote-speaker-btn.loading {
    pointer-events: none;
}

.quote-speaker-btn.loading i {
    animation: spin 1s linear infinite;
}

.quote-speaker-btn.playing {
    background: rgba(255, 255, 255, 0.4);
}

/* Voice Selector */
.voice-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.voice-option {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
}

.voice-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.voice-option.active {
    background: rgba(139, 92, 246, 0.3);
    color: rgba(139, 92, 246, 1);
}

/* Motivation Voice Selector */
.voice-selection-container {
    text-align: center;
    margin-bottom: 0.75rem;
}

.voice-selection-label {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.motivation-voice-selector {
    display: inline-flex;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.motivation-voice-option {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s ease;
}

.motivation-voice-option:hover {
    color: #475569;
}

.motivation-voice-option.active {
    background: white;
    color: #8b5cf6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.main-content .full-page-container {
    display: flex;
}

.home-btn {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    z-index: 101;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: none;
}

.home-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.home-btn.visible {
    display: block;
}

.top-nav {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 0.5rem;
    z-index: 101;
}

.upgrade-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    color: #475569;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
    font-family: inherit;
    animation: backBtnSlide 2s ease-in-out infinite;
}

.upgrade-back-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

@keyframes backBtnSlide {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-8px); }
}

/* ── Responsive: squish gracefully on narrow screens ── */
@media (max-width: 600px) {
    /* Container — card clears the nav buttons */
    .full-page-container { padding: 6rem 0.6rem 1.5rem; }
    .glass-card { padding: 1.5rem 1.25rem; border-radius: 24px; overflow: hidden; }
    h1.text-5xl { font-size: 2rem !important; }
    h2.text-4xl { font-size: 1.7rem !important; }
    .logo-box { width: 52px !important; height: 52px !important; }

    /* Goal section mobile */
    .goal-heading { font-size: 1.4rem; }
    .goal-subheading { font-size: 0.85rem; }
    .goal-cta { padding: 0.9rem; font-size: 1rem; }
    .style-grid { grid-template-columns: 1fr 1fr !important; gap: 0.5rem !important; }
    .style-desc { font-size: 0.68rem !important; }
    .btn-primary { padding: 0.9rem 1rem !important; font-size: 1rem !important; }

    /* section-result: scroll inside with padding so content never hides under nav */
    #section-result { overflow-y: auto; max-height: calc(100dvh - 7rem); }

    /* Tabs: icons only, evenly spaced */
    .tab-btn { font-size: 0 !important; padding: 0.7rem !important; flex: 1; justify-content: center !important; }
    .tab-btn i { font-size: 1.05rem !important; margin: 0 !important; }

    /* Player track row: artwork + info side by side, no overflow */
    .player-track { display: flex !important; align-items: center !important; gap: 0.6rem !important; flex-wrap: nowrap !important; overflow: hidden; }
    .track-artwork { width: 48px !important; height: 48px !important; min-width: 48px; border-radius: 10px !important; }
    .track-info { flex: 1; min-width: 0; overflow: hidden; }
    .track-title { font-size: 0.9rem !important; white-space: normal !important; overflow: visible !important; text-overflow: unset !important; display: block; }
    .track-artist { font-size: 0.72rem !important; white-space: normal !important; overflow: visible !important; text-overflow: unset !important; display: block; }
    .track-duration { font-size: 0.72rem !important; min-width: 30px; flex-shrink: 0; }
    .player-favorite, .track-menu { flex-shrink: 0; }

    /* Play button — equal sides */
    .player-controls { gap: 1.1rem !important; }
    .control-btn { width: 42px !important; height: 42px !important; min-width: 42px !important; }
    .play-btn, .play-btn-main { width: 58px !important; height: 58px !important; min-width: 58px !important; flex-shrink: 0 !important; border-radius: 50% !important; }

    /* Extra controls (Volume/Download/Share) — fit in one row */
    .extra-controls { flex-direction: column !important; gap: 0.5rem !important; overflow: visible; align-items: center !important; }
    .extra-controls .volume-dropdown-wrapper { width: 70%; }
    .extra-controls .volume-dropdown-wrapper .extra-btn { width: 100% !important; }
    .extra-btn { width: 70% !important; padding: 0.6rem 1rem !important; font-size: 0.8rem !important; justify-content: center !important; gap: 0.5rem !important; }

    /* Volume dropdown — full width, centered */
    .volume-dropdown { left: 0 !important; right: 0 !important; transform: none !important; min-width: 0 !important; width: 100%; }

    /* History items — swipe to delete on mobile */
    .history-item { padding: 0 !important; }
    .swipe-content { padding: 0.85rem; gap: 0.75rem; }
    .history-artwork { display: none !important; }
    .history-title { white-space: normal !important; overflow: visible !important; text-overflow: unset !important; }
    .history-edit, .history-playlist { display: none !important; }
    .history-play, .history-favorite { width: 36px !important; height: 36px !important; display: flex; align-items: center; justify-content: center; }
    .inline-delete { display: none !important; }
    .swipe-actions { display: flex; }

    /* Empty state top padding */
    #empty-state .loading-overlay { padding-top: 2rem !important; }

    #prompt-input { padding: 1rem !important; font-size: 0.95rem; }
}

/* Sign-in overlay */
#signin-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    display: flex; align-items: center;
    flex-direction: column;
    overflow-y: auto;
}
/* Hide app content until auth is confirmed — prevents flash of menus before login */
.app-authenticated-content { display: none; }
body.authenticated .app-authenticated-content { display: contents; }
body.authenticated #signin-overlay { display: none; }
.signin-card {
    background: white; border-radius: 28px; padding: 2.5rem 2rem;
    text-align: center; max-width: 340px; width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.landing-hero {
    display: flex; align-items: center; gap: 4rem;
    padding: 5rem 5vw 4rem; width: 100%; max-width: 1200px;
}
.landing-left { flex: 1; min-width: 0; }
.landing-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: rgba(99,102,241,0.15); border: 1px solid rgba(99,102,241,0.35);
    color: #a5b4fc; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em;
    padding: 0.4rem 1rem; border-radius: 999px; margin-bottom: 1.8rem; text-transform: uppercase;
}
.landing-title {
    font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 900; line-height: 1.1;
    color: #f1f5f9; margin-bottom: 1.5rem; letter-spacing: -0.02em;
}
.landing-title-gradient {
    background: linear-gradient(135deg, #818cf8, #38bdf8, #6366f1);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.landing-sub { font-size: 1.05rem; color: #94a3b8; line-height: 1.7; max-width: 480px; margin-bottom: 2.5rem; }
.landing-signin-btn {
    display: inline-flex; align-items: center; gap: 0.75rem;
    padding: 0.95rem 2rem; background: white; border: none; border-radius: 14px;
    font-size: 1rem; font-weight: 700; cursor: pointer; font-family: inherit;
    color: #1e293b; box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    transition: transform 0.15s, box-shadow 0.15s;
}
.landing-signin-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,0.4); }
.landing-signin-btn img { width: 22px; height: 22px; }
.landing-terms { font-size: 0.78rem; color: #475569; margin-top: 1rem; }

.gsi-hidden-btn { display: none !important; }

.landing-right { flex: 1; min-width: 0; max-width: 480px; }
.landing-preview {
    background: #07071a; border: 1px solid rgba(99,102,241,0.22); border-radius: 24px;
    overflow: hidden; box-shadow: 0 32px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04);
}
/* ── Preview card top bar ──────────────────────────────────────────────── */
.lp-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.6rem 0.9rem; background: rgba(6,6,20,0.95);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.lp-logo { color: #e2e8f0; font-weight: 800; font-size: 0.82rem; letter-spacing: -0.01em; }
.lp-logo-icon { color: #818cf8; margin-right: 0.3rem; }
.lp-nav-icons { display: flex; align-items: center; gap: 0.65rem; }
.lp-nav-icons i { color: rgba(255,255,255,0.45); font-size: 0.7rem; }
.lp-avatar {
    width: 20px; height: 20px; border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    flex-shrink: 0;
}

/* ── Dark background with blob glow ───────────────────────────────────── */
.lp-app-bg {
    position: relative; background: #07071a;
    padding: 2rem 1.2rem 1.4rem; overflow: hidden;
    display: flex; flex-direction: column; align-items: center;
}
.lp-blob {
    position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
    width: 320px; height: 220px; border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(139,92,246,0.35) 0%, rgba(236,72,153,0.18) 50%, transparent 75%);
    filter: blur(30px); pointer-events: none;
}

/* ── White card ───────────────────────────────────────────────────────── */
.lp-card {
    position: relative; z-index: 1;
    background: #ffffff; border-radius: 20px;
    padding: 1.4rem 1.3rem 1.2rem;
    width: 100%; max-width: 340px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lp-card-title {
    font-size: 1.05rem; font-weight: 800; color: #111827;
    margin-bottom: 0.45rem; letter-spacing: -0.02em; line-height: 1.3;
}
.lp-card-sub {
    font-size: 0.75rem; color: #6b7280; line-height: 1.5; margin-bottom: 1rem;
}
.lp-input-box {
    background: #ffffff; border: 1.5px solid #e5e7eb; border-radius: 12px;
    padding: 0.7rem 0.85rem; font-size: 0.78rem; color: #374151;
    min-height: 42px; margin-bottom: 0.9rem; line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.lp-cursor { color: #7c3aed; animation: lp-blink 1s step-end infinite; }
@keyframes lp-blink { 0%,100%{opacity:1} 50%{opacity:0} }
.lp-motivate-btn {
    background: linear-gradient(135deg, #7c3aed, #6366f1); color: white;
    font-size: 0.82rem; font-weight: 700; padding: 0.7rem 1rem; border-radius: 12px;
    text-align: center; margin-bottom: 0.7rem;
    box-shadow: 0 4px 14px rgba(99,102,241,0.45);
}
.lp-motivate-btn i { margin-right: 0.3rem; font-size: 0.7rem; }
.lp-minutes-row { display: flex; justify-content: center; margin-bottom: 0.55rem; }
.lp-minutes-pill {
    background: #f3f4f6; color: #6b7280; font-size: 0.68rem; font-weight: 600;
    padding: 0.2rem 0.6rem; border-radius: 999px;
}
.lp-sample-row {
    text-align: center; font-size: 0.72rem; color: #9ca3af; cursor: pointer;
}
.lp-sample-icon { margin-right: 0.25rem; font-size: 0.6rem; }

.landing-steps { background: linear-gradient(to bottom, transparent 0%, #080818 12rem); padding: 6rem 6vw; text-align: center; }
.landing-steps-title {
    font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 900; color: #f1f5f9;
    margin-bottom: 0.75rem; letter-spacing: -0.02em;
}
.landing-steps-sub { color: #64748b; font-size: 1rem; margin-bottom: 4rem; }
.landing-steps-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem; max-width: 1000px; margin: 0 auto 3.5rem;
}
.landing-step {
    background: #0d1b3e; border: 1px solid rgba(99,102,241,0.18);
    border-radius: 20px; padding: 2rem 1.5rem; text-align: left;
}
.step-num { font-size: 0.7rem; font-weight: 900; color: #4f46e5; letter-spacing: 0.1em; margin-bottom: 1rem; }
.step-icon-wrap {
    width: 44px; height: 44px; border-radius: 12px; background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.3); display: flex; align-items: center; justify-content: center;
    color: #818cf8; font-size: 1.1rem; margin-bottom: 1rem;
}
.step-title { font-size: 1rem; font-weight: 800; color: #e2e8f0; margin-bottom: 0.5rem; }
.step-desc { font-size: 0.85rem; color: #64748b; line-height: 1.6; }
.landing-cta-btn {
    display: inline-flex; align-items: center; gap: 0.75rem;
    padding: 1rem 2.5rem; background: white; border: none; border-radius: 14px;
    font-size: 1rem; font-weight: 700; cursor: pointer; font-family: inherit;
    color: #1e293b; box-shadow: 0 8px 24px rgba(0,0,0,0.4); transition: transform 0.15s, box-shadow 0.15s;
}
.landing-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,0.5); }
.landing-cta-btn img { width: 22px; height: 22px; }
.landing-cta-btn { display: block; margin: 0 auto; }
@media (max-width: 768px) {
    .landing-hero { flex-direction: column; padding: 3rem 1.5rem 2rem; gap: 0; }
    .landing-right { width: 100%; max-width: 100%; order: 2; }
    /* display:contents makes landing-left's children participate directly in the
       hero flex column, so we can interleave them with landing-right via order */
    .landing-left { display: contents; }
    .landing-left-top { order: 1; margin-bottom: 1.75rem; }
    .landing-left-bottom {
        order: 3; margin-top: 1.25rem; width: 100%;
    }
    /* Hide description on mobile — button appears right after the animation */
    .landing-sub { display: none; }
    .landing-left-bottom .landing-signin-btn {
        display: flex; width: 100%; justify-content: center;
        min-height: 52px; border-radius: 16px; font-size: 1rem;
    }
    .landing-left-bottom .landing-terms { text-align: center; }
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE TIERS
   ── Large screen  ≥ 1280px
   ── Tablet        769px – 1023px
   ── Small phone   ≤ 480px  (supplements the existing ≤768px mobile rules)
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Large screen (≥ 1280px) ──────────────────────────────────────────── */
@media (min-width: 1280px) {
    /* Landing — more room to breathe */
    .landing-hero { max-width: 1400px; gap: 6rem; padding: 6rem 8vw 5rem; }
    .landing-title { font-size: clamp(3rem, 4.5vw, 5rem); }
    .landing-sub { font-size: 1.15rem; max-width: 520px; }
    .landing-right { max-width: 540px; }
    .lp-card { max-width: 380px; }

    /* Steps — wider grid */
    .landing-steps { padding: 7rem 8vw; }
    .landing-steps-grid { max-width: 1100px; gap: 2.5rem; }

    /* App — wider glass card for big screens */
    .glass-card { max-width: 640px; padding: 3rem; }

    /* Bento — add a third column for large screens */
    .bento-grid {
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-rows: 1fr 1fr auto;
    }
    .bento-motivate { grid-column: 1; grid-row: 1 / 3; }
    .bento-warmup   { grid-column: 2; grid-row: 1; }
    .bento-favplay  { grid-column: 2; grid-row: 2; }
    .bento-history  { grid-column: 3; grid-row: 1; }
    .bento-breathe  { grid-column: 3; grid-row: 2; }

    /* Home grid — 4 cards in a row */
    .home-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Tablet (769px – 1023px) ──────────────────────────────────────────── */
@media (min-width: 769px) and (max-width: 1023px) {
    /* Landing — keep side-by-side but compress */
    .landing-hero { gap: 2.5rem; padding: 4rem 4vw 3rem; }
    .landing-title { font-size: clamp(2rem, 4.5vw, 3rem); }
    .landing-sub { font-size: 0.95rem; margin-bottom: 1.8rem; }
    .landing-right { max-width: 360px; }
    .lp-card { max-width: 300px; }
    .lp-card-title { font-size: 0.95rem; }

    /* Steps — 2 col on tablet */
    .landing-steps-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

    /* App glass card — comfortable middle width */
    .glass-card { max-width: 520px; padding: 2rem 2rem; }

    /* Home grid — 2 cols fine, just a bit more gap */
    .home-grid { gap: 1.25rem; }
    .home-card { padding: 1.25rem; }
}

/* ── Small phone (≤ 480px) ────────────────────────────────────────────── */
@media (max-width: 480px) {
    /* Landing hero — tighten further */
    .landing-hero { padding: 2rem 1rem 1.5rem; }
    .landing-title { font-size: clamp(1.8rem, 8vw, 2.4rem); margin-bottom: 1rem; }
    .landing-badge { font-size: 0.7rem; padding: 0.3rem 0.75rem; margin-bottom: 1.25rem; }
    .landing-left-top { margin-bottom: 1.25rem; }
    .landing-left-bottom { margin-top: 1.25rem; }

    /* Preview card — shorter on small phones */
    .lp-app-bg { padding: 1.25rem 0.85rem 1rem; }
    .lp-card { padding: 1rem 1rem 0.9rem; }
    .lp-card-title { font-size: 0.9rem; margin-bottom: 0.3rem; }
    .lp-card-sub { font-size: 0.7rem; margin-bottom: 0.75rem; }
    .lp-input-box { padding: 0.5rem 0.7rem; font-size: 0.72rem; min-height: 36px; margin-bottom: 0.65rem; }
    .lp-motivate-btn { padding: 0.55rem 0.85rem; font-size: 0.75rem; margin-bottom: 0.5rem; }
    .lp-minutes-pill { font-size: 0.62rem; }

    /* Steps — single column, less padding */
    .landing-steps { padding: 3.5rem 1rem 2.5rem; }
    .landing-steps-grid { grid-template-columns: 1fr; gap: 1rem; }
    .landing-step { padding: 1.25rem; }
    .step-num { font-size: 0.65rem; }

    /* App — full-width card with minimal side padding */
    .full-page-container { padding: 5rem 0.5rem 1rem; }
    .glass-card { padding: 1.25rem 1rem; border-radius: 20px; }

    /* Top bar — even more compact */
    .top-bar { padding: 0 0.5rem; }
    .top-bar-brand { display: none; }
    .top-bar-nav-group { gap: 0; }
    .top-bar-icon-btn { width: 30px; height: 30px; font-size: 0.8rem; }

    /* Home grid — single column */
    .home-grid { grid-template-columns: 1fr; gap: 0.75rem; }
    .quick-btn { flex: 1 1 calc(50% - 0.375rem); }
}

/* ── CSP: extracted inline styles ──────────────────────────────────────── */

/* Sample typewriter (home hero) */
.sample-typewriter { display: none; min-height: 1.6rem; margin-top: 1rem; font-size: 1rem; font-weight: 600; color: white; letter-spacing: 0.01em; opacity: 0.92; }
.sample-cursor { display: inline-block; width: 2px; height: 1.1em; background: white; margin-left: 2px; vertical-align: middle; animation: cursorBlink 0.7s step-end infinite; }
.sample-play-btn { margin-top: 0.75rem; display: inline-flex; align-items: center; gap: 0.5rem; background: linear-gradient(135deg, #a78bfa, #6366f1); color: white; border: none; padding: 0.55rem 1.2rem; border-radius: 20px; font-size: 0.85rem; font-weight: 700; cursor: pointer; box-shadow: 0 2px 12px rgba(99,102,241,0.3); }
.sample-play-icon { font-size: 0.7rem; }

/* Motivations badge (goal section) */
.motivations-badge { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.75rem; background: #f5f3ff; padding: 0.4rem 1rem; border-radius: 20px; font-size: 0.8rem; color: #6366f1; font-weight: 700; white-space: nowrap; }

/* Sample preview wrapper (goal section) */
.sample-preview-wrapper { margin-top: 1.1rem; }
.sample-typewriter-2 { display: none; font-size: 0.9rem; font-weight: 500; color: #6366f1; letter-spacing: 0.01em; text-align: center; line-height: 1.5; max-width: 400px; }
.sample-cursor-2 { display: inline-block; width: 2px; height: 1em; background: #6366f1; margin-left: 2px; vertical-align: middle; animation: cursorBlink 0.7s step-end infinite; }

/* Player empty state */
.empty-state-icon { font-size: 3rem; color: #6366f1; margin-bottom: 1rem; }

/* Track image hidden */
.track-image-hidden { display: none; }

/* Ambient volume group hidden */
.ambient-group-hidden { display: none; }

/* Upgrade page */
.upgrade-icon-box { width: 64px; height: 64px; background: linear-gradient(135deg, #a78bfa, #6366f1); border-radius: 20px; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.upgrade-crown { font-size: 1.5rem; color: white; }
.upgrade-title { background: linear-gradient(135deg, #a78bfa, #6366f1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.upgrade-balance-box { background: linear-gradient(135deg, #f5f3ff, #eef2ff); border-radius: 20px; padding: 1.5rem; margin-bottom: 2rem; text-align: center; border: 1px solid #e0e7ff; }
.upgrade-balance-text { font-size: 2rem; font-weight: 800; color: #6366f1; }
.plan-card { background: white; border-radius: 24px; padding: 2rem; border: 2px solid #6366f1; position: relative; overflow: hidden; }
.plan-badge { position: absolute; top: 0; right: 0; background: linear-gradient(135deg, #a78bfa, #6366f1); color: white; font-size: 0.7rem; font-weight: 700; padding: 0.4rem 1.2rem; border-bottom-left-radius: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.plan-price { text-align: center; margin-bottom: 1.5rem; }
.plan-price-amount { font-size: 3rem; font-weight: 800; color: #1e293b; }
.plan-price-period { font-size: 1rem; font-weight: 500; color: #94a3b8; }
.plan-features { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 2rem; }
.plan-feature-item { display: flex; align-items: center; gap: 0.75rem; font-size: 0.95rem; color: #334155; }
.plan-feature-check { color: #6366f1; }
.plan-subscribe-btn { display: block; width: 100%; padding: 1rem; background: linear-gradient(135deg, #a78bfa, #6366f1); color: white; border: none; border-radius: 16px; font-weight: 800; font-size: 1.1rem; cursor: pointer; text-align: center; text-decoration: none; box-shadow: 0 12px 24px rgba(124, 58, 237, 0.2); font-family: inherit; }
.plan-subscribe-icon { margin-right: 0.5rem; }
.plan-cancel-text { text-align: center; font-size: 0.75rem; color: #94a3b8; margin-top: 0.75rem; }
.plan-already-pro { text-align: center; color: #16a34a; font-weight: 700; font-size: 1rem; padding: 1rem; background: #f0fdf4; border-radius: 12px; border: 1px solid #bbf7d0; }
.stripe-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; padding: 1rem 1.5rem; text-align: center; font-weight: 700; font-size: 0.95rem; }
.stripe-banner-success { background: #16a34a; color: #fff; }
.stripe-banner-cancel { background: #dc2626; color: #fff; }

/* Pre-game */
.pregame-loading-hidden { display: none; }
.pregame-header-icon { color: #3b82f6; }

/* Playlist modal divider */
.playlist-modal-divider { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e2e8f0; }

/* Validation (JS-created elements) */
.validation-tick { text-align: center; font-size: 3rem; color: #22c55e; animation: fadeIn 0.3s ease; margin-bottom: 1rem; }
.validation-error { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; padding: 0.75rem 1rem; border-radius: 16px; font-weight: 600; font-size: 0.9rem; margin-bottom: 1rem; text-align: center; animation: fadeIn 0.3s ease; }

/* Confetti / celebration (JS-created elements) */
.confetti-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.confetti-piece { position: absolute; top: -10%; opacity: 0; }
.celebration-msg { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); background: linear-gradient(135deg,#a78bfa,#6366f1); color: white; padding: 2rem 2.5rem; border-radius: 28px; text-align: center; z-index: 10000; box-shadow: 0 8px 40px rgba(99,102,241,0.5); animation: fadeIn 0.4s ease; max-width: 85vw; pointer-events: none; }
.celebration-emoji { font-size: 2.5rem; margin-bottom: 0.5rem; }
.celebration-title { font-size: 1.4rem; font-weight: 900; margin-bottom: 0.4rem; }
.celebration-subtitle { font-size: 0.95rem; opacity: 0.85; font-weight: 500; }

/* Google sign-in hidden button */
.gsi-hidden-btn { position: fixed; opacity: 0; pointer-events: none; }


/* Playlist empty state text */
.playlist-empty-text { color: #94a3b8; text-align: center; padding: 2rem; }
