/* --- Imports --- */
@import url('/css/modules/animations.css');
@import url('/css/modules/auth.css');
@import url('/css/modules/chat-list.css');
@import url('/css/modules/chat-view.css');
@import url('/css/modules/settings.css');
@import url('/css/modules/bottom-nav.css');
@import url('/css/modules/social.css');

/* --- Global Variables --- */
:root {
    --primary: #9b51e0;
    --primary-light: #f3ebfc;
    --primary-dark: #7e3eb8;
    --bg-color: #ffffff;
    --bg-settings: #f8f9fc;
    --app-shell-bg: #e5e7eb;
    --card-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-color: #f3f4f6;
    --surface-soft: #f3f4f6;
    --surface-strong: #ffffff;
    --message-incoming-bg: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.78);
    --glass-border: rgba(255, 255, 255, 0.6);
    --nav-track: rgba(17, 24, 39, 0.06);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.12);
    --online: #10b981;
    --offline: #9ca3af;
    --app-max-width: 414px;
}

body.dark-mode {
    --bg-color: #111c31;
    --bg-settings: #0f1a2e;
    --app-shell-bg: #020617;
    --card-bg: #18243b;
    --text-main: #f3f4f6;
    --text-muted: #cbd5e1;
    --border-color: #2b3a56;
    --surface-soft: #22314b;
    --surface-strong: #18243b;
    --message-incoming-bg: #1a2941;
    --glass-bg: rgba(15, 23, 42, 0.72);
    --glass-border: rgba(148, 163, 184, 0.34);
    --nav-track: rgba(255, 255, 255, 0.08);
    --shadow-soft: 0 10px 30px rgba(2, 6, 23, 0.45);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    min-height: 100dvh;
    color: var(--text-main);
    transition: background-color 0.25s ease, color 0.25s ease;
}

#app-container {
    width: 100vw;
    height: 100dvh;
    background: var(--bg-color);
    position: relative;
    overflow: hidden;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

#view-root {
    height: 100%;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.avatar {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--primary-light);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    font-weight: 600;
}

.status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bg-color);
}
.status.online { background-color: var(--online); }

.purple-text { color: var(--primary) !important; }

/* --- Additional Utilities --- */
.disabled-item {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Toast Notification Popup */
.toast {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--text-main);
    color: var(--bg-color);
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}