@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Outfit:wght@300;400;600&display=swap');

/* Chat Background Styles */
.bg-options {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.bg-opt {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.bg-opt:hover {
    transform: scale(1.05);
}

.bg-opt.selected {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
}

.none-opt {
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-controls {
    margin-top: 12px;
}

#trigger-crying-music {
    background: rgba(255, 45, 117, 0.15);
    border: 1px dashed var(--accent-color);
    font-weight: 600;
}

#trigger-crying-music:hover {
    background: var(--accent-color);
    color: white;
}

.messages-container.has-custom-bg {
    position: relative;
}

.messages-container.has-custom-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    /* Dark overlay for readability */
    z-index: 0;
    pointer-events: none;
}

.messages-container.has-custom-bg>* {
    position: relative;
    z-index: 1;
}

.custom-bg-active #particles,
.custom-bg-active #empty-watermark {
    display: none !important;
}

.custom-bg-active .chat-container {
    background: rgba(0, 0, 0, 0.1);
    padding: 0 !important;
    overflow: hidden;
}

.custom-bg-active .chat-header,
.custom-bg-active .messages-container,
.custom-bg-active .input-area {
    padding-left: 15px !important;
    padding-right: 15px !important;
}

.custom-bg-active .chat-header {
    padding-top: 15px !important;
}

.custom-bg-active .input-area {
    padding-bottom: 15px !important;
}

.custom-bg-active .messages-container {
    margin-bottom: 0 !important;
}

:root {
    --bg-color: #000000;
    --bg-gradient-start: #1a001f;
    --bg-gradient-end: #000000;
    --accent-color: #ff2d75;
    --accent-glow: rgba(255, 45, 117, 0.4);
    --secondary-color: #7b2cbf;
    --gold-glow: #ffd700;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-color: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.6);
}

.light-theme {
    --bg-color: #fff5f8;
    --bg-gradient-start: #ffffff;
    --bg-gradient-end: #ffeef2;
    --accent-color: #ff2d75;
    --accent-glow: rgba(255, 45, 117, 0.15);
    --secondary-color: #9c27b0;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 45, 117, 0.1);
    --text-color: #4a0e2e;
    --text-dim: rgba(74, 14, 46, 0.6);
}

.light-theme #particles div {
    background: var(--accent-color) !important;
}

.light-theme .chat-container,
.light-theme .auth-container {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 45, 117, 0.1);
    box-shadow: 0 15px 35px rgba(255, 45, 117, 0.08);
}

.light-theme .message.them {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.light-theme .message.me {
    box-shadow: 0 4px 15px rgba(255, 45, 117, 0.2);
}

.light-theme input {
    background: white;
    border: 1px solid rgba(255, 45, 117, 0.1);
    color: var(--text-color);
}

.light-theme .love-counter-beautiful {
    background: rgba(255, 45, 117, 0.05);
    border: 1px solid rgba(255, 45, 117, 0.1);
}

.light-theme .counter-value {
    background: linear-gradient(to right, var(--text-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 1px rgba(255, 45, 117, 0.2));
}

.light-theme .sidebar {
    background: rgba(255, 255, 255, 0.98);
}

.light-theme .custom-select {
    background: white;
    color: var(--text-color);
}

.light-theme .sidebar-btn {
    background: rgba(255, 45, 117, 0.04);
    color: var(--text-color);
}

.light-theme .sidebar-btn:hover {
    background: rgba(255, 45, 117, 0.07);
}

.light-theme .chat-header {
    border-color: rgba(0, 0, 0, 0.05);
}

/* Light theme overrides will be moved to the end of the file for better cascading */

.sidebar-btn.primary {
    background: linear-gradient(45deg, var(--accent-color), var(--secondary-color));
    border: none;
    color: white;
    justify-content: center;
    flex: 1;
    box-shadow: 0 0 15px var(--accent-glow);
}

.sidebar-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    justify-content: center;
    flex: 1;
}

.sidebar-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Light mode scrollbar */
.light-theme .messages-container::-webkit-scrollbar-thumb {
    background: rgba(255, 45, 117, 0.1);
}

.light-theme .messages-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 45, 117, 0.2);
}

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

html {
    background-color: #000;
}

body {
    background: radial-gradient(circle at center, var(--bg-gradient-start), var(--bg-gradient-end));
    background-color: #000;
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    height: 100vh;
    height: -webkit-fill-available;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    /* keep centered for desktop */
    overflow: hidden;
    /* Prevent slidebars */
    position: relative;
    transition: background 0.5s ease, color 0.5s ease;
}

/* Particle effect container */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.auth-container,
.chat-container {
    width: 100%;
    max-width: 450px;
    height: 80vh;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    padding: 15px 8px 15px 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 10;
    animation: fadeIn 0.8s ease-out;
}

/* Auth card clips sticker/glow to rounded corners */
.auth-container {
    overflow: hidden;
    padding: 25px 25px 15px 25px;
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bgFadeIn {
    from {
        opacity: 0.6;
        /* Subtle zoom-out effect on load */
        transform: scale(1.02);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* If background is cached, show it instantly without the entry bounce */
.chat-container.bg-immediate {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

.chat-container.has-custom-bg {
    transition: background-color 0.8s ease;
}

/* Welcome Screen */
.welcome-header {
    text-align: center;
    margin-top: 10%;
}

/* Couple sticker */
.sticker-wrap {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    position: relative;
}


.login-sticker {
    width: 90%;
    max-width: 450px;
    filter: drop-shadow(0 20px 50px rgba(255, 45, 117, 0.6));
    animation: stickerFloat 5s ease-in-out infinite;
    transform-origin: bottom center;
    transition: opacity 0.6s ease;
}

.auth-footer {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    /* Back to subtle but solid */
    letter-spacing: 1.2px;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
}

.auth-footer span {
    color: #ff2d75;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 45, 117, 0.5);
    text-transform: none !important;
    /* Forces exact spelling @CodeSadiq */
}

@keyframes stickerFloat {

    0%,
    100% {
        transform: translateY(0px) rotate(-0.5deg);
    }

    30% {
        transform: translateY(-9px) rotate(0.5deg);
    }

    70% {
        transform: translateY(-5px) rotate(-0.3deg);
    }
}

.welcome-header h1 {
    font-size: 3.2rem;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ff2d75, #8a2be2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 2px;
    filter: drop-shadow(0 0 15px rgba(255, 45, 117, 0.4));
}

.welcome-header p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 35px;
    line-height: 1.6;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding-right: 50px;
    text-align: left;
}

#toggle-eye {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    box-shadow: none;
    padding: 6px;
    cursor: pointer;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: color 0.2s, transform 0.2s;
}

#toggle-eye:hover {
    color: var(--accent-color);
    transform: none;
    box-shadow: none;
    background: none;
}

.light-theme #toggle-eye {
    color: rgba(74, 14, 46, 0.5);
}

.light-theme #toggle-eye:hover {
    color: var(--accent-color);
}

input {
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid #ff2d75;
    border-radius: 12px;
    padding: 16px 20px;
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s;
    text-align: left;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.has-custom-bg input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-glow);
    background: rgba(255, 45, 117, 0.08);
}

button {
    background: linear-gradient(135deg, #ff2d75, #8a2be2);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 16px;
    font-size: 1.2rem;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(255, 45, 117, 0.35);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 45, 117, 0.6);
}

#error-msg {
    color: var(--accent-color);
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    min-height: 1.2rem;
}

/* Chat Screen */
.chat-room {
    display: none;
}

.chat-room.active {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 15px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 5px;
}

#user-dp {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
    object-fit: cover;
}

.user-info {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.user-info h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    /* Slightly smaller for better fit */
    color: var(--text-color);
    margin: 0;
}

/* Cinema Catalogue UI Banner */
.catalogue-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(255, 45, 117, 0.15) 0%, rgba(138, 43, 226, 0.05) 100%);
    border: 1px solid rgba(255, 45, 117, 0.2);
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    width: 100%;
}

.catalogue-banner-icon {
    font-size: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    z-index: 2;
}

.catalogue-banner-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.catalogue-banner-text h4 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 0.5px;
}

.catalogue-banner-text p {
    margin: 0;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.4;
}

.banner-decor-blob {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 45, 117, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(30px);
    z-index: 1;
}

.emoji-glow {
    filter: drop-shadow(0 0 10px rgba(255, 45, 117, 0.6));
    animation: floatingIcon 3s ease-in-out infinite;
    display: inline-block;
}

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

.cinema-catalogue {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 5px;
}

.status-text {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 2px;
    font-weight: 400;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    background-color: var(--text-dim);
    transition: all 0.3s ease;
}

.has-custom-bg h2,
.has-custom-bg .status-text {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.has-custom-bg .status-text {
    color: rgba(255, 255, 255, 0.9) !important;
}

.status-indicator.online {
    background-color: #00ff88;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
}

.status-indicator.typing {
    background-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
    animation: typingPulse 1s infinite ease-in-out;
}

@keyframes typingPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.4);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.activity-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.activity-sticker {
    width: 28px;
    height: 28px;
    object-fit: contain;
}



.icon-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    margin-left: auto;
    padding: 5px;
    transition: all 0.3s;
}

.icon-btn:hover {
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-glow);
}

#menu-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    /* Square with soft corners */
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin-left: auto;
}

#menu-toggle:hover {
    background: rgba(255, 45, 117, 0.1);
    border-color: rgba(255, 45, 117, 0.3);
    box-shadow: 0 0 15px rgba(255, 45, 117, 0.2);
}

.light-theme #menu-toggle {
    background: white;
    border: 1px solid rgba(255, 45, 117, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.light-theme #menu-toggle:hover {
    background: rgba(255, 45, 117, 0.05);
}

/* Sidebar Styles */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    pointer-events: auto;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    /* Hidden off-screen */
    width: 320px;
    height: 100%;
    background: rgba(10, 5, 15, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1001;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0;
    display: flex;
    flex-direction: column;
    visibility: hidden;
    opacity: 0;
    overflow: hidden;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.4);
}

.sidebar.active {
    right: 0;
    visibility: visible;
    opacity: 1;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 30px 20px 30px;
    flex-shrink: 0;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 30px 60px 30px;
    /* Added bottom padding for Leave Room */
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) transparent;
}

/* Sidebar scrollbar styling */
.sidebar-content::-webkit-scrollbar {
    width: 4px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255, 45, 117, 0.2);
    border-radius: 10px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

.sidebar-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ff2d75, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(255, 45, 117, 0.3));
}

#close-sidebar {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 0;
}

#close-sidebar:hover {
    background: rgba(255, 45, 117, 0.15);
    border-color: rgba(255, 45, 117, 0.4);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 45, 117, 0.2);
}

.sidebar-section {
    margin-bottom: 35px;
}

.sidebar-section h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

/* Days shared together card — Premium One-Line Look */
.love-counter-beautiful {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.counter-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    font-weight: 600;
}

.counter-value {
    font-size: 1.8rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, #ff2d75);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(255, 45, 117, 0.3));
    line-height: 1;
}

.mini-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.mini-profile img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid var(--accent-color);
}

#settings-modal .modal-content {
    background: rgba(20, 15, 25, 0.95);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    width: 90%;
    max-width: 350px;
}

#settings-modal h3 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    letter-spacing: 1px;
    text-align: center;
}

.setting-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.setting-label-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-label-group svg {
    color: var(--accent-color);
    opacity: 0.8;
}

.setting-item label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: 0.5px;
}

.custom-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 15px;
    color: white;
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    color-scheme: dark;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.custom-select option {
    background: #1a001f;
    color: white;
}

.custom-select:hover {
    border-color: var(--accent-color);
    background-color: rgba(255, 45, 117, 0.05);
}

.custom-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
}

.sidebar-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-color);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: none;
}

.sidebar-btn:hover {
    background: rgba(255, 45, 117, 0.1);
    border-color: var(--accent-color);
    transform: translateX(5px);
}

.sidebar-btn svg {
    color: var(--accent-color);
}

#settings-modal .modal-content h3 {
    margin-bottom: 20px;
    font-family: 'Outfit', sans-serif;
    color: var(--accent-color);
}

.sidebar-footer {
    margin-top: auto;
    padding: 30px;
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

#logout-btn {
    background: rgba(255, 45, 117, 0.08);
    border: 1px solid rgba(255, 45, 117, 0.15);
    color: #ff4d8d;
    padding: 10px 24px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: none;
    letter-spacing: 0.5px;
}

#logout-btn:hover {
    background: rgba(255, 45, 117, 0.15);
    border-color: rgba(255, 45, 117, 0.3);
    color: #ff2d75;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 45, 117, 0.1);
}

.text-btn:hover {
    text-decoration: underline;
    box-shadow: none;
    transform: none;
}

.messages-container {
    position: relative;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    /* Prevent horizontal slidebars */
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 5px;
    padding-bottom: 25px;
    /* Added padding to ensure last message has space */
    margin-bottom: 20px;
    /* Increased margin */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.messages-container::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.messages-container {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

#empty-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -30px;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#empty-watermark.hidden {
    opacity: 0;
    transform: translate(-50%, -40%);
    visibility: hidden;
    display: flex !important;
    /* Keep flex while hiding for smoother exit */
}

.watermark-sticker {
    width: 180px;
    height: auto;
    opacity: 0.25;
    /* 2x visibility boost */
    filter: drop-shadow(0 0 30px rgba(255, 45, 117, 0.6));
    margin-bottom: 20px;
    animation: watermarkFloat 6s infinite ease-in-out;
}

.watermark-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.15);
    /* More visible */
    letter-spacing: 8px;
    text-transform: uppercase;
    text-align: center;
    animation: textPulse 4s infinite ease-in-out;
}

@keyframes watermarkFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes textPulse {

    0%,
    100% {
        opacity: 0.15;
        letter-spacing: 12px;
    }

    50% {
        opacity: 0.25;
        letter-spacing: 15px;
    }
}

.light-theme #empty-watermark .watermark-text {
    color: rgba(255, 45, 117, 0.04);
}

.light-theme #empty-watermark .watermark-sticker {
    filter: grayscale(1) opacity(0.04);
}

.messages-container::-webkit-scrollbar {
    width: 4px;
}

.messages-container::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 15px 8px 15px;
    /* Adjusted for footer */
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

.message.has-image {
    padding: 6px;
    max-width: 280px;
}

.message-image {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 5px;
    display: block;
    cursor: pointer;
}

.message.has-image .text-content {
    padding: 2px 10px 5px 10px;
    display: block;
    word-break: break-word;
}

.message.has-image .msg-footer {
    padding: 0 8px 4px 8px;
}

.sender-name {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 4px;
    opacity: 0.8;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message.me {
    align-self: flex-end;
    background: linear-gradient(135deg, #ff2d75, #bc003d);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(255, 45, 117, 0.3);
}



.message.emoji-only {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: visible;
}

.message.emoji-only .text-content {
    font-size: 3rem;
    line-height: 1;
    display: block;
}

.message.emoji-only .msg-footer {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 5px;
    width: fit-content;
}

.message.emoji-only.me .msg-footer {
    margin-left: auto;
}

.light-theme .message.emoji-only .msg-footer {
    background: rgba(255, 45, 117, 0.1);
    color: var(--text-color);
}

.message.them {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

/* Visibility Fixes for Custom Backgrounds */
.has-custom-bg .message.them {
    background: rgba(0, 0, 0, 0.4);
    /* Stronger overlay for light backgrounds like the river/sky */
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
}

.has-custom-bg .message.me {
    background: linear-gradient(135deg, rgba(255, 45, 117, 0.98), rgba(188, 0, 61, 0.98));
    box-shadow: 0 8px 32px rgba(255, 45, 117, 0.25);
    backdrop-filter: blur(12px);
}

.has-custom-bg .message .time {
    opacity: 0.95;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.msg-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    margin-top: 4px;
}

.message .time {
    font-size: 0.7rem;
    opacity: 0.6;
    display: block;
}

.ticks {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1;
}

.ticks.seen {
    color: #34b7f1;
    /* WhatsApp Blue */
    text-shadow: 0 0 8px rgba(52, 183, 241, 0.5);
    animation: tickPop 0.3s ease-out;
}

@keyframes tickPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
    }
}

/* Message Hover/Press Feedback */
.message {
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    touch-action: pan-y;
    will-change: transform;
}

/* Quoted message snippet within a message bubble */
.replied-snippet {
    background: rgba(0, 0, 0, 0.25);
    border-left: 3.5px solid var(--accent-color);
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    position: relative;
    max-width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.replied-thumbnail {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.replied-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.replied-snippet:hover {
    background: rgba(0, 0, 0, 0.32);
}

.replied-user {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--accent-color);
    text-transform: none !important;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.replied-user::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 17 4 12 9 7'%3E%3C/polyline%3E%3Cpath d='M20 18v-2a4 4 0 0 0-4-4H4'%3E%3C/path%3E%3C/svg%3E") no-repeat center;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 17 4 12 9 7'%3E%3C/polyline%3E%3Cpath d='M20 18v-2a4 4 0 0 0-4-4H4'%3E%3C/path%3E%3C/svg%3E") no-repeat center;
    background-color: var(--accent-color);
}

.replied-text {
    color: rgba(255, 255, 255, 0.82) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-style: italic;
}

.light-theme .replied-snippet {
    background: rgba(255, 45, 117, 0.08);
}

.light-theme .replied-text {
    color: rgba(0, 0, 0, 0.7) !important;
}

/* Swipe Reply Indicator (appears behind bubble) */
.reply-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 32px;
    height: 32px;
    background: rgba(255, 45, 117, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s;
    opacity: 0;
    z-index: -1;
}

.message.me .reply-indicator {
    right: -45px;
}

.message.them .reply-indicator {
    left: -45px;
}

.message.swiping-active .reply-indicator {
    opacity: 1;
}

.message:active {
    transform: scale(0.98);
    filter: brightness(0.9);
}

/* Modal Styles */
.custom-modal {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 100;
    justify-content: center;
    align-items: center;
    border-radius: 30px;
}

.custom-modal.active {
    display: flex;
}

.modal-content {
    background: rgba(25, 25, 25, 0.9);
    border: 1px solid var(--glass-border);
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    width: 80%;
    max-width: 300px;
    animation: popUp 0.3s ease-out;
}

@keyframes popUp {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-buttons button {
    flex: 1;
    padding: 10px;
    font-size: 0.9rem;
}

.modal-buttons button#confirm-no {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.input-area {
    display: flex;
    gap: 10px;
    width: 100%;
}

#message-input {
    flex: 1;
    min-width: 0;
    text-align: left;
    padding: 12px 15px;
    border-radius: 12px;
}

.has-custom-bg #message-input {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    border-color: rgba(255, 255, 255, 0.1);
}

.has-custom-bg #attach-btn {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

#attach-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-dim);
}

#attach-btn:hover {
    background: rgba(255, 45, 117, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-2px);
}

#attach-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

#attach-btn:hover svg {
    transform: scale(1.1);
}

.light-theme #attach-btn {
    background: white;
    border: 1px solid rgba(255, 45, 117, 0.1);
    color: var(--text-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.light-theme #attach-btn:hover {
    background: rgba(255, 45, 117, 0.05);
    border-color: var(--accent-color);
}


/* Reply Draft Preview Area */
.reply-preview-container {
    padding: 12px 15px 10px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid var(--glass-border);
    display: none;
    /* Shown via JS */
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 100%;
    position: relative;
    z-index: 5;
}

.has-custom-bg .reply-preview-container {
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.reply-preview-container.active {
    display: block;
}

.reply-preview-content {
    background: rgba(0, 0, 0, 0.2);
    border-left: 4px solid var(--accent-color);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.has-custom-bg .reply-preview-content {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border-left: 4px solid #ff2d75;
}

.reply-thumbnail {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.reply-main-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

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

.reply-preview-user {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 2px;
    text-transform: uppercase;
}

.reply-preview-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.has-custom-bg .reply-preview-text {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

#cancel-reply {
    background: none;
    border: none;
    color: var(--text-dim);
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
    box-shadow: none;
}

#cancel-reply:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.light-theme .reply-preview-container {
    background: rgba(255, 255, 255, 0.6);
    border-top-color: rgba(255, 45, 117, 0.1);
}

.light-theme .reply-preview-content {
    background: rgba(255, 45, 117, 0.05);
}

.light-theme .reply-preview-text {
    color: rgba(0, 0, 0, 0.5);
}

@keyframes slideUp {
    from {
        transform: translateY(15px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#send-btn {
    width: 50px;
    height: 50px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    flex-shrink: 0;
}

/* Mobile & Tablet optimizations */
@media (max-width: 1024px) {
    body {
        align-items: flex-start;
        height: 100%;
        overflow: hidden;
        /* Prevent slidebars */
    }

    .chat-container {
        height: 100dvh;
        border-radius: 0;
        max-width: 100vw;
        border: none;
        padding: 10px;
        overflow: hidden;
    }

    /* Auth container: full-screen on mobile, centered card on tablet */
    .auth-container {
        height: 100dvh;
        border-radius: 0;
        max-width: 100vw;
        border: none;
        padding: 25px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .auth-container .sticker-wrap {
        height: 180px;
        /* Fixed height for mobile to prevent shaking */
        margin-top: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .auth-container .login-sticker {
        max-height: 100%;
        width: auto !important;
        object-fit: contain;
    }

    @media (min-width: 601px) {
        body {
            align-items: center;
            /* Center card vertically */
        }

        .auth-container {
            height: auto;
            max-height: 98vh;
            /* Near full-screen height */
            max-width: 950px;
            /* Ultra-wide scale */
            border-radius: 70px;
            /* Maximum premium rounding */
            border: 1px solid var(--glass-border);
            padding: 85px 75px;
            /* Deepest padding */
            margin: auto;
            box-shadow: 0 50px 120px rgba(0, 0, 0, 0.8);
            overflow-y: auto;
            scrollbar-width: none;
        }

        .auth-container::-webkit-scrollbar {
            display: none;
        }

        .auth-container .welcome-header h1 {
            font-size: 5rem;
            /* Colossal title */
            margin-bottom: 25px;
        }

        .auth-container .welcome-header p {
            font-size: 1.55rem;
            margin-bottom: 50px;
        }

        .auth-container input {
            font-size: 1.45rem;
            padding: 24px 35px;
        }

        .auth-container button {
            font-size: 1.55rem;
            padding: 24px;
            margin-top: 15px;
        }

        .sticker-wrap {
            height: 50vh;
            /* Half the viewport for stickers! */
            /* Huge sticker presence */
            /* Larger sticker presence */
            /* Increased from 25vh to fill the larger card */
            /* Reserve fixed space to prevent layout shaking */
            margin-top: 25px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .login-sticker {
            max-height: 100%;
            width: auto;
            object-fit: contain;
        }
    }

    .login-sticker {
        width: 50% !important;
        max-width: 160px !important;
    }

    .sticker-text {
        font-size: 1.2rem !important;
        letter-spacing: 6px !important;
    }

    /* When keyboard is open, JS will set this class to shrink the container */
    body.keyboard-open {
        overflow: hidden !important;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    .chat-container.keyboard-open {
        height: var(--visual-viewport-height, 100dvh);
    }

    /* Header (with DP) and input must never shrink â€” messages area absorbs the space */
    .chat-header {
        flex-shrink: 0;
    }

    .messages-container {
        /* Ensure messages scroll and don't push input off screen */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        min-height: 0;
        /* important: allows flex child to shrink below content size */
    }

    .input-area {
        /* Stays at bottom of the flex container naturally */
        flex-shrink: 0;
    }

}

/* --- Light Theme Overrides --- */
.light-theme #settings-modal .modal-content,
.light-theme #custom-confirm .modal-content {
    background: white !important;
    border: 1px solid rgba(255, 45, 117, 0.1) !important;
    box-shadow: 0 15px 45px rgba(255, 45, 117, 0.15) !important;
    color: var(--text-color) !important;
}

.light-theme #settings-modal h3,
.light-theme #custom-confirm p {
    color: var(--text-color) !important;
}

.light-theme .setting-item {
    background: rgba(255, 45, 117, 0.03) !important;
    border: 1px solid rgba(255, 45, 117, 0.05) !important;
}

.light-theme .setting-item label {
    color: var(--text-color) !important;
}

.light-theme .setting-label-group svg {
    color: var(--accent-color) !important;
}

.light-theme .custom-select {
    background: white !important;
    border: 1px solid rgba(255, 45, 117, 0.1) !important;
    color: var(--text-color) !important;
}

.light-theme .custom-select option {
    background: white !important;
    color: var(--text-color) !important;
}

.light-theme .sidebar-btn.secondary {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    color: var(--text-color) !important;
}

.light-theme .sidebar-btn.secondary:hover {
    background: rgba(0, 0, 0, 0.08) !important;
}

/* Laptop and Desktop Optimizations */
@media (min-width: 1025px) {
    .chat-container {
        max-width: 450px;
        /* Reverted to narrow width as requested */
        height: 90vh;
        border-radius: 40px;
        padding: 25px 20px 25px 25px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    }

    /* Enhanced entrance page for desktop */
    .auth-container {
        max-width: 550px;
        height: auto;
        max-height: 92vh;
        /* Increased height */
        /* Ensure it fits on shorter screens */
        padding: 45px;
        border-radius: 45px;
        box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8);
        overflow-y: auto;
        scrollbar-width: none;
    }

    .auth-container::-webkit-scrollbar {
        display: none;
    }

    .auth-container .welcome-header {
        margin-top: 2%;
        /* Reduced top margin to save space */
    }

    .auth-container .welcome-header h1 {
        font-size: 4rem;
        margin-bottom: 15px;
    }

    .auth-container .welcome-header p {
        font-size: 1.2rem;
        margin-bottom: 45px;
    }

    .auth-container .login-sticker {
        max-width: 380px;
        max-height: 32vh;
        /* Increased sticker height */
        width: auto;
        object-fit: contain;
    }

    .auth-container .sticker-wrap {
        height: 32vh;
        /* Reserve fixed space for desktop stickers */
        margin-top: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .auth-container input {
        font-size: 1.2rem;
        padding: 18px 25px;
    }

    .auth-container button {
        font-size: 1.3rem;
        padding: 18px;
    }

    .message {
        max-width: 65%;
        /* Wider message bubbles on big screens */
        padding: 15px 20px;
        font-size: 1.05rem;
    }

    .message.emoji-only .text-content {
        font-size: 4.5rem;
        /* Larger emojis on desktop */
    }

    #message-input {
        padding: 15px 25px;
        font-size: 1.1rem;
    }

    #send-btn {
        width: 60px;
        height: 60px;
    }

    .chat-header h2 {
        font-size: 1.4rem;
    }

    #menu-toggle {
        width: 50px;
        height: 50px;
    }
}

/* â”€â”€ Message Action Menu â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.msg-action-menu {
    position: fixed;
    background: rgba(12, 8, 22, 0.96);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    padding: 8px 10px;
    display: none;
    align-items: center;
    gap: 2px;
    z-index: 9999;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 45, 117, 0.08);
}

.msg-action-menu.active {
    display: flex;
    animation: popUp 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reaction-btn {
    background: none;
    border: none;
    font-size: 1.55rem;
    cursor: pointer;
    padding: 5px 6px;
    border-radius: 12px;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s;
    line-height: 1;
    box-shadow: none;
}

.reaction-btn:hover {
    transform: scale(1.35) translateY(-3px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.menu-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 5px;
    flex-shrink: 0;
}

.menu-delete-btn {
    background: none;
    border: none;
    color: rgba(255, 90, 90, 0.75);
    cursor: pointer;
    padding: 7px 8px;
    border-radius: 12px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.menu-delete-btn:hover {
    color: #ff4444;
    background: rgba(255, 60, 60, 0.15);
    transform: scale(1.15);
    box-shadow: none;
}

/* Reaction â€” bare emoji at message corner */
.msg-reactions {
    position: absolute;
    bottom: -16px;
    font-size: 1.2rem;
    line-height: 1;
    user-select: none;
    pointer-events: none;
    animation: reactionPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.message.me .msg-reactions {
    left: 6px;
}

.message.them .msg-reactions {
    right: 6px;
}

.message:has(.msg-reactions) {
    margin-bottom: 22px;
}

/* Highlight effect for swiping or scrolling to message */
.highlight-flash {
    animation: flashGlow 1s ease-out;
}

@keyframes flashGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 45, 117, 0);
    }

    30% {
        box-shadow: 0 0 20px 10px rgba(255, 45, 117, 0.4);
        transform: scale(1.02);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 45, 117, 0);
    }
}

@keyframes reactionPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    70% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* â”€â”€ DP Lightbox â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#user-dp {
    cursor: pointer;
}

.dp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.dp-lightbox.open {
    opacity: 1;
    pointer-events: all;
}

.dp-lightbox img {
    width: min(80vw, 320px);
    height: min(80vw, 320px);
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(255, 45, 117, 0.5);
    box-shadow:
        0 0 0 6px rgba(255, 45, 117, 0.12),
        0 20px 60px rgba(0, 0, 0, 0.8);
    transform: scale(0.75);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dp-lightbox.square img {
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 15px;
    object-fit: contain;
}

.dp-lightbox.open img {
    transform: scale(1);
}

.lightbox-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.lightbox-change-btn {
    background: var(--accent-color);
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(255, 45, 117, 0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateY(20px);
    opacity: 0;
}

.dp-lightbox.open .lightbox-change-btn {
    transform: translateY(0);
    opacity: 1;
}

.lightbox-change-btn:hover {
    transform: scale(1.05);
    background: #ff4d8d;
    box-shadow: 0 15px 30px rgba(255, 45, 117, 0.4);
}

.sidebar-profiles {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    gap: 25px;
}

.profiles-infinity {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    background: linear-gradient(135deg, #ff2d75, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(255, 45, 117, 0.6));
    user-select: none;
    margin: 0;
    /* Reset margin */
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes infinityBreathe {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(255, 45, 117, 0.6));
    }

    50% {
        transform: scale(1.15);
        filter: drop-shadow(0 0 20px rgba(138, 43, 226, 0.8));
    }
}

.profile-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.profile-item:hover {
    transform: scale(1.05);
}

.profile-thumb {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
    box-shadow: 0 4px 15px rgba(255, 45, 117, 0.2);
}

.profile-item span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-user-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.sidebar-activity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    animation: sideActivityPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sidebar-activity-sticker {
    width: 65px;
    height: 65px;
    object-fit: contain;
    filter: drop-shadow(0 8px 15px rgba(255, 45, 117, 0.4));
    transition: transform 0.3s ease;
}

.sidebar-activity:hover .sidebar-activity-sticker {
    transform: scale(1.1) translateY(-5px);
}

.sidebar-activity-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

#sidebar-activity-text,
#sidebar-my-activity-text,
.sidebar-activity-text {
    text-align: center;
    font-size: 0.65rem;
    background: rgba(255, 45, 117, 0.1);
    color: #ff4d8d;
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 45, 117, 0.2);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: normal;
    word-wrap: break-word;
    max-width: 150px;
    line-height: 1.4;
    display: inline-block;
    backdrop-filter: blur(5px);
}

.accuracy-tag {
    font-size: 0.55rem;
    color: var(--text-dim);
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

@keyframes sideActivityPop {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.dp-lightbox.square .lightbox-change-btn {
    display: none !important;
}

/* â”€â”€ Mood Cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.mood-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.mood-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.mood-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.mood-dp-container {
    position: relative;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}

.mood-dp {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(255, 45, 117, 0.3);
    display: block;
}

.dp-edit-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: var(--accent-color);
    border: 2px solid var(--bg-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.dp-edit-badge:hover {
    transform: scale(1.15);
    background: #ff4d8d;
}

.mood-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
    justify-content: center;
}

.mood-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.mood-text {
    font-size: 0.82rem;
    color: var(--text-dim);
    word-break: break-word;
}

.mood-text.has-emoji {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.3;
}

.m-emoji {
    flex-shrink: 0;
    font-size: 0.9rem;
    line-height: 1.1;
    margin-top: 2px;
}

.m-text {
    flex: 1;
}

.mood-edit-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    box-shadow: none;
    flex-shrink: 0;
}

.mood-edit-btn:hover {
    color: var(--accent-color);
    background: rgba(255, 45, 117, 0.08);
    box-shadow: none;
}

.mood-input-wrap {
    display: none;
    margin-bottom: 8px;
    animation: fadeIn 0.3s ease-out;
}

.mood-input-wrap.visible {
    display: block;
}

.mood-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mood-opt {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    box-shadow: none;
}

.mood-opt span {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.mood-opt:hover {
    background: rgba(255, 45, 117, 0.1);
    border-color: rgba(255, 45, 117, 0.3);
    transform: translateY(-2px);
    box-shadow: none;
}

.mood-opt.active {
    background: rgba(255, 45, 117, 0.2);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(255, 45, 117, 0.2);
}

.mood-opt.active span {
    color: white;
}

.big-mood-display {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(255, 45, 117, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.big-mood-display.mini {
    width: 32px;
    height: 32px;
}

.big-mood-display.mini .big-mood-emoji {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(255, 45, 117, 0.4));
}

.big-mood-emoji {
    font-size: 3.5rem;
    filter: drop-shadow(0 0 15px rgba(255, 45, 117, 0.5));
    animation: moodFloat 3s infinite ease-in-out;
    cursor: default;
    user-select: none;
    z-index: 1;
}

@keyframes moodFloat {

    0%,
    100% {
        transform: translateY(0) scale(1) rotate(0);
    }

    50% {
        transform: translateY(-12px) scale(1.2) rotate(6deg);
    }
}

/* â”€â”€ Emoji Rain â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.emoji-rain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999999;
    overflow: hidden;
}

.raining-emoji {
    position: absolute;
    top: -50px;
    font-size: 2rem;
    user-select: none;
    animation: fall linear forwards;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

@keyframes fall {
    0% {
        transform: translateY(-50px) rotate(0deg) scale(0.5);
        opacity: 0;
    }

    10% {
        opacity: 1;
        transform: translateY(0) rotate(20deg) scale(1.2);
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(110vh) rotate(360deg) scale(1);
        opacity: 0;
    }
}

/* â”€â”€ Champagne Blast Effect â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.blast-emoji {
    position: absolute;
    font-size: 2rem;
    user-select: none;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: blastEmoji 0.9s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
    z-index: 999999;
}

@keyframes blastEmoji {
    0% {
        transform: translate(-50%, -50%) scale(0.2);
        opacity: 1;
    }

    60% {
        transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.4);
        opacity: 1;
    }

    100% {
        transform: translate(calc(-50% + var(--tx) * 1.3), calc(-50% + var(--ty) * 1.3)) scale(0.6);
        opacity: 0;
    }
}

.blast-particle {
    position: absolute;
    border-radius: 3px;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: blastParticle var(--dur, 0.9s) cubic-bezier(0.1, 0.6, 0.4, 1) forwards;
    z-index: 999998;
}

@keyframes blastParticle {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty) + 80px)) rotate(var(--rot)) scale(0.4);
        opacity: 0;
    }
}

/* â”€â”€ Monster Watching Effect â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.monster-overlay {
    position: fixed;
    inset: 0;
    z-index: 999997;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    animation: monsterOverlayAnim 4s ease forwards;
    overflow: hidden;
}

@keyframes monsterOverlayAnim {
    0% {
        background: rgba(0, 0, 0, 0);
    }

    20% {
        background: rgba(0, 0, 0, 0.55);
    }

    75% {
        background: rgba(0, 0, 0, 0.55);
    }

    100% {
        background: rgba(0, 0, 0, 0);
    }
}

.monster-riser {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(110%);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: monsterRise 4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    z-index: 2;
}

.monster-emoji {
    font-size: min(70vw, 70vh);
    line-height: 1;
    user-select: none;
    display: block;
    filter: drop-shadow(0 0 60px rgba(255, 45, 117, 0.9)) drop-shadow(0 0 120px rgba(138, 43, 226, 0.6));
    position: relative;
    z-index: 2;
}

@keyframes monsterRise {
    0% {
        transform: translateX(-50%) translateY(110%);
    }

    40% {
        transform: translateX(-50%) translateY(-70%);
    }

    65% {
        transform: translateX(-50%) translateY(-70%);
    }

    100% {
        transform: translateX(-50%) translateY(110%);
    }
}

.monster-glow {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: min(80vw, 80vh);
    height: min(80vw, 80vh);
    border-radius: 50%;
    background: radial-gradient(circle,
            rgba(255, 45, 117, 0.35) 0%,
            rgba(138, 43, 226, 0.2) 40%,
            transparent 70%);
    animation: monsterGlowPulse 4s ease forwards;
    z-index: 1;
    pointer-events: none;
}

@keyframes monsterGlowPulse {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.5);
    }

    30% {
        opacity: 1;
        transform: translateX(-50%) scale(1.1);
    }

    55% {
        opacity: 0.8;
        transform: translateX(-50%) scale(0.95);
    }

    80% {
        opacity: 0.6;
        transform: translateX(-50%) scale(1.05);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) scale(1.3);
    }
}

/* Switch Styling */
.switch-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 45px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-checkbox:checked {
    background: var(--accent-gradient);
    border-color: var(--accent-color);
}

.custom-checkbox::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 3px;
    transform: translateY(-50%);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.custom-checkbox:checked::before {
    left: 22px;
    background: white;
}

.checkbox-label {
    font-size: 0.9rem;
    color: var(--text-dim);
    min-width: 30px;
}

.custom-checkbox:checked+.checkbox-label {
    color: var(--accent-color);
    font-weight: bold;
}

/* Smooth Background Layer (Added by Assistant) */
.chat-container {
    overflow: hidden !important;
    position: relative !important;
}

.chat-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--chat-bg-url);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.2s ease-in-out;
}

.chat-container.has-custom-bg::before {
    opacity: 1 !important;
}

/* --- Privacy Feature (Scratch to Hide) --- */
html.privacy-enabled body {
    overflow: hidden !important;
}

.privacy-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 10000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: left;
    overflow-y: auto;
    animation: fadeInPrivacy 0.4s ease-out;
}

html.privacy-enabled .privacy-overlay {
    display: flex;
}

html.privacy-enabled .chat-container,
html.privacy-enabled .auth-container,
html.privacy-enabled #particles,
html.privacy-enabled .sidebar,
html.privacy-enabled .sidebar-overlay,
html.privacy-enabled .auth-footer {
    display: none !important;
}

.privacy-quote-container {
    max-width: 600px;
    width: 100%;
}

.privacy-quote-text {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 1.4rem;
    line-height: 1.8;
    color: #333333;
    margin-bottom: 20px;
    font-weight: 300;
}

.privacy-quote-author {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #888888;
    letter-spacing: 2px;
    text-transform: uppercase;
}

@keyframes fadeInPrivacy {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.chat-container.bg-immediate::before {
    transition: none !important;
    opacity: 1 !important;
}

/* Cinema Mode Modal Specific Styles */
.cinema-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.cinema-modal.active {
    display: flex;
}

/* Picture in Picture (Chat Background) Mode */
.cinema-modal.pip-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    pointer-events: none;
    z-index: 1; /* Place above body backdrop but behind chat */
    display: flex;
    justify-content: center;
    align-items: center;
}

.cinema-modal.pip-mode .cinema-content {
    width: 100vw;
    height: 100vh;
    max-width: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
    pointer-events: none;
    overflow: hidden;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.cinema-modal.pip-mode .cinema-header-bar,
.cinema-modal.pip-mode .cinema-controls,
.cinema-modal.pip-mode .modal-buttons {
    display: none !important;
}

.cinema-modal.pip-mode .cinema-player-wrapper {
    flex: 1;
    height: 100%;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

.cinema-modal.pip-mode .cinema-video,
.cinema-modal.pip-mode .cinema-iframe {
    object-fit: cover; /* Fill the whole background elegantly */
}

/* Make chat transparent when video is background */
body.pip-bg-active .chat-container {
    background: rgba(10, 5, 15, 0.55) !important;
    backdrop-filter: none !important; /* No blur so the video shows clearly */
    -webkit-backdrop-filter: none !important;
    z-index: 2; /* Sit on top of the cinema modal */
}

.cinema-content {
    width: 95%;
    max-width: 1100px;
    height: 85vh;
    background: #080808;
    border: 1px solid rgba(255, 45, 117, 0.3);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), 0 0 20px rgba(255, 45, 117, 0.1);
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: 24px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

.cinema-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cinema-header-bar h3 {
    margin: 0;
    color: var(--accent-color);
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    text-shadow: 0 0 10px var(--accent-glow);
}

.cinema-toast {
    color: #fff;
    background: rgba(255, 45, 117, 0.8);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(255, 45, 117, 0.4);
    pointer-events: none;
}

.cinema-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.cinema-player-wrapper {
    flex: none;
    min-height: 250px;
    height: 50vh;
    position: relative;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.video-transition-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 50;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.video-transition-mask.active {
    opacity: 1;
    pointer-events: auto;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.elegant-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 45, 117, 0.1);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-family: 'Outfit', sans-serif;
    color: var(--text-dim);
    font-size: 0.9rem;
    letter-spacing: 1px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

.cinema-player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.cinema-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Cinema Catalogue UI */
.catalogue-header {
    padding: 10px 0 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 15px;
}

.catalogue-header h4 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
    font-size: 1.1rem;
}

.catalogue-header p {
    margin: 5px 0 0;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.cinema-catalogue {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 5px;
}

.movie-card-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.movie-card-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 45, 117, 0.2);
    transform: translateX(3px);
}

.movie-info-small {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.movie-name-tag {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}

.movie-status-tag {
    font-size: 0.7rem;
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.play-movie-btn {
    background: var(--accent-color) !important;
    font-size: 0.8rem !important;
    padding: 8px 16px !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 10px rgba(255, 45, 117, 0.2) !important;
    color: white !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s !important;
}

.play-movie-btn:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 6px 15px rgba(255, 45, 117, 0.4) !important;
}

.catalogue-loading {
    text-align: center;
    padding: 20px;
    font-size: 0.8rem;
    color: var(--text-dim);
    font-style: italic;
}

/* Live Folder Embed Styles */
.folder-embed-wrapper {
    width: 100%;
    height: 350px;
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 15px;
}

.folder-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
}

.sync-input-group {
    display: flex;
    flex-direction: column;
}

.drive-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1.5px solid rgba(255, 45, 117, 0.2);
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
    margin-bottom: 5px;
}

.drive-input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 45, 117, 0.05);
    box-shadow: 0 0 15px rgba(255, 45, 117, 0.1);
}

.drive-input-lean {
    flex: 1;
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(255, 45, 117, 0.2) !important;
    color: #fff !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
    font-size: 0.85rem !important;
    outline: none !important;
}

.sync-action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.preview-btn-small {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-dim) !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 0.8rem !important;
    cursor: pointer !important;
}

.preview-btn-small:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

.sync-btn-small {
    background: var(--accent-gradient) !important;
    color: white !important;
    border: none !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    cursor: pointer !important;
    white-space: nowrap !important;
}

@media (max-width: 600px) {
    .sync-action-buttons {
        width: 100%;
    }

    .preview-btn-small,
    .sync-btn-small {
        flex: 1;
        text-align: center;
    }
}

.cinema-top-panel {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 20px;
}

.sync-status-board {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 45, 117, 0.2);
    min-width: 145px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.user-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    font-family: 'Outfit', sans-serif;
}

.user-label {
    color: var(--text-dim);
    font-weight: 500;
    margin-right: 15px;
}

.user-time {
    color: #fff;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

#user-sadiq-progress .user-time {
    color: #00ff88;
}

#user-maheen-progress .user-time {
    color: #ff0077;
}

.sync-input-group {
    display: flex;
    gap: 10px;
    width: 100%;
}

@media (max-width: 600px) {
    .cinema-top-panel {
        flex-direction: column;
        gap: 12px;
    }

    .sync-status-board {
        width: 100%;
        flex-direction: row;
        justify-content: space-around;
        min-width: unset;
    }

    .cinema-content {
        height: 95vh;
        width: 100%;
        border-radius: 0;
        padding: 15px;
    }

    .cinema-player-wrapper {
        max-height: 40vh;
    }
}




@media (max-width: 600px) {
    .cinema-content {
        height: 100vh;
        width: 100%;
        border-radius: 0;
        padding: 15px 0 0 0;
        border: none;
    }

    .cinema-header-bar {
        padding: 0 15px;
    }

    .cinema-player-wrapper {
        border-radius: 0;
        border-left: none;
        border-right: none;
        max-height: 40vh;
        width: 100%;
    }

    .cinema-controls {
        margin: 0 15px;
    }
    
    .modal-buttons {
        padding: 0 15px 15px 15px;
    }

    .sync-controls button {
        font-size: 0.8rem;
        padding: 8px;
    }
}
/* --- Cinema Media Catalogue --- */
.cinema-catalogue-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
}

.catalogue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.catalogue-item:hover {
    background: rgba(255, 45, 117, 0.1);
    border-color: var(--accent-color);
    transform: translateX(5px);
}

.item-icon {
    font-size: 1.2rem;
    opacity: 0.8;
}

.item-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-size {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.catalogue-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 30px;
    color: var(--text-dim);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Perfect Sync Seeking Indicator */
.seeking-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    opacity: 0;
    display: none;
    transition: opacity 0.3s;
}

.seeking-overlay.active {
    display: flex;
    opacity: 1;
}
.item-thumb {
    width: 60px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.3);
}
.item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.item-thumb {
    width: 60px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.3);
}
.item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
