/* ========================================
   💎 NOTA.AI Premium Design System
   ======================================== */

/* Status Dot Styles */
.status-dot.busy {
    background-color: #f59e0b !important;
    /* Amber/Orange */
    box-shadow: 0 0 10px #f59e0b !important;
    animation: pulseOrange 2s infinite !important;
}

@keyframes pulseOrange {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

:root {
    /* Color Palette - Vibrant & Premium */
    --primary-gradient: linear-gradient(135deg, #FF69B4 0%, #FFB6C1 100%);
    --accent-glow: rgba(255, 105, 180, 0.5);

    /* Mesh Gradients */
    /* Mesh Gradients - High Contrast & Speed */
    --mesh-bg-1: #FF9EBB;
    /* Stronger Pink */
    --mesh-bg-2: #FF8BA7;
    /* Deep Rose */
    --mesh-bg-3: #80DEEA;
    /* Vibrant Cyan */
    /* Light accents */

    /* Glassmorphism System */
    --glass-surface: rgba(255, 255, 255, 0.3);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-highlight: rgba(255, 255, 255, 0.9);
    --glass-blur: 25px;

    /* Shadows & Depth */
    --shadow-sm: 0 4px 12px rgba(189, 44, 108, 0.05);
    --shadow-md: 0 12px 32px rgba(189, 44, 108, 0.08);
    --shadow-lg: 0 20px 50px rgba(189, 44, 108, 0.12);
    --shadow-inner: inset 0 0 20px rgba(255, 255, 255, 0.8);

    /* Typography - Dual Stack for Mixed Language Support */
    --font-main: 'Outfit', 'IBM Plex Sans Arabic', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --text-primary: #1A1A1A;
    --text-secondary: #555555;
    --text-tertiary: #999999;

    /* Sizing */
    --pill-radius: 50px;
    --card-radius: 24px;
}

/* ========================================
   RESET & BASE STYLE
   ======================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

body {
    font-family: var(--font-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    /* Dynamic viewport height */
    width: 100%;
    overflow: hidden !important;
    /* Forces layout containment */
    direction: inherit;
}

/* Explicitly inherit font for form elements to support mixed language typing */
button,
input,
textarea {
    font-family: var(--font-main) !important;
}

/* ========================================
   🌊 ANIMATED MESH BACKGROUND
   ======================================== */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* Avoid 100vw scrollbar issues */
    height: 100dvh;
    /* Stable mobile height */
    z-index: -10;
    overflow: hidden;
    background: radial-gradient(at 0% 0%, var(--mesh-bg-2) 0px, transparent 50%),
        radial-gradient(at 100% 0%, var(--mesh-bg-3) 0px, transparent 50%),
        radial-gradient(at 100% 100%, var(--mesh-bg-1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, #ffffff 0px, transparent 50%);
    background-size: 400% 400%;
    animation: meshFlow 6s ease-in-out infinite alternate;
}



@keyframes meshFlow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

.glass-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    z-index: -9;
    animation: floatOrb 25s infinite ease-in-out;
}

.orb-1 {
    top: -10%;
    right: -10%;
    width: 50%;
    aspect-ratio: 1;
    background: #FFB6C1;
    animation-delay: 0s;
}

.orb-2 {
    bottom: -10%;
    left: -10%;
    width: 60%;
    aspect-ratio: 1;
    background: #E6E6FA;
    animation-delay: -5s;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(30px, -50px);
    }

    66% {
        transform: translate(-20px, 20px);
    }
}

/* ========================================
   GLASS COMPONENTS
   ======================================== */
.glass-card {
    background: var(--glass-surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md), var(--shadow-inner);
    border-radius: var(--card-radius);
}

.glass-button {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid white;
    padding: 14px 28px;
    border-radius: var(--pill-radius);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.glass-button:hover {
    background: white;
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.glass-button.primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    box-shadow: 0 10px 20px rgba(255, 105, 180, 0.3);
}

.glass-button.primary:hover {
    box-shadow: 0 15px 30px rgba(255, 105, 180, 0.4);
}

/* ========================================
   FLOATING LAYOUTS
   ======================================== */
.lang-toggle-btn {
    min-width: 40px;
    min-height: 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    display: none;
    height: 100vh;
    animation: fadeScale 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.container.active {
    display: flex;
    flex-direction: column;
}

.home-page {
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

/* Typography Polish */
.logo {
    font-size: 5rem;
    font-weight: 800;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #333 0%, #FF69B4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 3rem;
}

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    margin-top: 4rem;
    padding: 0 1rem;
    /* Add side padding to container */
}

.feature-card {
    padding: 1.5rem 1rem;
    /* Reduced padding (smaller from sides) */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Modern touch */
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* ========================================
   CHAT INTERFACE - PREMIUM
   ======================================== */
.chat-page {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    /* Strict lock */
    height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    position: fixed;
    right: 20px;
    top: 20px;
    bottom: 20px;
    width: 320px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Close Sidebar Button - Match Conversation Actions */
#closeSidebarBtn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

#closeSidebarBtn:hover {
    background: var(--primary-gradient);
    color: white;
    transform: scale(1.05);
    border-color: transparent;
}

.new-chat-btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 1rem;
}

/* ========================================
   🗂️ SIDEBAR CONVERSATIONS
   ======================================== */
.conversations-list {
    overflow-y: auto;
    flex: 1;
    padding-right: 4px;
    padding-left: 4px;
}

/* Custom Scrollbar */
.conversations-list::-webkit-scrollbar {
    width: 4px;
}

.conversations-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.conversation-item {
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 10px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.conversation-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.conversation-item.active {
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.2) 0%, rgba(160, 32, 240, 0.2) 100%);
    border: 1px solid rgba(255, 105, 180, 0.5);
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.2);
}

.conversation-info {
    flex: 1;
    overflow: hidden;
    padding-left: 8px;
    /* Spacing from RTL perspective if needed, but in flex it's fine */
}

.conversation-title {
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    /* Consistent font */
}

.conversation-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.conversation-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.2s ease;
    position: relative;
    z-index: 5;
    /* Ensure above item click */
}

.conversation-item:hover .conversation-actions {
    opacity: 1;
    transform: translateX(0);
}

/* Sidebar Action Buttons */
.conversation-actions .glass-button-small {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 8px;
    /* Squarish for actions */
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
}

.conversation-actions .glass-button-small:hover {
    background: var(--primary-gradient);
    color: white;
    transform: scale(1.1);
}

/* Main Chat Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    position: relative;
}

/* Header is now a grid provided by inline styles or utility classes. 
   Removing old flex rules to avoid conflict, keeping padding/margin basics. */
.chat-header {
    /* Grid layout is handled inline in HTML for this specific user request precision */
    width: 100%;
    display: flex;
    /* Ensure flex behavior */
    align-items: center;
    /* Vertical Center Fix */
}

.header-logo {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
    white-space: nowrap;
    /* Absolute centering to ignore siblings */
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10;
    margin: 0 !important;
}

/* Remove Hover Background Color Globally for Lang Toggle */
@media (hover: hover) {
    .lang-toggle-btn:hover {
        background: transparent !important;
        transform: scale(1.05);
        box-shadow: none;
    }
}

.lang-toggle-btn:active {
    background: transparent !important;
    /* Disappear on press globally */
    transform: scale(0.95);
    transition: background 0.1s;
}

/* Pulsing Status Dot */
.status-dot {
    width: 8px;
    height: 8px;
    background: #00E676;
    /* Neon Green */
    border-radius: 50%;
    box-shadow: 0 0 10px #00E676;
}

.status-dot.disconnected {
    background: #FF1744;
    /* Neon Red */
    box-shadow: 0 0 10px #FF1744;
    animation: pulseRed 2s infinite;
}

@keyframes pulseRed {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 23, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(255, 23, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 23, 68, 0);
    }
}

/* Pulsing Status Dot */
.pulsing-dot {
    animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(76, 175, 80, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    padding-bottom: 140px;
    /* Space for Floating Pill */
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    scroll-behavior: smooth;
}

/* Messages */
/* تحسين اتجاه الرسائل في الوضع العربي RTL */
.message {
    display: flex;
    gap: 12px;
    max-width: 80%;
    align-items: flex-end;
    /* Avatar at bottom */
    animation: slideUp 0.3s ease-out forwards;
    /* Forwards to keep end state */
}

/* المستخدم (يمين) - الأصل في العربية */
.message.user {
    align-self: flex-start;
    /* اليمين */
    flex-direction: row;
    /* Avatar (Right) -> Content (Left) */
}

/* الذكاء الاصطناعي (يسار) */
.message.ai {
    align-self: flex-end;
    /* اليسار */
    flex-direction: row-reverse;
    /* Content (Right/Inner) <- Avatar (Left/Edge) */
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    font-size: 1.2rem;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

/* Message Content Bubble */
.message-content {
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

.message-text {
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 1rem;
    line-height: 1.5;
    position: relative;
    box-shadow: var(--shadow-sm);
    /* Bidi Support for mixed text */
    unicode-bidi: plaintext;
    text-align: start;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 4px;
    padding: 0 4px;
}

/* User Bubble Style */
.message.user .message-text {
    background: var(--primary-gradient);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.user .message-time {
    text-align: right;
}

/* AI Bubble Style */
.message.ai .message-text {
    background: white;
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.message.ai .message-time {
    text-align: left;
}

/* Animations - Ensure clickable after fade */
.fade-in-delay {
    animation: fadeIn 0.6s ease 0s forwards;
}

.fade-in-delay-2 {
    animation: fadeIn 0.6s ease 0.2s forwards;
}

/* ========================================
   floating PILL INPUT BAR 💊
   ======================================== */
.chat-input-container {
    position: absolute;
    bottom: calc(2rem + env(safe-area-inset-bottom));
    /* Add safe area by default */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    z-index: 50;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

.input-wrapper {
    background: rgba(255, 255, 255, 0.4);
    /* Highly opaque for contrast */
    backdrop-filter: blur(30px);
    border: 1px solid white;
    border-radius: 35px;
    padding: 6px;
    /* Reduced for tighter spacing */
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    width: 100%;
    /* Stack children vertically */
    gap: 10px;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 25px 70px -10px rgba(255, 105, 180, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

.message-input {
    flex: 1;
    background: transparent;
    border: none;
    max-height: 150px;
    padding: 14px;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
    resize: none;
    min-height: 24px;
    line-height: 1.5;
    text-align: inherit;
    direction: inherit;
    /* Bidi Support */
    unicode-bidi: plaintext;
}

html[dir="rtl"] .message-input {
    text-align: right;
    direction: rtl;
}

html[dir="ltr"] .message-input {
    text-align: left;
    direction: ltr;
}

/* LTR Status Adaptation */
html[dir="ltr"] .message.user {
    align-self: flex-end;
    /* User on Right */
    flex-direction: row-reverse;
    /* Avatar Right */
}

html[dir="ltr"] .message.ai {
    align-self: flex-start;
    /* AI on Left */
    flex-direction: row;
    /* Avatar Left */
}

html[dir="ltr"] .sidebar {
    right: auto;
    left: 20px;
    transform: translateX(-120%);
}

html[dir="ltr"] .sidebar.open {
    transform: translateX(0);
}

html[dir="ltr"] .header-right {
    /* Back button usually on Left in LTR */
    order: -1;
}

html[dir="ltr"] .header-left {
    /* Status on Right in LTR */
    order: 3;
}

/* Ensure logo stays in middle via center justification or order 2 */


.message-input::placeholder {
    color: #aaa;
}

/* Action Buttons inside Pill */
.input-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-button,
.send-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    color: var(--text-secondary);
}

.action-button:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

.send-button {
    background: var(--primary-gradient);
    color: white;
    margin-left: 10px;
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.3);
}

.send-button:hover {
    transform: scale(1.1);
}

/* File Preview inside Pill */
.file-preview {
    width: 100%;
    padding: 10px 20px;
    display: none;
    /* Hidden by default to prevent gap */
    gap: 10px;
    overflow-x: auto;
}

.preview-item {
    border-radius: 12px;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    position: relative;
    border: 2px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.preview-image,
.preview-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.remove-file {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #FF1744;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.remove-file:hover {
    transform: scale(1.1);
}

/* Animations */
@keyframes fadeScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}



/* Ensure Home Page scrolls on short screens (Landscape, etc.) */
@media (max-height: 700px) {
    .home-page {
        justify-content: flex-start;
        padding-top: 2rem;
        height: 100dvh;
        overflow-y: auto;
    }
}

/* Header Buttons Alignment */
.glass-button-small {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
    /* Strict dimensions to prevent oval shape */
    min-width: 40px;
    min-height: 40px;
    flex-shrink: 0;
    padding: 0;
}

#langBtn {
    /* Explicit override just in case */
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.glass-button-small:hover {
    background: white;
    color: var(--text-primary);
    transform: scale(1.05);
}

/* ========================================
   💬 TYPING INDICATOR
   ======================================== */
.typing-message {
    align-self: flex-end !important;
    /* Forces Left side in RTL */
    flex-direction: row-reverse !important;
    /* Avatar Left, Content Right */
    display: flex;
    gap: 12px;
    max-width: 80%;
    margin-bottom: 20px;
}

.typing-capsule {
    padding: 12px 20px;
    border-radius: 50px;
    background: white;
    display: flex;
    /* Flex container for dots */
    flex-direction: row;
    /* Standard row */
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-sm);
    min-height: 40px;
    direction: ltr;
    /* Force internal LTR so dots flow Left to Right */
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--text-tertiary);
    /* Dots color */
    border-radius: 50%;
    animation: jumpDot 1.4s infinite ease-in-out both;
}

/* Jumping Animation */
@keyframes jumpDot {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
        background: var(--mesh-bg-1);
        /* Color change */
    }
}




/* ========================================
   👋 WELCOME MESSAGE STYLING
   ======================================== */
.welcome-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: auto;
    /* Vertically center in the flex container */
    height: 100%;
    /* Occupy full height of chat-container */
    padding-bottom: 50px;
    /* Visual offset */
}

.welcome-icon {
    font-size: 6rem;
    /* Huge Emoji */
    margin-bottom: 1rem;
    display: inline-block;
    animation: waveHand 2.5s infinite;
    transform-origin: 70% 70%;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
}

.welcome-message h3 {
    font-size: 2.5rem;
    /* Large Title */
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    background: linear-gradient(135deg, #333 0%, #FF69B4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-message p {
    font-size: 1.5rem;
    /* Large Subtitle */
    color: var(--text-secondary);
}

@keyframes waveHand {
    0% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(14deg);
    }

    20% {
        transform: rotate(-8deg);
    }

    30% {
        transform: rotate(14deg);
    }

    40% {
        transform: rotate(-4deg);
    }

    50% {
        transform: rotate(10deg);
    }

    60% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* ========================================
   🎨 BEAUTIFUL TYPOGRAPHY & ANIMATION
   ======================================== */
@keyframes textShine {
    to {
        background-position: 200% center;
    }
}

.logo,
.header-logo,
.welcome-message h3 {
    font-family: 'Outfit', sans-serif !important;
    background: linear-gradient(300deg,
            #FF69B4,
            /* Pink */
            #AB47BC,
            /* Purple */
            #4DD0E1,
            /* Cyan */
            #FF69B4
            /* Pink Loop */
        );
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShine 3s linear infinite;
    letter-spacing: -0.5px;
}

.logo {
    font-size: 5rem;
    font-weight: 800;
}

.header-logo {
    font-size: 1.5rem;
    font-weight: 700;
}

flex: 1;
overflow: hidden;
}

.reply-preview-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.reply-preview-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reply-preview-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.reply-preview-close:hover {
    color: var(--text-primary);
}

/* Reply Quote (in message bubble) - Beautiful Design */
.reply-quote {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.08) 0%, rgba(171, 71, 188, 0.08) 100%);
    border-radius: 12px;
    margin-bottom: 10px;
    border-right: 3px solid;
    border-image: linear-gradient(180deg, #FF69B4, #AB47BC) 1;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.reply-quote::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.15) 0%, rgba(171, 71, 188, 0.15) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.reply-quote:hover {
    transform: translateX(-2px);
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.2);
}

.reply-quote:hover::before {
    opacity: 1;
}

.reply-quote-icon {
    font-size: 1rem;
    z-index: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.reply-quote-text {
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 1;
    font-weight: 500;
}

/* Reply Button (always visible, LEFT side, centered vertically) */
.reply-btn {
    background: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 1;
    transition: transform 0.2s, background 0.2s;
    flex-shrink: 0;
    margin-left: 8px;
    order: 10;
    align-self: center;
}

.reply-btn svg {
    color: var(--text-tertiary);
    width: 14px;
    height: 14px;
}

.reply-btn:hover {
    transform: scale(1.15);
    background: rgba(255, 105, 180, 0.3);
}

.reply-btn:hover svg {
    color: var(--primary-pink);
}