/* Theme Variables - Default: Original (neutral gray/blue) */
:root {
    --bg-body: #f5f5f5;
    --bg-container: white;
    --bg-container-solid: white;
    --bg-input: white;
    --bg-hover: #f5f5f5;
    --bg-active: #e8f4f8;
    --chat-bg: url('../images/chat-wallpaper-light.svg');

    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;

    --border-main: #e0e0e0;
    --border-light: #f0f0f0;
    --border-dark: #333;

    --message-bubble: #9dd0e1;
    --accent-blue: #007bff;
    --accent-blue-hover: #0056b3;
    --accent-green: #4CAF50;
    --accent-red: #dc3545;

    --shadow: rgba(0, 0, 0, 0.1);
    --overlay: rgba(0, 0, 0, 0.5);

    --gift-popup-background: white;
}

[data-theme="dark"] {
    --bg-body: #1a1a1a;
    --bg-container: #2a2a2a;
    --bg-container-solid: #2a2a2a;
    --bg-input: #333;
    --bg-hover: #3a3a3a;
    --bg-active: #3a4a50;
    --chat-bg: url('../images/chat-wallpaper-dark.svg');

    --text-primary: #f0f0f0;
    --text-secondary: #b0b0b0;
    --text-muted: #888;

    --border-main: #444;
    --border-light: #3a3a3a;
    --border-dark: #666;

    --message-bubble: #63b4cf;
    --accent-blue: #4a9eff;
    --accent-blue-hover: #6ab0ff;
    --accent-green: #5dbb63;
    --accent-red: #ff6b7a;

    --shadow: rgba(0, 0, 0, 0.3);
    --overlay: rgba(0, 0, 0, 0.7);

    --gift-popup-background: #2a2a2a;
}

/* ===========================================
   COLOR PALETTE SWITCHER
   Palette 0: Original (default above)
   Palette 1: Steel Blue & Purple
   Palette 2: Sunset Warmth
   Palette 3: Natural Green & Violet
   Palette 4: Barbie Pink
   Palette 5: Soft Greens & Lavender
   Palette 6: Jewel Tones
   Palette 7: Sunset Gradient
   =========================================== */

/* Palette 0: Original - uses default :root values */

/* Palette 1: Steel Blue & Purple */
[data-palette="1"] {
    --bg-body: #f0f4f7;
    --bg-container: white;
    --bg-container-solid: white;
    --bg-input: white;
    --bg-hover: rgba(124, 158, 178, 0.1);
    --bg-active: rgba(82, 82, 140, 0.12);
    --text-primary: #231123;
    --text-secondary: #372554;
    --text-muted: #52528c;
    --border-main: rgba(124, 158, 178, 0.3);
    --border-light: rgba(124, 158, 178, 0.15);
    --border-dark: #52528c;
    --message-bubble: #7c9eb2;
    --accent-blue: #52528c;
    --accent-blue-hover: #372554;
    --accent-green: #4CAF50;
    --accent-red: #dc3545;
    --shadow: rgba(35, 17, 35, 0.12);
    --overlay: rgba(35, 17, 35, 0.6);
    --gift-popup-background: white;
}

[data-palette="1"][data-theme="dark"] {
    --bg-body: #231123;
    --bg-container: rgba(55, 37, 84, 0.5);
    --bg-container-solid: rgb(55, 37, 84);
    --bg-input: rgba(82, 82, 140, 0.3);
    --bg-hover: rgba(82, 82, 140, 0.4);
    --bg-active: rgba(124, 158, 178, 0.2);
    --text-primary: #f0f4f7;
    --text-secondary: #7c9eb2;
    --text-muted: #52528c;
    --border-main: rgba(82, 82, 140, 0.5);
    --border-light: rgba(55, 37, 84, 0.5);
    --border-dark: #7c9eb2;
    --message-bubble: #52528c;
    --accent-blue: #7c9eb2;
    --accent-blue-hover: #52528c;
    --accent-green: #5dbb63;
    --accent-red: #ff6b7a;
    --shadow: rgba(0, 0, 0, 0.4);
    --overlay: rgba(35, 17, 35, 0.85);
    --gift-popup-background: rgba(55, 37, 84, 0.95);
}

/* Palette 2: Sunset Warmth */
[data-palette="2"] {
    --bg-body: #fefdf5;
    --bg-container: white;
    --bg-container-solid: white;
    --bg-input: white;
    --bg-hover: rgba(237, 211, 130, 0.2);
    --bg-active: rgba(252, 158, 79, 0.15);
    --text-primary: #020122;
    --text-secondary: #f4442e;
    --text-muted: #fc9e4f;
    --border-main: rgba(237, 211, 130, 0.4);
    --border-light: rgba(242, 243, 174, 0.5);
    --border-dark: #f4442e;
    --message-bubble: #fc9e4f;
    --accent-blue: #f4442e;
    --accent-blue-hover: #d63a27;
    --accent-green: #4CAF50;
    --accent-red: #f4442e;
    --shadow: rgba(2, 1, 34, 0.12);
    --overlay: rgba(2, 1, 34, 0.6);
    --gift-popup-background: white;
}

[data-palette="2"][data-theme="dark"] {
    --bg-body: #020122;
    --bg-container: rgba(244, 68, 46, 0.15);
    --bg-container-solid: rgb(244, 68, 46);
    --bg-input: rgba(252, 158, 79, 0.15);
    --bg-hover: rgba(252, 158, 79, 0.25);
    --bg-active: rgba(244, 68, 46, 0.2);
    --text-primary: #f2f3ae;
    --text-secondary: #fc9e4f;
    --text-muted: #edd382;
    --border-main: rgba(252, 158, 79, 0.4);
    --border-light: rgba(244, 68, 46, 0.3);
    --border-dark: #fc9e4f;
    --message-bubble: #f4442e;
    --accent-blue: #fc9e4f;
    --accent-blue-hover: #f4442e;
    --accent-green: #5dbb63;
    --accent-red: #f4442e;
    --shadow: rgba(0, 0, 0, 0.5);
    --overlay: rgba(2, 1, 34, 0.85);
    --gift-popup-background: rgba(244, 68, 46, 0.9);
}

/* Palette 3: Natural Green & Violet */
[data-palette="3"] {
    --bg-body: #f5fcf4;
    --bg-container: white;
    --bg-container-solid: white;
    --bg-input: white;
    --bg-hover: rgba(182, 204, 161, 0.2);
    --bg-active: rgba(182, 143, 64, 0.15);
    --text-primary: #30011e;
    --text-secondary: #545454;
    --text-muted: #b68f40;
    --border-main: rgba(182, 204, 161, 0.4);
    --border-light: rgba(215, 252, 212, 0.5);
    --border-dark: #545454;
    --message-bubble: #b6cca1;
    --accent-blue: #b68f40;
    --accent-blue-hover: #9a7a36;
    --accent-green: #4CAF50;
    --accent-red: #dc3545;
    --shadow: rgba(48, 1, 30, 0.12);
    --overlay: rgba(48, 1, 30, 0.6);
    --gift-popup-background: white;
}

[data-palette="3"][data-theme="dark"] {
    --bg-body: #30011e;
    --bg-container: rgba(84, 84, 84, 0.3);
    --bg-container-solid: rgb(84, 84, 84);
    --bg-input: rgba(182, 143, 64, 0.2);
    --bg-hover: rgba(182, 204, 161, 0.15);
    --bg-active: rgba(182, 143, 64, 0.25);
    --text-primary: #d7fcd4;
    --text-secondary: #b6cca1;
    --text-muted: #b68f40;
    --border-main: rgba(182, 204, 161, 0.3);
    --border-light: rgba(84, 84, 84, 0.4);
    --border-dark: #b6cca1;
    --message-bubble: #b68f40;
    --accent-blue: #b6cca1;
    --accent-blue-hover: #b68f40;
    --accent-green: #5dbb63;
    --accent-red: #ff6b7a;
    --shadow: rgba(0, 0, 0, 0.5);
    --overlay: rgba(48, 1, 30, 0.85);
    --gift-popup-background: rgba(84, 84, 84, 0.95);
}

/* Palette 4: Barbie Pink */
[data-palette="4"] {
    --bg-body: #fff5fa;
    --bg-container: white;
    --bg-container-solid: white;
    --bg-input: white;
    --bg-hover: rgba(250, 25, 139, 0.08);
    --bg-active: rgba(185, 19, 114, 0.12);
    --text-primary: #0e0004;
    --text-secondary: #b91372;
    --text-muted: #6b0f1a;
    --border-main: rgba(250, 25, 139, 0.25);
    --border-light: rgba(250, 25, 139, 0.1);
    --border-dark: #b91372;
    --message-bubble: #fa198b;
    --accent-blue: #b91372;
    --accent-blue-hover: #31081f;
    --accent-green: #4CAF50;
    --accent-red: #6b0f1a;
    --shadow: rgba(14, 0, 4, 0.12);
    --overlay: rgba(14, 0, 4, 0.6);
    --gift-popup-background: white;
}

[data-palette="4"][data-theme="dark"] {
    --bg-body: #0e0004;
    --bg-container: rgba(49, 8, 31, 0.8);
    --bg-container-solid: rgb(49, 8, 31);
    --bg-input: rgba(107, 15, 26, 0.4);
    --bg-hover: rgba(185, 19, 114, 0.3);
    --bg-active: rgba(250, 25, 139, 0.2);
    --text-primary: #ffcce6;
    --text-secondary: #fa198b;
    --text-muted: #b91372;
    --border-main: rgba(185, 19, 114, 0.5);
    --border-light: rgba(107, 15, 26, 0.5);
    --border-dark: #fa198b;
    --message-bubble: #b91372;
    --accent-blue: #fa198b;
    --accent-blue-hover: #b91372;
    --accent-green: #5dbb63;
    --accent-red: #fa198b;
    --shadow: rgba(0, 0, 0, 0.6);
    --overlay: rgba(14, 0, 4, 0.85);
    --gift-popup-background: rgba(49, 8, 31, 0.95);
}

/* Palette 5: Soft Greens & Lavender */
[data-palette="5"] {
    --bg-body: #f5faf0;
    --bg-container: white;
    --bg-container-solid: white;
    --bg-input: white;
    --bg-hover: rgba(186, 210, 159, 0.2);
    --bg-active: rgba(128, 138, 159, 0.15);
    --text-primary: #3d2b56;
    --text-secondary: #2c497f;
    --text-muted: #808a9f;
    --border-main: rgba(186, 210, 159, 0.4);
    --border-light: rgba(204, 245, 172, 0.4);
    --border-dark: #2c497f;
    --message-bubble: #bad29f;
    --accent-blue: #2c497f;
    --accent-blue-hover: #3d2b56;
    --accent-green: #4CAF50;
    --accent-red: #dc3545;
    --shadow: rgba(61, 43, 86, 0.12);
    --overlay: rgba(61, 43, 86, 0.6);
    --gift-popup-background: white;
}

[data-palette="5"][data-theme="dark"] {
    --bg-body: #3d2b56;
    --bg-container: rgba(44, 73, 127, 0.4);
    --bg-container-solid: rgb(44, 73, 127);
    --bg-input: rgba(128, 138, 159, 0.3);
    --bg-hover: rgba(186, 210, 159, 0.2);
    --bg-active: rgba(204, 245, 172, 0.15);
    --text-primary: #ccf5ac;
    --text-secondary: #bad29f;
    --text-muted: #808a9f;
    --border-main: rgba(128, 138, 159, 0.5);
    --border-light: rgba(44, 73, 127, 0.5);
    --border-dark: #bad29f;
    --message-bubble: #2c497f;
    --accent-blue: #bad29f;
    --accent-blue-hover: #2c497f;
    --accent-green: #5dbb63;
    --accent-red: #ff6b7a;
    --shadow: rgba(0, 0, 0, 0.5);
    --overlay: rgba(61, 43, 86, 0.85);
    --gift-popup-background: rgba(44, 73, 127, 0.95);
}

/* Palette 6: Jewel Tones */
[data-palette="6"] {
    --bg-body: #f8f9f5;
    --bg-container: white;
    --bg-container-solid: white;
    --bg-input: white;
    --bg-hover: rgba(95, 173, 65, 0.1);
    --bg-active: rgba(45, 147, 108, 0.12);
    --text-primary: #3a0842;
    --text-secondary: #391463;
    --text-muted: #2d936c;
    --border-main: rgba(95, 173, 65, 0.3);
    --border-light: rgba(191, 174, 72, 0.25);
    --border-dark: #391463;
    --message-bubble: #5fad41;
    --accent-blue: #2d936c;
    --accent-blue-hover: #391463;
    --accent-green: #5fad41;
    --accent-red: #dc3545;
    --shadow: rgba(58, 8, 66, 0.12);
    --overlay: rgba(58, 8, 66, 0.6);
    --gift-popup-background: white;
}

[data-palette="6"][data-theme="dark"] {
    --bg-body: #3a0842;
    --bg-container: rgba(57, 20, 99, 0.6);
    --bg-container-solid: rgb(57, 20, 99);
    --bg-input: rgba(45, 147, 108, 0.25);
    --bg-hover: rgba(95, 173, 65, 0.2);
    --bg-active: rgba(191, 174, 72, 0.2);
    --text-primary: #e8f5e0;
    --text-secondary: #bfae48;
    --text-muted: #5fad41;
    --border-main: rgba(45, 147, 108, 0.5);
    --border-light: rgba(57, 20, 99, 0.5);
    --border-dark: #bfae48;
    --message-bubble: #2d936c;
    --accent-blue: #5fad41;
    --accent-blue-hover: #2d936c;
    --accent-green: #5fad41;
    --accent-red: #ff6b7a;
    --shadow: rgba(0, 0, 0, 0.5);
    --overlay: rgba(58, 8, 66, 0.85);
    --gift-popup-background: rgba(57, 20, 99, 0.95);
}

/* Palette 7: Sunset Gradient */
[data-palette="7"] {
    --bg-body: #fef9f4;
    --bg-container: white;
    --bg-container-solid: white;
    --bg-input: white;
    --bg-hover: rgba(249, 86, 79, 0.08);
    --bg-active: rgba(179, 63, 98, 0.12);
    --text-primary: #0c0a3e;
    --text-secondary: #7b1e7a;
    --text-muted: #b33f62;
    --border-main: rgba(249, 86, 79, 0.2);
    --border-light: rgba(243, 198, 119, 0.3);
    --border-dark: #7b1e7a;
    --message-bubble: #f9564f;
    --accent-blue: #b33f62;
    --accent-blue-hover: #7b1e7a;
    --accent-green: #4CAF50;
    --accent-red: #f9564f;
    --shadow: rgba(12, 10, 62, 0.12);
    --overlay: rgba(12, 10, 62, 0.6);
    --gift-popup-background: white;
}

[data-palette="7"][data-theme="dark"] {
    --bg-body: #0c0a3e;
    --bg-container: rgba(123, 30, 122, 0.3);
    --bg-container-solid: rgb(123, 30, 122);
    --bg-input: rgba(179, 63, 98, 0.2);
    --bg-hover: rgba(179, 63, 98, 0.25);
    --bg-active: rgba(249, 86, 79, 0.15);
    --text-primary: #f3c677;
    --text-secondary: #f9564f;
    --text-muted: #b33f62;
    --border-main: rgba(179, 63, 98, 0.4);
    --border-light: rgba(123, 30, 122, 0.4);
    --border-dark: #f9564f;
    --message-bubble: #f9564f;
    --accent-blue: #f9564f;
    --accent-blue-hover: #b33f62;
    --accent-green: #5dbb63;
    --accent-red: #f9564f;
    --shadow: rgba(0, 0, 0, 0.6);
    --overlay: rgba(12, 10, 62, 0.85);
    --gift-popup-background: rgba(123, 30, 122, 0.95);
}

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

button {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    padding-top: 65px;
    --navbar-h: 65px;
    display: flex;
    flex-direction: column;
}

.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-container-solid);
    padding: 15px 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    max-width: 100%;
    justify-content: space-between;
}

.navbar-logo {
    font-weight: 600;
    font-size: 18px;
    color: var(--text-primary);
    text-decoration: none;
}

.navbar-logo:hover {
    text-decoration: none;
}

.site-logo-img {
    display: inline-block;
    height: 28px;
    width: auto;
    vertical-align: middle;
}

.navbar-match {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.navbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.navbar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.navbar-avatar-icon {
    font-size: 14px;
    color: var(--text-muted);
}

.container {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.menu-icon {
    width: 24px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    cursor: pointer;
}

.menu-icon span {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    line-height: 1;
}

.theme-icon-dark {
    display: none;
}

[data-theme="dark"] .theme-icon-light {
    display: none;
}

[data-theme="dark"] .theme-icon-dark {
    display: inline;
}

/* Navbar Message Icon */
.navbar-message-icon {
    position: relative;
    text-decoration: none;
    font-size: 20px;
    padding: 5px;
}

.navbar-unread-badge {
    position: absolute;
    top: -2px;
    right: -5px;
    background: var(--accent-red);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Sidebar Menu */
.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100dvh;
    background: var(--bg-container);
    box-shadow: 2px 0 10px var(--shadow);
    transition: left 0.3s ease-out;
    z-index: 2000;
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 24px;
    color: var(--text-primary);
}

.wallet-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 215, 0, 0.25);
    border-radius: 20px;
    border: 2px solid rgba(255, 180, 0, 0.5);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.wallet-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 60%
    );
    animation: walletShine 2.5s ease-in-out infinite;
}

@keyframes walletShine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.wallet-coin-img {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 1;
}

.wallet-balance {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

.sidebar-nav {
    padding: 5px 0;
}

.sidebar-nav a {
    display: block;
    padding: 15px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    transition: background 0.2s;
}

.sidebar-nav a:hover {
    background: var(--bg-hover);
}

.sidebar-icon {
    display: inline-block;
    width: 24px;
    text-align: center;
    margin-right: 12px;
}

.sidebar-theme-toggle {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.sidebar-theme-toggle:hover {
    background: var(--bg-hover);
}

.sidebar-theme-toggle .theme-label {
    flex: 1;
}

.theme-switch {
    width: 44px;
    height: 24px;
    background: var(--border-main);
    border-radius: 12px;
    position: relative;
    transition: background 0.2s;
}

.theme-switch-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.sidebar-theme-toggle.active .theme-switch {
    background: var(--accent-green);
}

.sidebar-theme-toggle.active .theme-switch-slider {
    transform: translateX(20px);
}

/* Palette Switcher */
.sidebar-palette-switcher {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.sidebar-palette-switcher:hover {
    background: var(--bg-hover);
}

.sidebar-palette-switcher .palette-label {
    flex: 1;
}

.palette-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-input);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.palette-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--message-bubble);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--overlay);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1500;
}

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

.sidebar-divider {
    height: 1px;
    background: var(--border-main);
    margin: 10px 0;
}

/* Sidebar Match Item */
.sidebar-match-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s;
}

.sidebar-match-item:hover {
    background: var(--bg-hover);
}

.sidebar-match-item.active {
    background: var(--bg-active);
}

.sidebar-match-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sidebar-match-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-match-avatar-icon {
    font-size: 18px;
    color: var(--text-muted);
}

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

.sidebar-match-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.sidebar-match-preview {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-preview-blurred {
    filter: blur(4px);
    user-select: none;
}

.typing-preview {
    font-style: italic;
    color: var(--text-muted);
}

.sidebar-unmatch-form {
    padding: 10px 20px;
}

.sidebar-unmatch-btn {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid var(--accent-red);
    border-radius: 8px;
    background: var(--bg-container);
    color: var(--accent-red);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-unmatch-btn:hover {
    background: var(--accent-red);
    color: white;
}

.sidebar-unmatch-btn--active {
    background: var(--accent-red);
    color: white;
}

.sidebar-unmatch-btn--active:hover {
    background: #c82333;
}

/* Messages */
.messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1100;
    max-width: 400px;
}

.message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px var(--shadow);
    animation: slideIn 0.3s ease-out;
    cursor: pointer;
}

.message.hiding {
    animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.message.error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.message.success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.message.info {
    background: #eef;
    color: #33c;
    border: 1px solid #ccf;
}

[data-theme="dark"] .message.error {
    background: #4a2020;
    color: #ff8888;
    border: 1px solid #663333;
}

[data-theme="dark"] .message.success {
    background: #204a20;
    color: #88ff88;
    border: 1px solid #336633;
}

[data-theme="dark"] .message.info {
    background: #20204a;
    color: #8888ff;
    border: 1px solid #333366;
}

@media (max-width: 576px) {
    .top-navbar {
        padding: 10px 40px;
    }
    body {
        padding-top: 53px;
        --navbar-h: 53px;
    }
}
/* Site Footer */
.site-footer {
    margin-top: auto;
    padding: 32px 20px 24px;
    text-align: center;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 14px;
    margin-bottom: 18px;
}

.site-footer-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.site-footer-links a:hover {
    color: var(--accent-blue);
}

.site-footer-separator {
    color: var(--text-muted);
    font-size: 13px;
    user-select: none;
}

.site-footer-company {
    color: var(--text-secondary);
    color: color-mix(in srgb, var(--text-secondary) 85%, #000);
    font-size: 11px;
    margin-bottom: 5px;
}

.site-footer-pin {
    display: inline;
    width: 10px;
    height: 10px;
    vertical-align: -1px;
    margin-right: 3px;
}

.site-footer-copyright {
    color: var(--text-secondary);
    color: color-mix(in srgb, var(--text-secondary) 85%, #000);
    font-size: 11px;
}

.site-footer-payments {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-top: 16px;
}

.site-footer-pay-visa {
    display: block;
    height: 18px;
    width: auto;
    color: #1434cb;
}

.site-footer-pay-mc {
    display: block;
    height: 21px;
    width: auto;
}

[data-theme="dark"] .site-footer-pay-visa {
    color: #ffffff;
}

body.messenger-page .site-footer {
    display: none;
}

/* Blocked-account notice (see the moderation app). Mirrors the age gate: a
   blurred screen with no way past it, except this one has no dismiss control at
   all - the only route out is the contact link. */
html.account-blocked-active,
html.account-blocked-active body {
    overflow: hidden;
}

.account-blocked-overlay {
    position: fixed;
    inset: 0;
    /* Above the age gate: a blocked account must not be able to reach anything,
       and the two are never meaningfully shown together anyway. */
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 10, 12, 0.6);
    backdrop-filter: blur(16px) grayscale(1) brightness(0.6);
    -webkit-backdrop-filter: blur(16px) grayscale(1) brightness(0.6);
}

.account-blocked-overlay[hidden] {
    display: none;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .account-blocked-overlay {
        background: rgba(10, 10, 12, 0.97);
    }
}

.account-blocked-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-container);
    border-radius: 18px;
    border-top: 4px solid #dc2626;
    padding: 32px 28px 28px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.account-blocked-brand {
    margin-bottom: 18px;
}

.account-blocked-icon {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 16px;
}

.account-blocked-heading {
    margin: 0 0 12px;
    font-size: 21px;
    font-weight: 700;
    color: var(--text-primary);
}

.account-blocked-body {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.account-blocked-note {
    margin: 0 0 24px;
    font-size: 13px;
    color: var(--text-muted);
}

.account-blocked-btn {
    display: block;
    width: 100%;
    padding: 13px 16px;
    border-radius: 10px;
    background: #dc2626;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease;
}

.account-blocked-btn:hover {
    background: #ef4444;
}

.account-blocked-btn:focus-visible {
    outline: 3px solid #dc2626;
    outline-offset: 3px;
}

@media (max-width: 480px) {
    .account-blocked-card {
        padding: 26px 20px 22px;
    }
}

/* 18+ age gate (organic visitors only - see utils.middleware.AgeGateMiddleware) */
html.age-gate-active,
html.age-gate-active body {
    overflow: hidden;
}

.age-gate-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    /* Blurred and drained of colour, so nothing behind is legible. */
    background: rgba(10, 10, 12, 0.55);
    backdrop-filter: blur(14px) grayscale(1) brightness(0.7);
    -webkit-backdrop-filter: blur(14px) grayscale(1) brightness(0.7);
}

/* Without backdrop-filter the page behind would stay readable, so fall back to
   an opaque screen instead of a translucent one. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .age-gate-overlay {
        background: rgba(10, 10, 12, 0.97);
    }
}

/* Card styled to match the verification modals (age_prompt_modal.html /
   sfw_gate_modal.html): same geometry, theme tokens, 18+ gradient badge, and
   the pink-purple CTA gradient - the entry flow reads as one family. */
.age-gate-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-container);
    color: var(--text-primary);
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.age-gate-badge {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b9d, #c084fc);
    color: #fff;
}

.age-gate-logo {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.age-gate-heading {
    margin: 0 0 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.age-gate-question {
    margin: 0 0 20px;
    line-height: 1.55;
    color: var(--text-secondary);
}

.age-gate-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-sizing: border-box;
}

.age-gate-btn-allow {
    background: linear-gradient(135deg, #ff6b9d, #c084fc);
    color: #fff;
}

.age-gate-btn-allow:hover {
    filter: brightness(1.08);
}

/* Leaving is quiet, like the modals' skip actions: available, not inviting. */
.age-gate-btn-deny {
    margin-top: 10px;
    background: transparent;
    color: var(--text-secondary);
}

.age-gate-btn-deny:hover {
    color: var(--text-primary);
}

.age-gate-btn:focus-visible {
    outline: 3px solid #ff6b9d;
    outline-offset: 3px;
}

.age-gate-note {
    margin: 20px 0 0;
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .age-gate-card {
        padding: 26px 20px 22px;
    }
}

/* Legal pages (Terms of Use, Privacy Policy) */
.legal-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 20px 20px;
    line-height: 1.65;
    font-size: 15px;
}

.legal-page h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.legal-page h2 {
    font-size: 20px;
    margin: 28px 0 10px;
}

.legal-page h3 {
    font-size: 16px;
    margin: 20px 0 8px;
}

.legal-page p {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.legal-page ul,
.legal-page ol {
    margin: 0 0 10px;
    padding-left: 24px;
}

.legal-page li {
    margin-bottom: 4px;
}

.legal-page hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 24px 0;
}

.legal-page a {
    color: var(--accent-blue);
}

/* Company details block: kept out of reach of casual copying. user-select
   blocks drag-select and Ctrl+A, and the shield sits on top so a drag over the
   text can't start a selection at all. */
.legal-company {
    position: relative;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.legal-company-shield {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Lifted above the shield so the contact link stays clickable. */
.legal-company-link {
    position: relative;
    z-index: 2;
}

@media (max-width: 576px) {
    .site-footer {
        padding: 24px 16px 20px;
    }

    .site-footer-company {
        padding: 0 10px;
    }
}
/* ============================================================================
   Global media lightbox (templates/includes/lightbox.html) — ONE shared,
   reusable component for every page. Styled to look & behave exactly like the
   chat gallery lightbox (.gallery-lightbox in messenger.css); values mirrored
   here so the chat component stays untouched. Use it from new code via
   window.AppLightbox.open(items, startIndex).
   ========================================================================== */
.app-lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.app-lightbox.show { display: flex; }

.app-lightbox-media {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.app-lightbox-media img {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
}
.app-lightbox-media video {
    max-width: 100%;
    height: 100vh;
}

.app-lightbox-close {
    position: absolute;
    top: 20px; right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    width: 50px; height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}
.app-lightbox-close:hover { background: rgba(255, 255, 255, 0.2); }

.app-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 48px;
    line-height: 1;
    width: 60px; height: 80px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}
.app-lightbox-nav:hover { background: rgba(255, 255, 255, 0.2); }
.app-lightbox-prev { left: 20px; }
.app-lightbox-next { right: 20px; }

.app-lightbox-counter {
    position: absolute;
    top: 20px; left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 10;
}

@media (max-width: 768px) {
    .app-lightbox-nav { width: 40px; height: 60px; font-size: 32px; }
    .app-lightbox-prev { left: 10px; }
    .app-lightbox-next { right: 10px; }
}
