/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

:root {
    --font-main: 'Plus Jakarta Sans', sans-serif;

    /* Structural Colors (Light Mode) */
    --bg-body: #fff0f5;
    --bg-card: #ffffff;
    --text-main: #4a4a4a;
    --text-muted: #888888;
    --border-color: #ffe0e9;
    --shadow-soft: 0 10px 30px rgba(255, 143, 163, 0.15);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.05);

    /* Pink Theme (Default Accent) */
    --primary: #ff8fa3;
    --primary-dark: #ff6b85;
    --secondary: #ffdd44;
    --primary-rgb: 255, 143, 163;

    /* Animation speeds */
    --trans-fast: 0.2s;
    --trans-med: 0.3s;
}

/* Blue Accents */
[data-theme="blue"] {
    --primary: #47d1c3;
    --primary-dark: #36b2a5;
    --secondary: #ffdd44;
    --primary-rgb: 71, 209, 195;
    --border-color-accent: #b2ebf2;
}

/* Dark Mode (Structure Only) */
[data-mode="dark"] {
    --bg-body: #1a1a1a;
    --bg-card: #2d2d2d;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --border-color: #404040;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Specific adjustment for blue theme in dark mode if needed */
[data-mode="dark"][data-theme="blue"] {
    --border-color: #2a3a3a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    transition: background-color var(--trans-med);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: 0.5rem;
}

.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gap-4 {
    gap: 1rem;
}

.hidden {
    display: none;
}

/* Global Header Fix */
header {
    z-index: 1001 !important;
}

/* Bubble Design System */
.bubble-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    transition: transform var(--trans-fast), box-shadow var(--trans-fast);
}

.bubble-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
}

.bubble-btn {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: all var(--trans-fast);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bubble-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.bubble-btn.secondary {
    background: var(--secondary);
    color: #5d4037;
}

.bubble-input {
    width: 100%;
    padding: 14px 20px;
    border-radius: 16px;
    border: 2px solid var(--border-color);
    font-family: var(--font-main);
    font-size: 0.95rem;
    background: #f9f9f9;
    transition: all var(--trans-fast);
}

.bubble-input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 143, 163, 0.2);
}

/* Responsive Layout */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* PC Layout Fixes */
    /* Ensure flex containers wrap or adjust on smaller screens */
    .flex {
        flex-wrap: wrap;
    }

    /* Hide Sidebars on Mobile */
    aside {
        display: none;
    }

    /* Adjust Main Content width */
    main {
        width: 100%;
        margin-bottom: 80px;
        /* Space for bottom nav */
    }

    /* Mobile Header Adjustments */
    header .container {
        margin-top: 5px;
        /* Adjust header top margin */
    }

    /* Chat Mobile Fixes */
    .chat-container {
        height: calc(100vh - 180px) !important;
        /* Adjust for bottom nav */
        flex-direction: column;
    }

    .user-list {
        display: none;
        /* Hide user list on mobile for now to focus on chat */
    }

    .chat-area {
        width: 100%;
    }
}

/* PC Specific Fixes */
@media (min-width: 769px) {
    .flex {
        flex-wrap: nowrap;
        /* Prevent wrapping on PC for main layout */
    }

    .mobile-nav {
        display: none !important;
    }

    .hide-mobile {
        display: none !important;
    }

    #mobile-menu-trigger {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    /* Mobile media controls persistence */
    .player-controls {
        opacity: 0.8 !important;
    }
}

/* Mobile Bottom Navigation */
.mobile-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    width: 90%;
    max-width: 400px;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.mobile-nav a {
    color: var(--text-muted);
    padding: 5px;
    border-radius: 12px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.mobile-nav a small {
    font-size: 10px;
    font-weight: 700;
}

.mobile-nav a.active {
    color: var(--primary);
    background: rgba(255, 143, 163, 0.1);
}

.mobile-nav-fab {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 5px 20px rgba(255, 143, 163, 0.5);
    margin-top: -30px;
    /* Floating effect */
    border: 4px solid var(--bg-body);
}