/* --- 1. Global Base & Font Imports --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=VT323&display=swap');

:root {
    /* Font Families */
    --font-minimal: 'Poppins', sans-serif;
    --font-y2k: 'VT323', monospace;
    /* Shared Colors */
    --like-color: #4CAF50;
    --nope-color: #f44336;
}

/* --- 2. Theme Palettes --- */
[data-theme="minimal-light"] { --font-primary: var(--font-minimal); --bg-main: #FFFFFF; --bg-sidebar-left: #F5F6F8; --bg-content: #FFFFFF; --bg-player-dark: #F5F6F8; --bg-player-card: #FFFFFF; --text-primary: #1E2033; --text-secondary: #8A8B95; --text-on-player: #1E2033; --text-player-muted: #8A8B95; --accent-primary: #6B8561; --accent-primary-faded: #eef2ff; --accent-secondary: #6B8561; --border-color: #EBEBEB; --container-radius: 20px; --card-radius: 15px; --button-radius: 10px; --shadow-main: 0 10px 40px rgba(0, 0, 0, 0.08); --shadow-card: none; --border-style: 1px solid var(--border-color); }
[data-theme="minimal-dark"] {  color: var(--text-primary); --font-primary: var(--font-minimal); --bg-main: #1F2128; --bg-sidebar-left: #282A36; --bg-content: #1F2128; --bg-player-dark: #1A1C23; --bg-player-card: #282A36; --text-primary: #F8F8F2; --text-secondary: #9CA3AF; --text-on-player: #F8F8F2; --text-player-muted: #A0A3B5; --accent-primary: #B0DB9C; --accent-primary-faded: rgba(130, 146, 255, 0.1); --accent-secondary: #B0DB9C; --border-color: #44475A; --container-radius: 20px; --card-radius: 15px; --button-radius: 8px; --shadow-main: 0 10px 40px rgba(0, 0, 0, 0.2); --shadow-card: 0 4px 15px rgba(0,0,0,0.1); --border-style: 1px solid var(--border-color); }
[data-theme="y2k-light"] {
    --font-primary: var(--font-y2k);
    --bg-main: #ECFAE5;          
    --bg-sidebar-left: #DDF6D2; 
    --bg-content: transparent;
    --bg-player-dark: #DDF6D2;
    --bg-player-card: #ECFAE5;
    --text-primary: #3A4F31;     
    --text-secondary: #6B8561;   
    --text-on-player: #3A4F31;
    --text-player-muted: #6B8561;
    --border-color: #3A4F31;
    --accent-primary: #B0DB9C;   
    --accent-primary-faded: rgba(176, 219, 156, 0.2); 
    --accent-secondary: #CAE8BD; 
    --container-radius: 0;
    --card-radius: 0;
    --button-radius: 0;
    --shadow-main: 5px 5px 0 0 var(--border-color);
    --shadow-card: 3px 3px 0 0 var(--border-color);
    --border-style: 2px solid var(--border-color);
}

[data-theme="y2k-dark"] {
    color: var(--text-primary);
    --font-primary: var(--font-y2k);
    --bg-main: #253320;
    --bg-sidebar-left: #31422A;
    --bg-content: transparent;
    --bg-player-dark: #31422A;
    --bg-player-card: #253320;
    --text-primary: #ECFAE5;
    --text-secondary: #CAE8BD;
    --text-on-player: #ECFAE5;
    --text-player-muted: #CAE8BD;
    --border-color: #ECFAE5;
    --accent-primary: #B0DB9C;
    --accent-primary-faded: rgba(176, 219, 156, 0.15);
    --accent-secondary: #DDF6D2;
    --container-radius: 0;
    --card-radius: 0;
    --button-radius: 0;
    --shadow-main: 5px 5px 0 0 var(--border-color);
    --shadow-card: 3px 3px 0 0 var(--border-color);
    --border-style: 2px solid var(--border-color);
}
/* --- 3. Body & App Shell --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { overflow-y: hidden;overflow-x: hidden;font-family: var(--font-primary); display: flex; justify-content: center; align-items: center; min-height: 100vh; user-select: none; transition: background-color 0.3s ease; background-color: #E0E4F0; }
.app-container {    width: 90vw; max-width: 1440px; height: 90vh; max-height: 850px; background-color: var(--bg-main); border-radius: var(--container-radius); box-shadow: var(--shadow-main); display: grid; grid-template-columns: 260px 1fr 360px; overflow: hidden; border: var(--border-style); transition: all 0.3s ease; }

/* --- 4. Layout Sections (Sidebars, Main) --- */
.sidebar-left { background-color: var(--bg-sidebar-left); display: flex; flex-direction: column; padding: 25px 20px; border-right: var(--border-style); overflow-y: auto; }
.sidebar-footer { margin-top: auto; padding-top: 20px; }
.main-content { display: flex; flex-direction: column; overflow: hidden; background-color: var(--bg-content); position: relative; }
.sidebar-right { background-color: var(--bg-player-dark); display: flex; flex-direction: column; padding: 25px 20px; gap: 20px; border-left: var(--border-style); overflow-y: auto; min-height: 0;}

/* --- 5. Reusable Components --- */
/* Left Sidebar */
.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 30px; letter-spacing: 1px; flex-shrink: 0; }
.nav-section { margin-bottom: 25px; }
.nav-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 15px; }
.nav-list { list-style: none; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 5px; font-size: 16px; font-weight: 500; color: var(--text-secondary); cursor: pointer; border-radius: var(--button-radius); transition: all 0.2s ease; }
.nav-item:hover { color: var(--accent-primary); background-color: var(--accent-primary-faded); }
.nav-item.active { color: var(--accent-primary); font-weight: 700; background-color: var(--accent-primary-faded); }
.nav-item svg { width: 20px; height: 20px; stroke-width: 2.5; }

/* Theme Switcher & Disclaimer */
.theme-switcher { display: flex; flex-wrap: wrap; gap: 8px; }
.theme-switcher button { font-family: var(--font-primary); font-size: 14px; padding: 5px 10px; border: var(--border-style); background-color: transparent; color: var(--text-secondary); cursor: pointer; border-radius: var(--button-radius); transition: all 0.2s; }
.theme-switcher button:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.theme-switcher button.active { background-color: var(--accent-primary); color: var(--bg-main); border-color: var(--accent-primary); }
.storage-disclaimer { margin-top: 20px; }
.notice-box { background: var(--bg-content); padding: 15px; border-radius: var(--card-radius); text-align: center; border: var(--border-style); }
[data-theme="minimal-light"] .notice-box { background: #fff; }
.notice-box h4 { margin-bottom: 5px; color: var(--text-primary); font-size: 14px; font-weight: 600; }
.notice-box p { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }

/* Music Player (Right Sidebar) */
.player-one-profile { display: flex; align-items: center; gap: 15px; flex-shrink: 0; }
.p1-avatar { width: 50px; height: 50px; background: var(--accent-primary); border-radius: 50%; display: grid; place-items: center; font-size: 20px; font-weight: 700; color: var(--bg-main); overflow: hidden; }
.p1-avatar img { width: 100%; height: 100%; object-fit: cover; }
.p1-info h4 { color: var(--text-on-player); font-size: 18px; font-weight: 600; }
.p1-info a { color: var(--text-player-muted); font-size: 14px; text-decoration: none; }
.player-one-card { background-color: var(--bg-player-card); border-radius: var(--card-radius); padding: 25px; text-align: center; border: var(--border-style); flex-shrink: 0; }
.p1-artwork { width: 200px; height: 200px; margin: 0 auto 20px auto; position: relative; }
.vinyl-container { width: 100%; height: 100%; }
.artwork-disc { width: 100%; height: 100%; border-radius: 50%; background-color: #111; background-image: repeating-radial-gradient(circle at center,rgba(255,255,255,0.03) 0,rgba(255,255,255,0.03) 1px,transparent 1px,transparent 3px); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,0.2); animation: spin 4s linear infinite; animation-play-state: paused; }
.artwork-disc.spinning { animation-play-state: running; }
.artwork-disc img { width: 60%; height: 60%; object-fit: cover; border-radius: 50%; border: 8px solid #1a1a1a; box-shadow: inset 0 0 10px rgba(0,0,0,0.5); }
.artwork-disc::after { content: ''; position: absolute; width: 25px; height: 25px; background: var(--bg-player-card); border-radius: 50%; border: 3px solid #333; }
.player-one-card h3 { font-size: 24px; font-weight: 600; color: var(--text-on-player); margin-bottom: 5px; }
.player-one-card p { font-size: 16px; color: var(--text-player-muted); margin-bottom: 25px; }
.p1-controls { display: flex; justify-content: center; align-items: center; gap: 25px; color: var(--text-player-muted); }
.p1-controls i:hover { color: var(--text-on-player); }
.p1-play-button { width: 60px; height: 60px; background: var(--text-on-player); color: var(--bg-player-dark); border-radius: 50%; display: grid; place-items: center; cursor: pointer; transition: transform 0.2s; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.p1-play-button:hover { transform: scale(1.05); }
.p1-play-button svg { width: 28px; height: 28px; }

/* Song List Accordion */
.songs-accordion { background-color: var(--bg-player-card); border-radius: var(--card-radius); border: var(--border-style); }
.accordion-header { display: flex; justify-content: space-between; align-items: center; padding: 15px; cursor: pointer; flex-shrink: 0; }
.accordion-header div { display: flex; align-items: center; gap: 15px; }
.accordion-header span { font-size: 16px; font-weight: 600; color: var(--text-on-player); }
.accordion-header .stat-count { background-color: var(--bg-player-dark); padding: 2px 10px; border-radius: 20px; font-size: 14px; color: var(--text-player-muted); }
.accordion-header .chevron { transition: transform 0.3s ease; }
.accordion-header .chevron.open { transform: rotate(180deg); }
.accordion-content { max-height: 0; overflow-y: auto; transition: max-height 0.3s ease-out; background-color: var(--bg-player-dark); border-bottom-left-radius: var(--card-radius); border-bottom-right-radius: var(--card-radius); }
.accordion-content.open { max-height: 200px; }
.accordion-song-item { display: flex; align-items: center; gap: 12px; padding: 12px 15px; cursor: pointer; border-bottom: 1px solid var(--border-color); }
.accordion-song-item:last-child { border-bottom: none; }
.accordion-song-item:hover { background-color: rgba(255, 255, 255, 0.03); }
.accordion-song-item.playing { background-color: var(--accent-primary); }
.accordion-song-item.playing .song-title, .accordion-song-item.playing .song-artist { color: var(--bg-main); }
.accordion-song-item img { width: 40px; height: 40px; border-radius: var(--button-radius); object-fit: cover; }
.song-title { font-size: 14px; font-weight: 500; color: var(--text-on-player); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-artist { font-size: 12px; color: var(--text-player-muted); }

/* --- 6. Screen-Specific & Page Styles --- */
/* Universal containers */
.page-container { width: 100%; height: 100%; padding: 30px; display: flex; flex-direction: column; overflow-y: auto; }
.screen-container { display: flex; width: 100%; flex-grow: 1; flex-direction: column; overflow: hidden; }

/* Main Discover Card */
.main-content-area { flex-grow: 1; display: flex; justify-content: center; align-items: center; position: relative; padding: 30px; }
.husbando-card { width: 380px; height: 520px; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--card-radius); box-shadow: var(--shadow-card); border: var(--border-style); cursor: grab; background-color: var(--bg-main); position: absolute; }
/* --- NEW STYLES for Button-based Matching Card --- */

/* Add a transition to the main card for the exit animation */
.husbando-card {
    transition: transform 0.3s ease-in, opacity 0.3s ease-in;
}

/* Animation classes */
.husbando-card.exiting-right {
    transform: translateX(150%) rotate(15deg) !important;
    opacity: 0;
}
.husbando-card.exiting-left {
    transform: translateX(-150%) rotate(-15deg) !important;
    opacity: 0;
}

/* Container for the new buttons */
.card-actions {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 20px 20px 20px;
    background: var(--bg-main);
    border-top: var(--border-style);
}

/* Style for the individual buttons */
.action-button {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: var(--border-style);
    background-color: var(--bg-main);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.action-button svg {
    width: 32px;
    height: 32px;
}

/* Specific colors for Skip and Sync buttons */
.action-button.skip {
    color: var(--nope-color);
}
.action-button.sync {
    color: var(--like-color);
}

[data-theme*="y2k"] .action-button {
    border-radius: 0;
}
.swipe-overlay { position: absolute; top: 40px; font-size: 36px; font-weight: 700; letter-spacing: 2px; border: 4px solid; padding: 8px 20px; text-transform: uppercase; opacity: 0; transition: opacity 0.2s ease; pointer-events: none; z-index: 5; }
.swipe-overlay.like { color: var(--like-color); border-color: var(--like-color); left: 20px; transform: rotate(-15deg); }
.swipe-overlay.nope { color: var(--nope-color); border-color: var(--nope-color); right: 20px; transform: rotate(15deg); }
.swipe-overlay.visible { opacity: 0.8; }
.card-image { width: 100%; height: 100%; background-size: cover; background-position: center top; pointer-events: none; flex-grow: 1; }
.card-info { padding: 20px; text-align: left; background: var(--bg-main); border-top: var(--border-style); }
.card-info h2 { font-size: 24px; color: var(--text-primary); font-weight: 600; }
.card-info p { font-size: 16px; color: var(--text-secondary); }

/* Generic Page Headers */
.page-header { margin-bottom: 30px; }
.page-header h1 { font-size: 32px; color: var(--text-primary); font-weight: 700; }
.page-header p { color: var(--text-secondary); font-size: 16px; margin-top: 5px; }

/* Fixed Form Layout */
.profile-form { display: flex; flex-direction: column; gap: 20px; max-width: 500px;}
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-weight: 600; font-size: 14px; color: var(--text-secondary); }
.profile-form input[type="text"] { width: 100%; padding: 12px; border: var(--border-style); border-radius: var(--button-radius); font-size: 16px; background-color: var(--bg-main); color: var(--text-primary); font-family: var(--font-primary); }
.action-btn { font-family: var(--font-primary); font-weight: 600; padding: 12px 24px; cursor: pointer; border: none; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s; }
.profile-form .action-btn { align-self: flex-start; }

/* Chat Screen */
.chat-header { padding: 10px 20px; display: flex; align-items: center; gap: 15px; border-bottom: var(--border-style); background-color: var(--bg-sidebar-left); flex-shrink: 0; position: relative; }
.chat-header .nav-item { margin: 0; padding: 8px; background: none; }
.chat-header img { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; }
.chat-header h4 { font-size: 18px; font-weight: 600; color: var(--text-primary); }
.message-list { flex-grow: 1; min-height: 0; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.message-bubble { display: flex; max-width: 75%; }
.message-content { padding: 12px 18px; border-radius: 20px; line-height: 1.5; font-size: 15px; }
.message-bubble.user { align-self: flex-end; }
.message-bubble.user .message-content { background-color: var(--accent-primary); color: #fff; border-bottom-right-radius: 5px; }
.message-bubble.companion { align-self: flex-start; }
.message-bubble.companion .message-content { background-color: var(--bg-sidebar-left); border-bottom-left-radius: 5px; color: var(--text-primary); }
.message-bubble.typing .message-content { animation: typing-bounce 1s ease-in-out infinite; }
.chat-input-area { padding: 15px 20px; border-top: var(--border-style); background-color: var(--bg-sidebar-left); flex-shrink: 0; }
.chat-input-form { display: flex; gap: 10px; }
.chat-input-form input { flex-grow: 1; padding: 12px; border: var(--border-style); border-radius: var(--button-radius); font-size: 16px; background: var(--bg-main); color: var(--text-primary); }
.chat-input-form button { padding: 0 25px; background-color: var(--accent-secondary); color: #fff; border: none; border-radius: var(--button-radius); cursor: pointer; font-size: 16px; font-weight: 600; }

/* Other Pages (Matches, Chats List etc) */
.matches-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.match-card { overflow: hidden; border-radius: var(--card-radius); border: var(--border-style); box-shadow: var(--shadow-card); cursor: pointer; transition: transform 0.2s; background-color: var(--bg-main); }
.match-card:hover { transform: translateY(-5px); }
.match-card img { width: 100%; height: 220px; object-fit: cover; }
.match-card-info { padding: 15px; }
.chat-list-container { display: flex; flex-direction: column; gap: 10px; }
.chat-list-item { display: flex; align-items: center; gap: 15px; padding: 15px; border-radius: var(--card-radius); border: var(--border-style); cursor: pointer; transition: background-color 0.2s; background-color: var(--bg-main); }
.chat-list-item:hover { background-color: var(--accent-primary-faded); }
.chat-list-item img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.chat-list-info h4 { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.chat-list-info p { font-size: 14px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 400px; }
.chat-list-info {
    flex: 1; 
    min-width: 0; 
}

/* Profile & Playlist Screen specific styles */
.profile-container { display: flex; flex-direction: column; gap: 20px; }
.profile-header { display: flex; gap: 25px; align-items: flex-start; }
.profile-main-image { width: 120px; height: 160px; object-fit: cover; flex-shrink: 0; border: var(--border-style); }
.profile-section { padding-top: 20px; border-top: var(--border-style); }
.screen-header { text-align: center; flex-shrink: 0; padding-bottom: 20px; }
.screen-header img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-bottom: 15px; }
.song-list { flex-grow: 1; overflow-y: auto; padding: 15px 0; }
.song-item { display: flex; justify-content: space-between; align-items: center; padding: 15px; }
.listen-btn { font-family: var(--font-primary); font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: var(--button-radius); border: 1px solid var(--accent-primary); background: transparent; color: var(--accent-primary); cursor: pointer; }
.listen-btn.played { background: var(--accent-primary); color: #fff; }
.chat-prompt { padding-top: 25px; border-top: var(--border-style); margin-top: auto; flex-shrink: 0; }
.modal-backdrop { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(30, 32, 51, 0.7); display: flex; justify-content: center; align-items: center; z-index: 1000; backdrop-filter: blur(5px); }
.modal-content { padding: 30px; width: 90%; max-width: 500px; background: var(--bg-main); border-radius: var(--card-radius); border: var(--border-style); box-shadow: var(--shadow-main); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 10px; border-bottom: var(--border-style); }

/* --- 7. Y2K Theme Adjustments --- */
[data-theme="y2k"] .main-content-area {padding: 0px;}
[data-theme="y2k-light"]  .profile-main-image {margin-top: 90px; margin-left: 20px;}
[data-theme="y2k-dark"]  .profile-main-image {margin-top: 90px; margin-left: 20px;}

[data-theme="y2k-light"], [data-theme="y2k-dark"] {
    .main-content-area {
        padding: 0;
    }
}

[data-theme="y2k-light"], [data-theme="y2k-dark"] {
    .profile-section {
        margin: 20px;
    }
}

[data-theme="y2k-light"] body { 
    background-color: #ECFAE5; 
    background-image: linear-gradient(rgba(221, 246, 210, 0.7) 1px, transparent 1px), linear-gradient(to right, rgba(221, 246, 210, 0.7) 1px, #ECFAE5 1px); 
    background-size: 20px 20px; 
}
[data-theme="y2k-dark"] body { 
    background-color: #253320;
    background-image: linear-gradient(rgba(49, 66, 42, 0.8) 1px, transparent 1px), linear-gradient(to right, rgba(49, 66, 42, 0.8) 1px, #253320 1px); 
    background-size: 20px 20px; 
}

[data-theme*="y2k"] .logo { font-size: 28px; }
[data-theme*="y2k"] .nav-title { font-size: 18px; font-weight: normal; }
[data-theme*="y2k"] .nav-item { font-size: 22px; font-weight: normal; }
[data-theme*="y2k"] .nav-item.active { font-weight: normal; border: var(--border-style); box-shadow: var(--shadow-card); }
[data-theme*="y2k"] .theme-switcher button { font-size: 18px; }
[data-theme*="y2k"] .notice-box { font-size: 18px; }
[data-theme*="y2k"] .notice-box h4 { font-size: 16px; font-weight: normal; }
[data-theme*="y2k"] .notice-box p { font-size: 14px; }
[data-theme*="y2k"] .p1-avatar { border-radius: 0; border: var(--border-style); }
[data-theme*="y2k"] .p1-info h4 { font-size: 24px; font-weight: normal; }
[data-theme*="y2k"] .artwork-disc { border: var(--border-style); }
[data-theme*="y2k"] .player-one-card h3 { font-size: 32px; font-weight: normal; }
[data-theme*="y2k"] .player-one-card p { font-size: 22px; }
[data-theme*="y2k"] .p1-play-button { border-radius: 0; border: var(--border-style); box-shadow: var(--shadow-card); }
[data-theme*="y2k"] .accordion-header span { font-size: 22px; font-weight: normal; }
[data-theme*="y2k"] .accordion-song-item img { border-radius: 0; }
[data-theme*="y2k"] .song-title { font-size: 18px; }
[data-theme*="y2k"] .song-artist { font-size: 16px; }
[data-theme*="y2k"] .swipe-overlay { font-size: 44px; }
[data-theme*="y2k"] .card-info h2 { font-size: 32px; font-weight: normal; }
[data-theme*="y2k"] .card-info p { font-size: 22px; }
[data-theme*="y2k"] .page-header h1 { font-size: 42px; font-weight: normal; text-transform: uppercase; }
[data-theme*="y2k"] .page-header p { font-size: 22px; }
[data-theme*="y2k"] .profile-form, [data-theme*="y2k"] .page-header { padding: 50px;}
[data-theme*="y2k"].screen-container { padding: 0; background: var(--bg-main); border: var(--border-style); box-shadow: var(--shadow-card); position: relative; overflow: hidden; display: flex; flex-direction: column; }
[data-theme*="y2k"] .page-container {
    padding: 0;
    background: var(--bg-main);
   
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%; /* Make it fill the parent */
    width: 100%; /* Make it fill the parent */
}
[data-theme*="y2k"] .page-container::before,
[data-theme*="y2k"] .screen-container::before { content: ''; display: block; height: 25px; background-color: var(--accent-primary); border-bottom: var(--border-style); flex-shrink: 0; }
.y2k-content-wrapper {  flex-grow: 1; overflow-y: auto; position: relative; }
[data-theme*="y2k"] .y2k-content-wrapper > .nav-item { position: absolute; top: 20px; left: 20px; z-index: 2; background: var(--bg-main); box-shadow: var(--shadow-card); }
[data-theme*="y2k"] .y2k-content-wrapper > .nav-item:hover { background-color: var(--accent-primary-faded); }
[data-theme*="y2k"] .profile-details h1 { font-size: 40px; }
[data-theme*="y2k"] .profile-details h3 { font-size: 24px; }
[data-theme*="y2k"] .profile-details p { font-size: 20px; }
[data-theme*="y2k"] .profile-section h4 { font-size: 20px; text-transform: none; background-color: var(--accent-secondary); color: var(--bg-main); padding: 2px 8px; display: inline-block; }
[data-theme*="y2k"] .profile-quote, [data-theme*="y2k"] .profile-diary-entry { font-size: 20px; }
[data-theme*="y2k"] .chat-header { padding-top: 10px; padding-bottom: 10px; }
[data-theme*="y2k"] .chat-header img { border-radius: 0; }
[data-theme*="y2k"] .message-content { border-radius: 0; border: var(--border-style); font-size: 20px; }
[data-theme="y2k-light"] .message-bubble.user .message-content { color: var(--bg-main); }
[data-theme*="y2k"] .chat-input-form input { font-size: 20px; }
[data-theme*="y2k"] .chat-input-form button { font-size: 20px; font-weight: normal; border: var(--border-style); }
[data-theme="y2k-light"] .chat-input-form button { color: var(--bg-main); }
[data-theme*="y2k"] .chat-list-item img { border-radius: 0; }
[data-theme*="y2k"] .chat-list-item { border-right: 0; border-left: 0; }
[data-theme*="y2k"] .modal-header h2 { font-size: 28px; }
[data-theme*="y2k"] .modal-body p, [data-theme*="y2k"] .modal-body li { font-size: 20px; }
[data-theme*="y2k"] .action-btn { font-size: 20px; font-weight: normal; background-color: var(--accent-primary); color: var(--bg-main); border: var(--border-style); border-radius: 0; }
[data-theme*="y2k"] .action-btn:hover { background-color: var(--accent-secondary); }
[data-theme*="y2k"] .matches-grid { padding: 0px 50px 50px 50px;}

/* --- 8. Animations --- */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes typing-bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1.0); } }


/* --- 9. Mobile-Specific Components (Header, Backdrop) --- */
.mobile-header { display: none; } /* Hidden by default */
.mobile-menu-backdrop { display: none; } /* Hidden by default */


/* --- 10. SCROLLBAR STYLES --- */

/* This sets the basic width and background for all themes. */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

/* This is the "track" - the part the scrollbar slides along. */
::-webkit-scrollbar-track {
    background-color: transparent; /* Makes the track invisible by default */
}

/* This is the "thumb" - the draggable part of the scrollbar. */
::-webkit-scrollbar-thumb {
    border: 3px solid transparent; /* Creates padding around the thumb */
    background-clip: padding-box;  /* Ensures the border is outside the thumb's color */
    border-radius: 100px;         /* Makes the thumb rounded */
    transition: background-color 0.3s ease;
}

/* --- THEME-SPECIFIC COLORS --- */

/* 1. Minimal Light Theme */
[data-theme="minimal-light"] ::-webkit-scrollbar-track {
    background-color: #F5F6F8; /* A light grey matching the sidebar */
}
[data-theme="minimal-light"] ::-webkit-scrollbar-thumb {
    background-color: #C5C6D0; /* A soft, darker grey for the thumb */
}
[data-theme="minimal-light"] ::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-primary); /* Uses the theme's accent color on hover */
}

/* 2. Minimal Dark Theme */
[data-theme="minimal-dark"] ::-webkit-scrollbar-track {
    background-color: #1F2128; /* A dark color matching the main background */
}
[data-theme="minimal-dark"] ::-webkit-scrollbar-thumb {
    background-color: #44475A; /* A lighter dark color for the thumb */
}
[data-theme="minimal-dark"] ::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-primary); /* Uses the theme's accent color on hover */
}

/* 3. Y2K Light (Sweet Melon) Theme */
[data-theme="y2k-light"] ::-webkit-scrollbar-track {
    background-color: #DDF6D2; /* A light melon green from your palette */
}
[data-theme="y2k-light"] ::-webkit-scrollbar-thumb {
    border: 2px solid var(--bg-main); /* Match the Y2K border style */
    border-radius: 0;                 /* Y2K style has sharp edges */
    background-color: #B0DB9C;        /* The vibrant melon green accent */
}

/* 4. Y2K Dark (Sweet Melon) Theme */
[data-theme="y2k-dark"] ::-webkit-scrollbar-track {
    background-color: #31422A; /* A dark forest green from your palette */
}
[data-theme="y2k-dark"] ::-webkit-scrollbar-thumb {
    border: 2px solid var(--bg-main); /* Match the Y2K border style */
    border-radius: 0;                 /* Y2K style has sharp edges */
    background-color: #B0DB9C;        /* The vibrant melon green accent contrasts nicely */
}



/* --- HIDE MOBILE-ONLY ELEMENTS BY DEFAULT --- */
.bottom-nav-bar {
    display: none;
}

/*
=====================================================
---    RESPONSIVE TABLET & MOBILE    ---
=====================================================
*/


@media (max-width: 1024px) {
    /* --- CORE LAYOUT & BODY --- */
    body {
        display: block;
        align-items: initial;
        justify-content: initial;
        padding: 0;
    }

    .app-container {
        width: 100vw;
        height: 100vh;
        grid-template-columns: 1fr;
        max-height: none;
        border-radius: 0;
        border: none;
        overflow: hidden;
        /* Add padding to the bottom to NOT hide content behind the nav bar */
        padding-bottom: 75px;
    }
    
    main.main-content { 
        height: 100%; 
        overflow-y: auto;
    }

    .screen-container {
        height: 100vh;
        padding-bottom: 0;
    }

    /* --- FLOATING SIDEBAR MENUS (for Menu/Player) --- */
    .mobile-menu-backdrop {
        display: block; position: fixed; top: 0; left: 0;
        width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5);
        z-index: 1020; backdrop-filter: blur(2px);
    }

    .sidebar-left, .sidebar-right {
        position: fixed; top: 0; height: 100vh; width: 280px;
        max-width: 80%; z-index: 1030; box-shadow: 0 0 30px rgba(0,0,0,0.2);
        transition: transform 0.3s ease-in-out; border: none; display: flex;
    }
    .sidebar-left { left: 0; transform: translateX(-100%); }
    .sidebar-left.is-open { transform: translateX(0); }
    .sidebar-right { right: 0; transform: translateX(100%); }
    .sidebar-right.is-open { transform: translateX(0); }

    /* --- BOTTOM NAVIGATION BAR STYLES --- */
    .bottom-nav-bar {
        /* This overrides the 'display: none' from the global scope */
        display: flex; 
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 75px;
        background: var(--bg-main);
        border-top: var(--border-style);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
        z-index: 1000;
        padding: 0 10px;
    }

    
    .nav-bar-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--text-secondary);
        font-family: var(--font-minimal);
        font-size: 12px;
        font-weight: 500;
        transition: color 0.2s ease;
    }

    .nav-bar-item:hover {
        color: var(--text-primary);
    }

    .nav-bar-item.active {
        color: var(--accent-primary);
    }

    .nav-bar-item svg {
        width: 24px;
        height: 24px;
        stroke-width: 2;
    }
    .nav-bar-item.active svg {
        stroke-width: 2.5;
    }
}
