/* Apple / Notion Minimalist Dark Aesthetic with Transparent Liquid Frosted Glass */
:root {
    --bg-base: #07070b;
    --bg-surface: rgba(12, 15, 26, 0.45);
    --bg-elevated: rgba(20, 25, 42, 0.50);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-blue: #2563eb;
    --accent-green: #059669;
    --accent-red: #e11d48;
    --radius-sm: 12px;
    --radius-md: 20px; /* Squircles! */
    --radius-lg: 24px;
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Background canvas */
#star-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle at 50% 0%, #11121d 0%, var(--bg-base) 100%);
}

/* iOS Safe-Area Status Bar Guard */
#ios-status-bar-guard {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: env(safe-area-inset-top, 0px);
    background: #07070b;
    z-index: 1000001;
    pointer-events: none;
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: env(safe-area-inset-top, 0px);
    left: 0; right: 0;
    min-height: 68px;
    padding: 0.85rem 2rem;
    background: rgba(7, 7, 11, 0.95);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border-bottom: 1px solid var(--border-subtle);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    z-index: 100000;
}
.glass-nav.hidden { display: none; }
.nav-header { justify-self: start; }
.nav-brand { font-weight: 600; font-size: 1.15rem; color: var(--text-primary); text-decoration: none; animation: gentle-pulse 4s infinite alternate; }
.nav-links { display: flex; gap: 0.6rem; align-items: center; justify-self: center; }
.nav-link { 
    color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; font-weight: 500;
    padding: 0.45rem 0.85rem; border-radius: 20px; transition: all var(--transition); white-space: nowrap;
}
.nav-link:hover { 
    color: var(--text-primary); background: rgba(255, 255, 255, 0.06); 
}
.nav-link.active { 
    color: #ffffff; background: rgba(37, 99, 235, 0.22); border: 1px solid rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 14px rgba(37, 99, 235, 0.25); font-weight: 600; 
}


@keyframes gentle-pulse {
    0% { text-shadow: 0 0 8px rgba(255,255,255,0.2); }
    100% { text-shadow: 0 0 16px rgba(255,255,255,0.6); }
}

/* Main App Container */
#app {
    padding-top: calc(92px + env(safe-area-inset-top, 0px));
    min-height: 100vh;
    padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
}

/* Common Layouts */
.dashboard, .media-container, .pinboard-wrapper, .settings-wrapper, .widgets-container, .questions-page, .schedule-container, .bucket-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.75rem 2rem 0;
}
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}
.dashboard-header h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.25rem; }
.dashboard-header p { color: var(--text-secondary); font-size: 0.95rem; }

/* Buttons */
button {
    font-family: inherit; cursor: pointer; border: none; outline: none; transition: all var(--transition);
}
.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #c026d3 100%) !important;
    color: #ffffff !important;
    font-weight: 600;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    width: 100%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(192, 38, 211, 0.38);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border: 1px solid var(--border-subtle);
    font-weight: 600;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    cursor: pointer;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.4rem; font-weight: 500; }
input, select, textarea {
    width: 100%; background: var(--bg-elevated); border: 1px solid var(--border-subtle);
    color: var(--text-primary); padding: 0.7rem 1rem; border-radius: var(--radius-sm);
    font-family: inherit; font-size: 0.95rem; transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, select:focus, textarea:focus { border-color: var(--accent-blue); outline: none; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }

/* Login Page */
.login-wrapper {
    display: flex; justify-content: center; align-items: center; min-height: 80vh;
}
.login-card-glass {
    background: rgba(17, 17, 17, 0.7); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius-lg);
    padding: 3rem; width: 100%; max-width: 400px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}
.login-title-gradient {
    font-size: 2.5rem; font-weight: 700; text-align: center; margin-bottom: 0.5rem; letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.login-subtitle { text-align: center; color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 2rem; }

/* Cards & Grid */
.metrics-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin-top: 1rem;
}
.metric-card {
    background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
    padding: 1.5rem; transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.metric-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.2); box-shadow: 0 8px 30px rgba(0,0,0,0.4); }
.metric-label { color: var(--text-secondary); font-size: 0.85rem; font-weight: 500; margin-bottom: 0.5rem; }
.metric-value { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; color: var(--text-primary); margin-bottom: 0.25rem; }
.metric-detail { font-size: 0.8rem; color: var(--text-muted); }

/* Clocks */
.clocks-row { display: flex; gap: 1rem; margin-bottom: 1rem; position: relative; justify-content: center; align-items: stretch; }
.clock-card {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2), inset 0 0 10px rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    display: flex; align-items: center; gap: 1.5rem; padding: 1.5rem; width: 45%;
    background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
    transition: box-shadow var(--transition);
}
.clock-card:hover { box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
.clock-analog { width: 80px; height: 80px; flex-shrink: 0; }
.clock-details { display: flex; flex-direction: column; }
.clock-partner { font-weight: 600; font-size: 1rem; color: var(--text-secondary); margin-bottom: 0.25rem; }
.clock-digital { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; margin-bottom: 0.25rem; }
.clock-location { font-size: 0.85rem; color: var(--text-muted); }

.clocks-center-metric {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(20,20,25,0.8); backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle); border-radius: 30px;
    padding: 0.5rem 1rem; display: flex; flex-direction: column; align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5); z-index: 10;
}
.clocks-center-metric span { font-size: 0.8rem; font-weight: 600; color: #fff; }
.clocks-center-metric small { font-size: 0.65rem; color: var(--text-secondary); }

/* Map */
.map-card {
    background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
    overflow: hidden; margin-bottom: 1rem; transition: box-shadow var(--transition);
}
.map-card:hover { box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
.map-header {
    padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-subtle); display: flex; justify-content: space-between; align-items: center;
}
.map-title { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.95rem; }
.map-metrics { font-size: 0.85rem; color: var(--text-muted); }
#partner-map { height: 350px; width: 100%; background: #000; position: relative; z-index: 1; }
.leaflet-container { z-index: 1 !important; }
.pulse-marker { border-radius: 50%; box-shadow: 0 0 0 rgba(255,255,255,0.4); animation: map-pulse 2s infinite; }
.pulse-marker.blue { background: var(--accent-blue); box-shadow: 0 0 0 rgba(59, 130, 246, 0.4); }
.pulse-marker.green { background: var(--accent-green); box-shadow: 0 0 0 rgba(16, 185, 129, 0.4); }
@keyframes map-pulse {
    0% { box-shadow: 0 0 0 0 var(--pulse-color, rgba(255,255,255,0.7)); }
    70% { box-shadow: 0 0 0 15px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* Jellyfin / Media Grid */
.media-toolbar { display: flex; gap: 1rem; margin-bottom: 1.5rem; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.filter-tabs { display: flex; gap: 0.5rem; background: var(--bg-surface); padding: 0.25rem; border-radius: var(--radius-sm); border: 1px solid var(--border-subtle); }
.filter-tab {
    padding: 0.4rem 0.8rem; border-radius: 6px; font-size: 0.85rem; font-weight: 500; color: var(--text-secondary);
    background: transparent; border: none; cursor: pointer; transition: all 0.2s;
}
.filter-tab:hover { color: var(--text-primary); }
.filter-tab.active { background: var(--bg-elevated); color: var(--text-primary); box-shadow: 0 1px 3px rgba(0,0,0,0.2); }

.jellyfin-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.5rem;
}
.jellyfin-card {
    background: var(--bg-surface); border-radius: var(--radius-md); overflow: hidden;
    border: 1px solid var(--border-subtle); transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    display: flex; flex-direction: column; position: relative;
}
.jellyfin-card:hover {
    transform: translateY(-4px) scale(1.02); border-color: rgba(255,255,255,0.2); z-index: 2;
    box-shadow: 0 12px 30px rgba(0,0,0,0.6);
}
.jellyfin-poster-wrap { position: relative; width: 100%; padding-top: 150%; /* 2:3 aspect ratio */ overflow: hidden; cursor: pointer; }
.jellyfin-poster { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.jellyfin-badge {
    position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
    color: #fff; font-size: 0.75rem; font-weight: 600; padding: 2px 6px; border-radius: 6px;
}
.jellyfin-genre {
    position: absolute; top: 8px; left: 8px; background: rgba(59, 130, 246, 0.8); backdrop-filter: blur(4px);
    color: #fff; font-size: 0.7rem; font-weight: 600; padding: 2px 6px; border-radius: 6px;
}
.jellyfin-info { padding: 1rem; display: flex; flex-direction: column; flex: 1; justify-content: space-between; }
.jellyfin-title { font-weight: 600; font-size: 0.95rem; line-height: 1.2; margin-bottom: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.jellyfin-title:hover { color: var(--accent-blue); }
.jellyfin-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.jellyfin-progress-bar { width: 100%; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; margin-bottom: 0.75rem; }
.jellyfin-progress-fill { height: 100%; background: var(--accent-blue); box-shadow: 0 0 8px var(--accent-blue); }
.jellyfin-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.btn-mini {
    background: rgba(255,255,255,0.1); color: #fff; border: none; padding: 0.4rem 0.5rem;
    border-radius: 6px; font-size: 0.75rem; cursor: pointer; transition: background 0.2s, box-shadow 0.2s; flex: 1;
}
.btn-mini:hover { background: rgba(255,255,255,0.2); box-shadow: 0 2px 8px rgba(255,255,255,0.1); }
.btn-mini.danger:hover { background: rgba(239, 68, 68, 0.8); box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4); }
.btn-mini.success:hover { background: rgba(16, 185, 129, 0.8); box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4); }

/* Modals */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(10px);
    z-index: 150000 !important; display: flex; justify-content: center; align-items: flex-start;
    padding-top: calc(75px + env(safe-area-inset-top, 0px)); padding-bottom: 2.5rem; overflow-y: auto;
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-box {
    background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
    width: 100%; max-width: 500px; padding: 2.5rem; position: relative; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8); transform: scale(0.95); transition: transform 0.3s;
}
.modal-overlay.active .modal-box { transform: scale(1); }
#details-modal .modal-box {
    margin-top: 0;
    max-height: calc(100vh - 100px);
    position: relative;
    z-index: 150001;
}
.modal-close {
    position: absolute; top: 1.5rem; right: 1.5rem; background: rgba(255,255,255,0.1); border: none; color: #fff;
    width: 32px; height: 32px; border-radius: 50%; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
    z-index: 150002;
}
.modal-close:hover { background: rgba(255,255,255,0.25); }

/* Pinboard */
.pinboard-toolbar { display: flex; justify-content: space-between; margin-bottom: 1.5rem; }
.zoom-btn-group { display: flex; background: var(--bg-surface); border-radius: 8px; border: 1px solid var(--border-subtle); overflow: hidden; }
.zoom-btn { background: none; border: none; color: var(--text-secondary); padding: 0.4rem 0.8rem; font-size: 0.8rem; cursor: pointer; }
.zoom-btn.active { background: var(--bg-elevated); color: #fff; font-weight: 600; box-shadow: inset 0 0 5px rgba(0,0,0,0.3); }

.pinboard-grid {
    display: grid; gap: 1.5rem; align-items: start;
}
.pinboard-grid.zoom-sm { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pinboard-grid.zoom-md { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.pinboard-grid.zoom-lg { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.pinboard-horizontal {
    display: flex; gap: 1.5rem; overflow-x: auto; padding-bottom: 1rem; scroll-snap-type: x mandatory;
}
.pinboard-horizontal .pinboard-card { min-width: 280px; scroll-snap-align: center; }

.pinboard-card {
    background: #fff; padding: 10px 10px 20px 10px; border-radius: 8px; /* Slightly squircle for polaroids */
    box-shadow: 0 8px 25px rgba(0,0,0,0.4); transform: rotate(-2deg); transition: transform 0.3s, box-shadow 0.3s;
}
.pinboard-card:nth-child(even) { transform: rotate(2deg); }
.pinboard-card:hover { transform: scale(1.05) rotate(0); z-index: 10; box-shadow: 0 15px 40px rgba(0,0,0,0.6); }
.pinboard-photo { width: 100%; height: auto; object-fit: cover; aspect-ratio: 1; border-radius: 4px; cursor: pointer; }
.pinboard-caption { color: #111; font-family: "Courier New", Courier, monospace; margin-top: 10px; font-size: 0.9rem; font-weight: 600; text-align: center; }
.pinboard-meta { display: flex; justify-content: space-between; font-size: 0.7rem; color: #666; margin-top: 8px; }

/* Settings Sections & Frosted Glass Cards */
.settings-section, .glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 32px rgba(0,0,0,0.35);
}
.settings-section h2 { font-size: 1.4rem; font-weight: 600; margin-bottom: 0.5rem; }
.sec-desc { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 1.5rem; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media(max-width: 768px) { .settings-grid { grid-template-columns: 1fr; } }

.flatpickr-calendar { background: var(--bg-elevated) !important; box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important; border: 1px solid var(--border-subtle) !important; color: var(--text-primary) !important; border-radius: 12px !important; }

.flatpickr-day { color: var(--text-primary) !important; }
.flatpickr-day.selected { background: var(--accent-blue) !important; border-color: var(--accent-blue) !important; }
.flatpickr-day:hover { background: rgba(255,255,255,0.1) !important; }
.flatpickr-month, .flatpickr-weekday { color: var(--text-secondary) !important; fill: var(--text-secondary) !important; }

@media (max-width: 768px) {
    .clocks-row { flex-direction: column; align-items: center; gap: 2rem; }
    .clock-card { width: 100%; justify-content: center; }
    .clocks-center-metric { position: relative; top: 0; left: 0; transform: none; margin: -1.5rem auto; width: fit-content; z-index: 10; background: var(--bg-card); }
    .main-content { padding-bottom: 80px; }
    .clocks-section { gap: 2rem; }
    .clock-time { font-size: 2.5rem; }
    .jellyfin-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

.nav-header {
    display: flex; justify-content: space-between; align-items: center; width: 100%;
}
.hamburger-btn {
    display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer;
}
@media (max-width: 768px) {
    #app {
        padding-top: calc(84px + env(safe-area-inset-top, 0px)) !important;
    }
    .dashboard, .media-container, .pinboard-wrapper, .settings-wrapper, .widgets-container, .questions-page, .schedule-container, .bucket-container {
        padding-left: 1.15rem !important;
        padding-right: 1.15rem !important;
        padding-top: 0.25rem !important;
    }
    .glass-nav {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 0.75rem 1.25rem !important;
        min-height: 56px !important;
        height: auto !important;
        background: rgba(10, 10, 15, 0.96) !important;
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
        z-index: 100000 !important;
    }
    .hamburger-btn {
        display: block !important;
        padding: 0.25rem 0.5rem;
        cursor: pointer;
        z-index: 100001 !important;
    }
    .nav-links {
        display: none !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 0.5rem !important;
        margin-top: 1rem !important;
        background: rgba(13, 13, 20, 0.98) !important;
        border-top: 1px solid var(--border-subtle) !important;
        border-radius: 12px !important;
        padding: 0.75rem 0.5rem !important;
        position: static !important;
        transform: none !important;
        z-index: 100000 !important;
    }
    .nav-links.active {
        display: flex !important;
    }
    .nav-link {
        width: 100% !important;
        text-align: left !important;
        padding: 0.75rem 1rem !important;
        font-size: 0.95rem !important;
        border-radius: 8px !important;
    }
}

/* Season & Episode Browser in Modal */
.season-selector {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    scrollbar-width: thin;
}
.season-tab {
    padding: 0.4rem 0.9rem;
    border-radius: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
}
.season-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}
.season-tab.active {
    background: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
    font-weight: 600;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}
.episode-grid {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 280px;
    overflow-y: auto;
}
.episode-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition);
}
.episode-row:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}
.episode-row.watched-past {
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.06);
}
.episode-row.watched-past:hover {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.5);
}
.episode-row.current-watched {
    border-color: var(--accent-green);
    background: rgba(16, 185, 129, 0.16);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}
.episode-row.unwatched {
    border-color: var(--border-subtle);
    background: var(--bg-elevated);
    opacity: 0.85;
}
.episode-row.unwatched:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}
.episode-num {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 32px;
}
.episode-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}
.episode-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.episode-badge.watched-past {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}
.episode-badge.current-watched {
    background: var(--accent-green);
    color: #000;
    font-weight: 700;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}
.episode-badge.unwatched {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
}

.sky-breathe {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(139, 92, 246, 0.15), rgba(0,0,0,0) 65%);
  mix-blend-mode: screen;
  animation: sky-breathe 7s ease-in-out infinite;
  z-index: 1;
}
@keyframes sky-breathe {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

@keyframes sky-breathe-center {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}


/* Custom Game Selection UI & Dark Selects */
select, select option {
    background: #12121c !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.cat-card {
    background: rgba(18, 22, 36, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid var(--border-subtle);
    border-radius: 14px;
    padding: 1.1rem 0.85rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.cat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(30, 36, 58, 0.75);
}

.cat-card.active {
    background: rgba(37, 99, 235, 0.18) !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 16px rgba(37, 99, 235, 0.3) !important;
}

.cat-icon {
    font-size: 1.6rem;
}

.cat-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pill-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.pill-btn {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    background: rgba(18, 22, 36, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(30, 36, 58, 0.8);
}

.pill-btn.active {
    background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%) !important;
    color: #fff !important;
    border-color: transparent !important;
    font-weight: 600;
    box-shadow: 0 0 12px rgba(29, 78, 216, 0.35) !important;
}


/* ─── Couple Game: Neon Deck & Glow UI ─── */
.neon-game-wrapper {
    max-width: 680px;
    margin: 0 auto;
    padding: 1rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.neon-top-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50px;
    padding: 6px 18px;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
    color: #f3e8ff;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.25);
    margin-bottom: 1.25rem;
}

.neon-main-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 2rem;
    text-shadow: 0 0 20px rgba(236, 72, 153, 0.6), 0 0 40px rgba(168, 85, 247, 0.4);
}

.neon-card-stage {
    position: relative;
    width: 100%;
    max-width: 360px;
    height: 460px;
    margin: 1rem auto 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.neon-glow-ambient {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.45) 0%, rgba(236, 72, 153, 0.25) 45%, rgba(0, 0, 0, 0) 70%);
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
    animation: gentle-pulse 5s infinite alternate;
}

.neon-card-bg-2 {
    position: absolute;
    width: 310px;
    height: 430px;
    background: #11081f;
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: 28px;
    transform: rotate(-7deg) scale(0.94);
    z-index: 1;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.neon-card-bg-1 {
    position: absolute;
    width: 310px;
    height: 430px;
    background: #1b0c30;
    border: 1px solid rgba(236, 72, 153, 0.2);
    border-radius: 28px;
    transform: rotate(5deg) scale(0.97);
    z-index: 2;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.65);
}

.neon-card-front {
    position: relative;
    width: 310px;
    min-height: 430px;
    background: linear-gradient(165deg, #260d3d 0%, #150724 100%);
    border: 1.5px solid rgba(236, 72, 153, 0.4);
    border-radius: 28px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(168, 85, 247, 0.3);
    z-index: 3;
    padding: 2.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.neon-card-front:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.9), 0 0 45px rgba(236, 72, 153, 0.45);
}

.neon-floating-badge {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.8), 0 8px 20px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    z-index: 5;
    animation: floating-bounce 3s ease-in-out infinite;
}

.neon-cat-tag {
    display: inline-block;
    background: linear-gradient(135deg, #ff1b6b 0%, #e91e63 100%);
    box-shadow: 0 0 25px rgba(255, 27, 107, 0.75);
    color: #ffffff;
    padding: 8px 22px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.neon-card-question {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
    margin: 1.5rem 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.neon-card-footer {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
}

.neon-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.85rem;
    width: 100%;
    margin-bottom: 2rem;
}

.neon-cat-card {
    background: rgba(26, 12, 42, 0.7);
    border: 1.5px solid rgba(168, 85, 247, 0.25);
    border-radius: 16px;
    padding: 1.1rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.25s ease;
    backdrop-filter: blur(10px);
}

.neon-cat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(236, 72, 153, 0.6);
    background: rgba(45, 18, 72, 0.8);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), 0 0 15px rgba(236, 72, 153, 0.3);
}

.neon-cat-card.active {
    background: linear-gradient(145deg, rgba(236, 72, 153, 0.25), rgba(168, 85, 247, 0.25));
    border-color: #ff1b6b;
    box-shadow: 0 0 25px rgba(255, 27, 107, 0.5), inset 0 0 15px rgba(255, 27, 107, 0.2);
}

.neon-pill-group {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
}

.neon-pill {
    background: rgba(26, 12, 42, 0.6);
    border: 1.5px solid rgba(168, 85, 247, 0.25);
    border-radius: 50px;
    padding: 0.6rem 1.2rem;
    color: #e9d5ff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.neon-pill:hover {
    color: #ffffff;
    border-color: rgba(236, 72, 153, 0.6);
    background: rgba(45, 18, 72, 0.8);
}

.neon-pill.active {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.5);
    font-weight: 700;
}

.neon-btn-primary {
    background: linear-gradient(135deg, #ff1b6b 0%, #9333ea 100%);
    border: none;
    border-radius: 50px;
    padding: 1.1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(255, 27, 107, 0.4), 0 0 20px rgba(147, 51, 234, 0.3);
    transition: all 0.25s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.neon-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(255, 27, 107, 0.6), 0 0 30px rgba(147, 51, 234, 0.5);
}

.neon-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px dashed rgba(168, 85, 247, 0.4);
    border-radius: 50px;
    padding: 0.9rem 1.8rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #d8b4fe;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.neon-btn-secondary:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: #a855f7;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

/* ─── Notion-Style Multi-Tags Component ─── */
.notion-tag-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    background: rgba(14, 18, 32, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    min-height: 44px;
    width: 100%;
}
.notion-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(37, 99, 235, 0.4);
    color: #93c5fd;
    user-select: none;
    transition: all 0.2s;
}
.notion-tag .tag-remove {
    cursor: pointer;
    opacity: 0.7;
    font-size: 0.85rem;
    margin-left: 0.15rem;
}
.notion-tag .tag-remove:hover {
    opacity: 1;
    color: #ef4444;
}
.notion-tag-chip {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    transition: all 0.15s ease;
}
.notion-tag-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}
.notion-tag-chip.selected {
    background: rgba(37, 99, 235, 0.25);
    border: 1px solid #3b82f6;
    color: #ffffff;
    font-weight: 500;
}

/* ─── Animated Interactive Virtual Cat Companions ─── */
.cat-companion-entity {
    position: fixed;
    bottom: 22px;
    left: 45px;
    z-index: 99999;
    cursor: pointer;
    user-select: none;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), left 1.4s ease-in-out;
    filter: drop-shadow(0 6px 16px rgba(0,0,0,0.6));
}
.cat-companion-entity.hidden {
    display: none !important;
}
.cat-companion-entity.flipped {
    transform: scaleX(-1);
}
.cat-body-wrap {
    position: relative;
    width: 64px;
    height: 52px;
}
.cat-bubble {
    position: absolute;
    top: -34px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.cat-bubble.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-6px);
}
.cat-zzz {
    position: absolute;
    top: -24px;
    right: -8px;
    font-size: 0.85rem;
    font-weight: bold;
    color: #c084fc;
    animation: zzz-float 2.2s infinite ease-in-out;
    opacity: 0;
}
.cat-companion-entity.sleeping .cat-zzz {
    opacity: 1;
}
@keyframes zzz-float {
    0% { transform: translateY(0) scale(0.7); opacity: 0; }
    40% { opacity: 0.9; }
    100% { transform: translateY(-20px) translateX(10px) scale(1.3); opacity: 0; }
}
@keyframes cat-tail-wag {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(18deg); }
}
@keyframes cat-breathe {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}
@keyframes cat-walk {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
.cat-tail {
    transform-origin: bottom left;
    animation: cat-tail-wag 2.2s infinite ease-in-out;
}
.cat-companion-entity.sitting .cat-sprite {
    animation: cat-breathe 2.4s infinite ease-in-out;
}
.cat-companion-entity.walking .cat-sprite {
    animation: cat-walk 0.45s infinite ease-in-out;
}
.cat-companion-entity.playing .cat-sprite {
    animation: cat-walk 0.28s infinite ease-in-out;
}

/* Cat Color Themes */
.cat-theme-pink { --cat-body: #fbcfe8; --cat-belly: #fdf2f8; --cat-accent: #f472b6; --cat-eyes: #1e1b4b; }
.cat-theme-orange { --cat-body: #fb923c; --cat-belly: #ffedd5; --cat-accent: #ea580c; --cat-eyes: #0f172a; }
.cat-theme-black { --cat-body: #334155; --cat-belly: #475569; --cat-accent: #0f172a; --cat-eyes: #38bdf8; }
.cat-theme-white { --cat-body: #f8fafc; --cat-belly: #ffffff; --cat-accent: #cbd5e1; --cat-eyes: #6366f1; }
.cat-theme-blue { --cat-body: #60a5fa; --cat-belly: #dbeafe; --cat-accent: #2563eb; --cat-eyes: #1e1b4b; }
.cat-theme-green { --cat-body: #4ade80; --cat-belly: #dcfce7; --cat-accent: #16a34a; --cat-eyes: #1e1b4b; }
.cat-theme-purple { --cat-body: #c084fc; --cat-belly: #f3e8ff; --cat-accent: #9333ea; --cat-eyes: #1e1b4b; }

.cat-sprite .cat-body { fill: var(--cat-body, #fbcfe8); }
.cat-sprite .cat-belly { fill: var(--cat-belly, #fdf2f8); }
.cat-sprite .cat-accent { fill: var(--cat-accent, #f472b6); }
.cat-sprite .cat-tail { stroke: var(--cat-body, #fbcfe8); }
.cat-sprite .cat-eyes { fill: var(--cat-eyes, #1e1b4b); }

/* ─── Cozy Corner Cat Stage ─── */
#corner-cat-stage {
    position: fixed;
    bottom: 22px;
    right: 25px;
    z-index: 99999;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}
#corner-cat-stage.pos-left {
    right: auto;
    left: 25px;
}
#corner-cat-stage.hidden {
    display: none !important;
}
.corner-cat-floating-squircle {
    position: relative;
    background: transparent;
    border: none;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    filter: drop-shadow(0 10px 22px rgba(0,0,0,0.75));
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.corner-cat-floating-squircle:hover {
    transform: translateY(-5px) scale(1.06);
    filter: drop-shadow(0 14px 28px rgba(0,0,0,0.85)) drop-shadow(0 0 12px rgba(168, 85, 247, 0.3));
}
.corner-cat-floating-squircle img {
    border-radius: 20px;
    max-height: 68px;
    max-width: 105px;
    width: auto;
    height: auto;
    display: block;
    image-rendering: pixelated;
    transition: all 0.25s ease;
}

/* Companion Size Variants */
#corner-cat-stage.size-sm .corner-cat-floating-squircle img { max-height: 48px; max-width: 75px; }
#corner-cat-stage.size-md .corner-cat-floating-squircle img { max-height: 68px; max-width: 105px; }
#corner-cat-stage.size-lg .corner-cat-floating-squircle img { max-height: 92px; max-width: 140px; }
#corner-cat-stage.size-xl .corner-cat-floating-squircle img { max-height: 120px; max-width: 180px; }

/* ─── Companion Sender Studio Modal ─── */
.companion-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(4, 4, 8, 0.82);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.companion-modal-overlay.open,
#add-date-idea-modal,
#qobuz-connect-modal,
#caldav-config-modal,
#reschedule-modal {
    opacity: 1 !important;
    pointer-events: auto !important;
    display: flex !important;
}
.companion-modal-content {
    background: linear-gradient(135deg, rgba(22, 20, 38, 0.95), rgba(12, 11, 22, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 24px 60px rgba(0,0,0,0.8), 0 0 30px rgba(168, 85, 247, 0.2);
    border-radius: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.75rem;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.companion-modal-overlay.open .companion-modal-content {
    transform: scale(1) translateY(0);
}

/* ─── Robust GIF Gallery Grids (3 Columns on iPhone / Mobile) ─── */
#companion-gif-gallery-grid, #modal-gif-gallery-grid, .gif-gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px !important;
    row-gap: 16px !important;
    column-gap: 12px !important;
    max-height: 290px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 12px !important;
    background: rgba(0, 0, 0, 0.5) !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
}

@media (min-width: 540px) {
    #companion-gif-gallery-grid, #modal-gif-gallery-grid, .gif-gallery-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 14px !important;
        row-gap: 16px !important;
    }
}

.gif-gallery-card {
    position: relative !important;
    cursor: pointer !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    height: 84px !important;
    min-height: 84px !important;
    max-height: 84px !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px !important;
    box-sizing: border-box !important;
    transition: transform 0.15s ease, border-color 0.15s !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.gif-gallery-card:hover, .gif-gallery-card:active {
    transform: scale(0.95) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.gif-gallery-card.active {
    border-color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.15) !important;
    box-shadow: 0 0 0 2px #3b82f6, 0 4px 14px rgba(59, 130, 246, 0.4) !important;
}

.gif-gallery-card img {
    max-width: 100% !important;
    max-height: 72px !important;
    width: auto !important;
    height: 100% !important;
    object-fit: contain !important;
    image-rendering: pixelated !important;
    display: block !important;
    pointer-events: none !important;
    border-radius: 8px !important;
}

#modal-preview-gif, #corner-cat-gif {
    border-radius: 14px !important;
}

/* ─── Lock Screen Widget Mockups ─── */
.widget-card-mockup.lock-rect {
    width: 220px;
    height: 72px;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}
.widget-card-mockup.lock-inline {
    width: 260px;
    height: 38px;
    padding: 0.4rem 0.85rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 500;
}
.widget-card-mockup.lock-circle {
    width: 72px;
    height: 72px;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* ─── Widgets Page Studio & Previews ─── */
.widgets-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 1rem 4rem;
}
.widget-preview-stage {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 1rem;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(10, 10, 16, 0.6) 80%);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.widget-card-mockup {
    background: linear-gradient(135deg, rgba(20, 24, 40, 0.88), rgba(12, 14, 25, 0.95));
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), inset 0 1px 1px rgba(255,255,255,0.15);
    border-radius: 24px;
    color: #ffffff;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.widget-card-mockup.small {
    width: 172px;
    height: 172px;
    padding: 0.9rem 0.95rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}
.widget-card-mockup.medium {
    width: 350px;
    height: 170px;
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ─── Compact Horizontal Scroll & Pills for Mobile ─── */
.horizontal-scroll-strip, .pill-strip, .q-tabs {
    display: flex !important;
    gap: 0.5rem !important;
    overflow-x: auto !important;
    padding: 0.35rem 0.1rem !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
}
.horizontal-scroll-strip::-webkit-scrollbar, .pill-strip::-webkit-scrollbar, .q-tabs::-webkit-scrollbar {
    display: none !important;
}
.pill-btn, .q-tab, .filter-btn, .date-pill {
    padding: 0.45rem 0.9rem !important;
    font-size: 0.82rem !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    min-height: 32px !important;
}
@media (max-width: 600px) {
    .pill-btn, .q-tab, .filter-btn {
        padding: 0.4rem 0.75rem !important;
        font-size: 0.78rem !important;
        min-height: 30px !important;
    }
    .cat-card {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8rem !important;
        min-width: 75px !important;
    }
}

/* ─── Memory Badges & Date Tags ─── */
.memory-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.memory-date-tag {
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ─── Virtual Date Cards ─── */
.virtual-date-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.virtual-date-card:hover {
    transform: translateY(-2px);
    border-color: #ec4899;
    background: rgba(236, 72, 153, 0.08);
}

/* ─── Demo Mode Banner ─── */
.demo-mode-banner {
    background: linear-gradient(90deg, #ec4899, #8b5cf6);
    color: #ffffff;
    padding: 0.45rem 1rem;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 10000;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.widget-card-mockup.large {
    width: 350px;
    height: 350px;
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.guide-step-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.4rem;
    margin-bottom: 1.25rem;
}
.code-block-glass {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.82rem;
    color: #e2e8f0;
    max-height: 240px;
    overflow-y: auto;
    white-space: pre;
}

/* ─── City Autocomplete Solid Dropdown ─── */
#city-autocomplete, .city-autocomplete-dropdown {
    background: #141624 !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    box-shadow: 0 16px 36px rgba(0,0,0,0.95), 0 0 20px rgba(139, 92, 246, 0.25) !important;
    border-radius: 0 0 14px 14px !important;
    z-index: 99999 !important;
    backdrop-filter: none !important;
}
.city-option {
    padding: 0.75rem 1.15rem !important;
    cursor: pointer !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    color: #ffffff !important;
    font-size: 0.95rem !important;
    background: #141624 !important;
    transition: background 0.15s ease, color 0.15s ease !important;
}
.city-option:hover {
    background: #282b45 !important;
    color: #60a5fa !important;
}
.city-option:last-child {
    border-bottom: none !important;
}

/* ─── Cozy Corner Cat Stage & Dialogues ─── */
.corner-cat-bubble {
    position: absolute;
    top: -42px;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(18, 14, 30, 0.96);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 6px 18px rgba(0,0,0,0.6);
}
.corner-cat-bubble.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-6px);
    animation: bubblePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bubblePop {
    0% { transform: translateX(-50%) translateY(6px) scale(0.75); opacity: 0; }
    60% { transform: translateX(-50%) translateY(-10px) scale(1.08); opacity: 1; }
    100% { transform: translateX(-50%) translateY(-6px) scale(1); opacity: 1; }
}

@keyframes companionBounce {
    0% { transform: scale(1) translateY(0); }
    18% { transform: scale(1.22, 0.82) translateY(-8px); }
    38% { transform: scale(0.92, 1.18) translateY(-24px); }
    58% { transform: scale(1.12, 0.94) translateY(-10px); }
    78% { transform: scale(0.98, 1.03) translateY(-3px); }
    100% { transform: scale(1) translateY(0); }
}

.corner-cat-floating-squircle.companion-bounce,
#corner-cat-gif.companion-bounce,
.companion-bounce {
    animation: companionBounce 1.2s cubic-bezier(0.28, 0.84, 0.42, 1) !important;
}

/* ─── Theater & Synced Watch Party ────────────────────────────────────────── */
.theater-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.25rem 1rem 5rem 1rem;
}

@media (max-width: 768px) {
    .theater-page {
        padding-top: 4.5rem;
    }
}

.theater-cinema-frame {
    position: relative;
    background: #000000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(139, 92, 246, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 1.5rem;
}

.theater-tap-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    cursor: pointer;
    transition: opacity 0.25s ease;
}

.theater-tap-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.theater-play-disc {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #ffffff;
    box-shadow: 0 0 30px rgba(236, 72, 153, 0.6);
    margin-bottom: 0.75rem;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theater-tap-overlay:hover .theater-play-disc {
    transform: scale(1.1);
}

.theater-video-ratio {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: #050508;
}

.theater-video-ratio video,
.theater-video-ratio iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #000000;
    object-fit: contain;
}

.theater-ambient-glow {
    position: absolute;
    top: -20px;
    left: 5%;
    right: 5%;
    height: 60px;
    background: radial-gradient(ellipse at top, rgba(139, 92, 246, 0.35), transparent 70%);
    filter: blur(25px);
    pointer-events: none;
    z-index: 0;
}

/* Floating WebRTC Voice & Sync Bar */
.theater-dock {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(18, 18, 28, 0.88);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    padding: 0.9rem 1.4rem;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.voice-status-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.mic-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.55rem 1.15rem;
    border-radius: 24px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.mic-toggle-btn.active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.45);
}

.mic-toggle-btn.muted {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.audio-wave-visualizer {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 18px;
}

.audio-wave-bar {
    width: 3px;
    height: 4px;
    background: #10b981;
    border-radius: 2px;
    transition: height 0.1s ease;
}

.audio-wave-visualizer.speaking .audio-wave-bar {
    animation: soundWave 0.5s ease-in-out infinite alternate;
}

.audio-wave-visualizer.speaking .audio-wave-bar:nth-child(1) { animation-delay: 0.1s; }
.audio-wave-visualizer.speaking .audio-wave-bar:nth-child(2) { animation-delay: 0.2s; }
.audio-wave-visualizer.speaking .audio-wave-bar:nth-child(3) { animation-delay: 0.3s; }
.audio-wave-visualizer.speaking .audio-wave-bar:nth-child(4) { animation-delay: 0.15s; }

@keyframes soundWave {
    0% { height: 4px; }
    100% { height: 18px; }
}

/* Emoji Reaction Burst System */
.theater-reactions-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.reaction-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 6px 12px;
    font-size: 1.25rem;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s ease;
}

.reaction-btn:hover {
    transform: scale(1.25);
    background: rgba(255, 255, 255, 0.15);
}

.reaction-btn:active {
    transform: scale(0.9);
}

/* Floating Emoji Overlay */
#theater-reaction-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
}

.floating-emoji-item {
    position: absolute;
    bottom: 20px;
    font-size: 2.5rem;
    animation: floatUpBurst 2.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.7));
}

@keyframes floatUpBurst {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.6);
    }
    15% {
        opacity: 1;
        transform: translateY(-40px) scale(1.3);
    }
    80% {
        opacity: 0.9;
    }
    100% {
        opacity: 0;
        transform: translateY(-280px) scale(1);
    }
}

/* Responsive Mobile Theater View */
@media (max-width: 768px) {
    .theater-cinema-frame {
        border-radius: 14px;
        margin-bottom: 1rem;
    }
    .theater-dock {
        padding: 0.75rem 1rem;
        flex-direction: column;
        align-items: stretch;
    }
    .voice-status-group {
        justify-content: space-between;
    }
    .theater-reactions-row {
        justify-content: center;
    }
}

/* ─── Full Weekly Interactive Calendar Grid ─── */
.week-cal-wrapper {
    background: rgba(15, 10, 25, 0.7);
    border: 1px solid rgba(168, 85, 247, 0.25);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.week-cal-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.85rem;
}

.week-cal-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.week-cal-scroll {
    overflow-x: auto;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.week-cal-table {
    display: grid;
    grid-template-columns: 65px repeat(7, minmax(130px, 1fr));
    min-width: 980px;
    position: relative;
}

.week-cal-col-header {
    padding: 0.75rem 0.5rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.85rem;
    font-weight: 600;
}

.week-cal-col-header.today {
    background: rgba(236, 72, 153, 0.15);
    border-bottom: 2px solid #ec4899;
    color: #f472b6;
}

.week-cal-time-col {
    background: rgba(0, 0, 0, 0.25);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.week-cal-hour-label {
    height: 54px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 4px;
    font-size: 0.72rem;
    color: #94a3b8;
    font-family: monospace;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.week-cal-day-col {
    position: relative;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.01);
}

.week-cal-day-col.today {
    background: rgba(236, 72, 153, 0.03);
}

.week-cal-slot-cell {
    height: 54px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
    transition: background 0.15s;
    cursor: pointer;
}

.week-cal-slot-cell:hover {
    background: rgba(255, 255, 255, 0.05);
}

.week-cal-event-block {
    position: absolute;
    left: 4px;
    right: 4px;
    border-radius: 8px;
    padding: 5px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s, box-shadow 0.15s, z-index 0.15s;
    z-index: 2;
}

.week-cal-event-block:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
    z-index: 10;
}

.week-cal-event-block.leo {
    background: rgba(59, 130, 246, 0.3);
    border: 1.5px solid #3b82f6;
    color: #dbeafe;
}

.week-cal-event-block.andrea {
    background: rgba(34, 197, 94, 0.3);
    border: 1.5px solid #22c55e;
    color: #dcfce7;
}

.week-cal-event-block.shared {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.4), rgba(147, 51, 234, 0.4));
    border: 1.5px solid #ec4899;
    color: #fdf2f8;
}

.week-cal-now-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
    z-index: 5;
    pointer-events: none;
}

.week-cal-now-line::before {
    content: '';
    position: absolute;
    left: -4px;
    top: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

.week-cal-event-block.pending {
    background: rgba(100, 116, 139, 0.35) !important;
    border: 1.5px dashed #94a3b8 !important;
    color: #e2e8f0 !important;
}

.week-cal-event-block.pending::after {
    content: ' ⏳ Pending';
    font-size: 0.62rem;
    opacity: 0.85;
    font-weight: 500;
}

/* Drag Selection Area */
.cal-drag-selection {
    position: absolute;
    left: 4px;
    right: 4px;
    background: rgba(168, 85, 247, 0.35);
    border: 2px dashed #c084fc;
    border-radius: 8px;
    z-index: 8;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.4);
}

/* Solid Opaque Inputs & Date Picker */
input[type="datetime-local"],
input[type="date"],
input[type="time"],
.flatpickr-calendar,
.flatpickr-time,
.flatpickr-months {
    color-scheme: dark !important;
    background: #141026 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85) !important;
}

.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange {
    background: #a855f7 !important;
    border-color: #a855f7 !important;
}

.flatpickr-day:hover {
    background: rgba(168, 85, 247, 0.3) !important;
}

/* ── Cross-Platform Music Sync Bar (Qobuz ⇄ Spotify) ─────────────────────── */
.music-sync-bar {
    background: rgba(15, 10, 30, 0.75);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 85, 247, 0.28);
    border-radius: 18px;
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.music-sync-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #a855f7, #10b981);
    opacity: 0.8;
}

.music-partner-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 1;
    min-width: 240px;
}

.music-album-art {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    background: #1a1528;
    flex-shrink: 0;
}

.music-meta {
    overflow: hidden;
    flex: 1;
}

.music-track-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.music-artist-name {
    font-size: 0.78rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.music-badge-qobuz {
    background: linear-gradient(135deg, #eab308, #ca8a04);
    color: #000;
    font-weight: 800;
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.music-badge-spotify {
    background: #1db954;
    color: #000;
    font-weight: 800;
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.music-center-equalizer {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 0 0.5rem;
}

.music-eq-bar {
    width: 3px;
    background: linear-gradient(to top, #a855f7, #ec4899);
    border-radius: 2px;
    animation: eq-bounce 1.2s ease-in-out infinite alternate;
}

.music-eq-bar:nth-child(1) { height: 12px; animation-delay: 0.1s; }
.music-eq-bar:nth-child(2) { height: 22px; animation-delay: 0.3s; }
.music-eq-bar:nth-child(3) { height: 16px; animation-delay: 0.2s; }
.music-eq-bar:nth-child(4) { height: 26px; animation-delay: 0.4s; }
.music-eq-bar:nth-child(5) { height: 14px; animation-delay: 0.15s; }

@keyframes eq-bounce {
    0% { transform: scaleY(0.3); opacity: 0.5; }
    100% { transform: scaleY(1.2); opacity: 1; }
}

.btn-cross-listen {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.btn-cross-listen.spotify {
    background: rgba(29, 185, 84, 0.15);
    color: #1db954;
    border: 1px solid rgba(29, 185, 84, 0.35);
}
.btn-cross-listen.spotify:hover {
    background: #1db954;
    color: #000;
}

.btn-cross-listen.qobuz {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.35);
}
.btn-cross-listen.qobuz:hover {
    background: #eab308;
    color: #000;
}

/* ── Time-Locked Digital Letters ─────────────────────────────────────────── */
.letters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.letter-envelope {
    background: rgba(20, 12, 35, 0.7);
    backdrop-filter: blur(16px);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
}

.letter-envelope:hover {
    transform: translateY(-4px);
    border-color: rgba(236, 72, 153, 0.5);
    box-shadow: 0 12px 32px rgba(236, 72, 153, 0.25);
}

.letter-envelope.locked {
    background: rgba(15, 10, 25, 0.85);
    border-color: rgba(148, 163, 184, 0.2);
}

.wax-seal-stamp {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.wax-seal-stamp.pulsing {
    animation: seal-pulse 2s infinite alternate;
}

@keyframes seal-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(236, 72, 153, 0); }
    100% { transform: scale(1.06); box-shadow: 0 0 20px rgba(236, 72, 153, 0.6); }
}

.parchment-sheet {
    background: #fdfbf7;
    color: #2b1a1a;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    position: relative;
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
    font-family: 'Georgia', serif;
    line-height: 1.8;
}

.parchment-sheet::before {
    content: '';
    position: absolute;
    top: 8px; left: 8px; right: 8px; bottom: 8px;
    border: 1px solid rgba(139, 69, 19, 0.15);
    border-radius: 10px;
    pointer-events: none;
}

/* ─── Couple Card Game Timer Countdown Urgency States ─── */
.timer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.95rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.timer-badge.timer-green {
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    border: 1.5px solid #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.timer-badge.timer-amber {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.18);
    border: 1.5px solid #f59e0b;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
}

.timer-badge.timer-red-alert {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.25);
    border: 1.5px solid #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.7);
    animation: timer-pulse-alert 0.6s infinite alternate ease-in-out;
}

@keyframes timer-pulse-alert {
    0% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    }
    100% {
        transform: scale(1.08);
        box-shadow: 0 0 24px rgba(239, 68, 68, 0.95);
        background: rgba(239, 68, 68, 0.4);
    }
}

/* ── 💌 Time-Locked Digital Letters & Wax Seals ───────────────────────────── */
.letters-container {
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 4rem;
}

.letters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.envelope-card {
    position: relative;
    background: linear-gradient(145deg, rgba(30, 24, 45, 0.85), rgba(15, 12, 25, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 1.5rem;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.envelope-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6);
    border-color: rgba(236, 72, 153, 0.4);
}

.envelope-card.locked {
    background: linear-gradient(145deg, rgba(25, 20, 38, 0.9), rgba(12, 10, 20, 0.98));
    border: 1px dashed rgba(255, 255, 255, 0.18);
}

.envelope-card.opened {
    border-color: rgba(16, 185, 129, 0.35);
}

.envelope-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.wax-seal-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0,0,0,0.6), inset 0 2px 4px rgba(255,255,255,0.4);
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
    position: relative;
    user-select: none;
    transition: transform 0.2s ease;
}

.envelope-card:hover .wax-seal-badge {
    transform: scale(1.08) rotate(-4deg);
}

.wax-seal-selector {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.4rem;
}

.wax-seal-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 3px 8px rgba(0,0,0,0.4), inset 0 1px 2px rgba(255,255,255,0.3);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.wax-seal-btn:hover {
    transform: scale(1.15);
}

.wax-seal-btn.active {
    border-color: #ffffff;
    transform: scale(1.15);
    box-shadow: 0 0 14px rgba(255,255,255,0.6);
}

.letter-countdown-badge {
    display: inline-block;
    background: rgba(236, 72, 153, 0.15);
    border: 1px solid rgba(236, 72, 153, 0.35);
    color: #f472b6;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* Parchment Letter Modal Reader */
.parchment-paper {
    background: linear-gradient(180deg, #fdfbf7 0%, #f4eee1 100%);
    color: #2b1d0c;
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85);
    padding: 2.5rem 2rem;
    max-width: 650px;
    width: 92vw;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid #d4c5a9;
    font-family: 'Georgia', serif;
}

.parchment-paper h2 {
    font-family: 'Georgia', serif;
    color: #5c1d2e;
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
    text-align: center;
}

.parchment-paper .letter-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #3b2a1a;
    margin: 1.5rem 0;
    white-space: pre-wrap;
}

.parchment-paper .letter-signature {
    text-align: right;
    font-style: italic;
    font-size: 1.1rem;
    color: #78283a;
    margin-top: 1.5rem;
    border-top: 1px dashed rgba(120, 40, 58, 0.25);
    padding-top: 1rem;
}

/* ── 🎵 Cross-Platform Music Live Sync Bar (Qobuz ⇄ Spotify) ─────────────── */
.music-sync-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 1rem 1.4rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.music-partner-track {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 240px;
    flex: 1;
}

.music-album-art {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    background: #1e293b;
}

.music-platform-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.music-platform-badge.spotify {
    background: rgba(30, 215, 96, 0.18);
    color: #1ed760;
    border: 1px solid rgba(30, 215, 96, 0.35);
}

.music-platform-badge.qobuz {
    background: rgba(59, 130, 246, 0.18);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.music-convert-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
}

.music-convert-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}



