/* ============================================
   MESAJLAŞMA UYGULAMASI — WhatsApp Tarzı Premium Tasarım
   ============================================ */

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

/* ─── CSS Variables ─── */
:root {
    /* WhatsApp Dark Theme Colors */
    --bg-primary: #0b141a;
    --bg-secondary: #111b21;
    --bg-tertiary: #202c33;
    --bg-chat: #0b141a;
    --bg-input: #2a3942;

    /* Message Bubbles */
    --msg-outgoing: #005c4b;
    --msg-outgoing-hover: #006d59;
    --msg-incoming: #202c33;
    --msg-incoming-hover: #263238;
    --msg-time: rgba(233, 237, 239, 0.65);
    --msg-read: #53bdeb;

    /* Accent / Brand */
    --accent: #00a884;
    --accent-light: #06cf9c;
    --accent-dark: #008f72;
    --accent-glow: rgba(0, 168, 132, 0.25);

    /* Text */
    --text-primary: #e9edef;
    --text-secondary: #8696a0;
    --text-tertiary: #667781;
    --text-accent: #00a884;

    /* Borders & Dividers */
    --border: rgba(134, 150, 160, 0.15);
    --border-light: rgba(134, 150, 160, 0.08);
    --divider: #222d34;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--accent-glow);

    /* Status */
    --online: #00a884;
    --offline: #667781;
    --unread: #00a884;

    /* Misc */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;
    --transition: 0.2s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    --bg-pattern-opacity: 0.03;
}

/* Light Theme Colors (Academic Site White & Royal Light Blue Style) */
[data-theme="light"] {
    --bg-primary: #f4f8ff;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eff6ff;
    --bg-chat: #f4f8ff;
    --bg-input: #ffffff;

    --msg-outgoing: #dbeafe;
    --msg-outgoing-hover: #bfdbfe;
    --msg-incoming: #ffffff;
    --msg-incoming-hover: #f1f5f9;
    --msg-time: #64748b;
    --msg-read: #3b82f6;

    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --accent-dark: #1d4ed8;
    --accent-glow: rgba(59, 130, 246, 0.2);

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --text-accent: #2563eb;

    --border: rgba(59, 130, 246, 0.15);
    --border-light: rgba(59, 130, 246, 0.08);
    --divider: #e2e8f0;

    --shadow-sm: 0 2px 8px rgba(59, 130, 246, 0.04);
    --shadow-md: 0 6px 20px rgba(59, 130, 246, 0.08);
    --shadow-lg: 0 12px 40px rgba(59, 130, 246, 0.12);
    
    --bg-pattern-opacity: 0.04;
}

[data-theme="light"] .auth-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.12);
}

[data-theme="light"] .sidebar-header,
[data-theme="light"] .chat-header {
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

[data-theme="light"] .search-container {
    background: #f4f8ff;
}

[data-theme="light"] .search-box {
    background: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.18);
}

[data-theme="light"] .chat-item:hover {
    background: rgba(219, 234, 254, 0.5);
    border-color: rgba(59, 130, 246, 0.2);
}

[data-theme="light"] .chat-item.active {
    background: linear-gradient(135deg, #ffffff 0%, #dbeafe 100%);
    border: 1px solid rgba(59, 130, 246, 0.25);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.1);
}

[data-theme="light"] .chat-item-avatar {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    border: 2px solid #ffffff;
}

[data-theme="light"] .date-separator span {
    background: rgba(219, 234, 254, 0.95);
    color: #1d4ed8;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

/* ─── Reset & Base ─── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow: hidden;
    height: 100dvh; /* Mobile fix */
    width: 100vw;
}

input, textarea, button, select {
    font-family: inherit;
    font-size: inherit;
}

/* ─── App Container ─── */
.app-container {
    width: 100%;
    height: 100dvh; /* Mobile fix */
    display: flex;
    position: relative;
    overflow: hidden;
}

/* ══════════════════════════════════════════════
   AUTH SCREEN
   ══════════════════════════════════════════════ */
.auth-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    z-index: 100;
    height: 100dvh; /* Mobile fix */
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.auth-screen.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.05);
}

.auth-bg-pattern {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0, 168, 132, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 168, 132, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(0, 168, 132, 0.03) 0%, transparent 50%);
    animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* iOS Install Prompt */
.ios-install-prompt {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    background: rgba(40, 42, 54, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    animation: slideDown 0.5s ease-out;
}

.ios-install-content {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ios-install-content strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 1rem;
}

.ios-install-content p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

.ios-install-close {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.auth-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 48px 40px;
    background: rgba(17, 27, 33, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(0, 168, 132, 0.08);
    animation: cardEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: var(--shadow-glow);
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { box-shadow: var(--shadow-glow); }
    50% { box-shadow: 0 0 30px rgba(0, 168, 132, 0.4); }
}

.auth-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.auth-logo p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Auth Steps */
.auth-step {
    display: none;
    animation: stepFadeIn 0.4s ease both;
}

.auth-step.active {
    display: block;
}

@keyframes stepFadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.auth-step h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.auth-step p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Phone Input */
.phone-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.country-code {
    width: 80px;
    padding: 14px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    text-align: center;
    transition: border-color var(--transition);
}

.country-code:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.phone-input {
    flex: 1;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: border-color var(--transition);
}

.phone-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.phone-input::placeholder {
    color: var(--text-tertiary);
}

/* OTP Input */
.otp-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 24px;
}

.otp-input {
    width: 52px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: all var(--transition);
    caret-color: var(--accent);
}

.otp-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    transform: scale(1.05);
}

.otp-input.filled {
    border-color: var(--accent);
    background: rgba(0, 168, 132, 0.08);
}

/* Name Input */
.name-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    transition: border-color var(--transition);
}

.name-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.name-input::placeholder {
    color: var(--text-tertiary);
}

/* Auth Buttons */
.auth-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.auth-btn:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.auth-btn .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

.auth-btn.loading .btn-text { display: none; }
.auth-btn.loading .spinner { display: block; }

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

.resend-link {
    text-align: center;
    margin-top: 16px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.resend-link a {
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    transition: color var(--transition);
}

.resend-link a:hover {
    color: var(--accent-light);
}

.back-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    cursor: pointer;
    margin-bottom: 16px;
    transition: color var(--transition);
}

.back-link:hover {
    color: var(--accent);
}

/* Auth Error */
.auth-error {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    margin-bottom: 16px;
    display: none;
    animation: shakeError 0.4s ease;
}

.auth-error.show {
    display: block;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* ══════════════════════════════════════════════
   SIDEBAR — Chat List
   ══════════════════════════════════════════════ */
.sidebar {
    width: 380px;
    min-width: 380px;
    height: 100%;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-slow);
    z-index: 10;
}

/* Sidebar Header */
.sidebar-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    min-height: 60px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.user-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-actions {
    display: flex;
    gap: 4px;
}

.sidebar-action-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all var(--transition);
}

.sidebar-action-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Search */
.search-container {
    padding: 8px 12px;
    background: var(--bg-secondary);
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    transition: background var(--transition);
}

.search-box:focus-within {
    background: var(--bg-tertiary);
}

.search-icon {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-right: 12px;
    transition: color var(--transition);
}

.search-box:focus-within .search-icon {
    color: var(--accent);
}

.search-input {
    flex: 1;
    padding: 10px 0;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.search-input:focus {
    outline: none;
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

/* Chat List */
.chat-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.chat-list::-webkit-scrollbar {
    width: 6px;
}

.chat-list::-webkit-scrollbar-track {
    background: transparent;
}

.chat-list::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    margin: 4px 8px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid transparent;
}

.chat-item:hover {
    background: rgba(245, 240, 232, 0.7);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(90, 75, 55, 0.04);
}

.chat-item.active {
    background: linear-gradient(135deg, #ffffff 0%, #f4efe6 100%);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 20px rgba(90, 75, 55, 0.07);
}

[data-theme="dark"] .chat-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .chat-item.active {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.chat-item-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e2dcd0, #d5cdbf);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.chat-item-avatar .online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 12px;
    height: 12px;
    background: var(--online);
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.chat-item-info {
    flex: 1;
    min-width: 0;
}

.chat-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.chat-item-name {
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.1px;
}

.chat-item-time {
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--text-tertiary);
    flex-shrink: 0;
    margin-left: 8px;
}

.chat-item-time.unread {
    color: var(--unread);
    font-weight: 700;
}

.chat-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-item-preview {
    font-size: 0.825rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.encrypted-msg-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #57534e;
    background: rgba(140, 115, 90, 0.08);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(140, 115, 90, 0.12);
}

[data-theme="dark"] .encrypted-msg-badge {
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-item-badge {
    width: 20px;
    height: 20px;
    background: var(--unread);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    margin-left: 8px;
    animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badgePop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* Empty State */
.empty-chats {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
    text-align: center;
}

.empty-chats-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-chats h3 {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 8px;
}

.empty-chats p {
    color: var(--text-tertiary);
    font-size: 0.82rem;
}

/* ══════════════════════════════════════════════
   CHAT PANEL — Main Chat Area
   ══════════════════════════════════════════════ */
.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    background: var(--bg-chat);
    position: relative;
}

/* Chat Background Pattern */
.chat-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: var(--bg-pattern-opacity, 0.03);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2300a884' fill-opacity='1'%3E%3Ccircle cx='7' cy='7' r='1'/%3E%3Ccircle cx='37' cy='37' r='1'/%3E%3Ccircle cx='7' cy='37' r='0.7'/%3E%3Ccircle cx='37' cy='7' r='0.7'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* Welcome Screen (no chat selected) */
/* Welcome Screen (no chat selected) */
.welcome-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    overflow: hidden;
    z-index: 1;
}

.welcome-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(244, 239, 230, 0.5));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 24px rgba(90, 75, 55, 0.05), inset 0 1px 0 #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    animation: floatWelcome 4s ease-in-out infinite;
}

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

.welcome-screen h2 {
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.welcome-screen p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    max-width: 420px;
    line-height: 1.5;
}

/* Ticker (Kristal Cam Efektli Kayan Yazı Duyuruları) */
.system-updates-ticker {
    margin-top: 16px;
    margin-bottom: 8px;
    width: 92%;
    max-width: 530px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    padding: 14px 16px;
    box-shadow: 0 12px 40px rgba(80, 65, 45, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
}

[data-theme="dark"] .system-updates-ticker {
    background: rgba(17, 27, 33, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.ticker-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(140, 115, 90, 0.1);
}

[data-theme="dark"] .ticker-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ticker-badge {
    font-size: 0.78rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

[data-theme="dark"] .ticker-badge {
    color: #f8fafc;
}

.ticker-content-wrap {
    width: 100%;
    height: 275px;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    mask-image: linear-gradient(to bottom, transparent 0%, black 14px, black calc(100% - 14px), transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 14px, black calc(100% - 14px), transparent 100%);
}

.ticker-scroll-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    animation: smoothVerticalMarquee 42s linear infinite;
}

.ticker-scroll-list:hover {
    animation-play-state: paused;
}

@keyframes smoothVerticalMarquee {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

.update-card {
    background: rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    box-shadow: 0 4px 16px rgba(80, 65, 45, 0.02), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
}

.update-card:hover {
    background: rgba(255, 255, 255, 0.52);
    border-color: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(80, 65, 45, 0.05);
}

[data-theme="dark"] .update-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .update-card:hover {
    background: rgba(255, 255, 255, 0.14);
}

.update-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
    width: 100%;
    box-sizing: border-box;
}

.update-card-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #0f172a;
    flex: 1;
    min-width: 0;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
}

[data-theme="dark"] .update-card-title {
    color: #f8fafc;
}

.update-card-date {
    font-size: 0.72rem;
    font-weight: 700;
    color: #1e293b;
    background: rgba(15, 23, 42, 0.07);
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    font-family: monospace;
    flex-shrink: 0;
    margin-top: 1px;
}

[data-theme="dark"] .update-card-date {
    color: #f8fafc;
    background: rgba(248, 250, 252, 0.1);
    border: 1px solid rgba(248, 250, 252, 0.2);
}

.update-card-desc {
    font-size: 0.8rem;
    color: #334155;
    line-height: 1.45;
    font-weight: 500;
    white-space: normal;
    word-break: break-word;
    width: 100%;
    box-sizing: border-box;
}

[data-theme="dark"] .update-card-desc {
    color: #cbd5e1;
}

/* Chat Header */
.chat-header {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    min-height: 60px;
    z-index: 2;
    position: relative;
}

.chat-header-back {
    display: none;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all var(--transition);
}

.chat-header-back:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.chat-header-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #1a3a4a, #264653);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
}

.chat-header-info {
    flex: 1;
    min-width: 0;
}

.chat-header-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-header-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.chat-header-status.online {
    color: var(--accent);
}

.chat-header-delete-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all var(--transition);
    flex-shrink: 0;
    margin-left: auto;
}

.chat-header-delete-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Messages Area */
.messages-area {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 60px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    z-index: 1;
}

.messages-area::-webkit-scrollbar {
    width: 6px;
}

.messages-area::-webkit-scrollbar-track {
    background: transparent;
}

.messages-area::-webkit-scrollbar-thumb {
    background: rgba(134, 150, 160, 0.2);
    border-radius: 3px;
}

/* Date Separator */
.date-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px 0;
}

.date-separator span {
    background: rgba(17, 27, 33, 0.9);
    color: var(--text-secondary);
    font-size: 0.72rem;
    padding: 5px 14px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
}

/* Message Bubble */
.message {
    max-width: 65%;
    padding: 8px 12px 6px;
    border-radius: var(--radius-sm);
    position: relative;
    animation: msgSlideIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@keyframes msgSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message.outgoing {
    align-self: flex-end;
    background: var(--msg-outgoing);
    border-bottom-right-radius: 4px;
}

.message.incoming {
    align-self: flex-start;
    background: var(--msg-incoming);
    border-bottom-left-radius: 4px;
}

.message-text {
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.message-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 2px;
}

.message-time {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--msg-time, rgba(233, 237, 239, 0.65));
}

.message-status {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--msg-time, rgba(233, 237, 239, 0.65));
}

.message-status.read {
    color: var(--msg-read, #0284c7);
    font-weight: 700;
}

/* ══════════════════════════════════════════════
   MESSAGE INPUT AREA
   ══════════════════════════════════════════════ */
.input-area {
    padding: 8px 16px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    z-index: 2;
    position: relative;
}

.emoji-toggle-btn {
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    transition: all var(--transition);
    flex-shrink: 0;
}

.emoji-toggle-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.emoji-toggle-btn.active {
    color: var(--accent);
}

.message-input-wrapper {
    flex: 1;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: flex-end;
    min-height: 42px;
    max-height: 120px;
    transition: background var(--transition);
}

.message-input-wrapper:focus-within {
    background: var(--bg-tertiary);
}

.message-input {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    resize: none;
    min-height: 42px;
    max-height: 120px;
    line-height: 1.4;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.message-input:focus {
    outline: none;
}

.message-input::placeholder {
    color: var(--text-tertiary);
}

.send-btn {
    width: 42px;
    height: 42px;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.send-btn:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    box-shadow: var(--shadow-glow);
    transform: scale(1.08);
}

.send-btn:active {
    transform: scale(0.95);
}

/* ══════════════════════════════════════════════
   EMOJI PICKER
   ══════════════════════════════════════════════ */
.emoji-picker {
    position: absolute;
    bottom: 66px;
    left: 16px;
    width: 340px;
    height: 380px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    z-index: 20;
    animation: emojiPickerIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.emoji-picker.open {
    display: flex;
}

@keyframes emojiPickerIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.emoji-picker-header {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
}

.emoji-search {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-input);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.82rem;
}

.emoji-search:focus {
    outline: none;
    background: var(--bg-tertiary);
}

.emoji-search::placeholder {
    color: var(--text-tertiary);
}

.emoji-categories {
    display: flex;
    padding: 6px 8px;
    gap: 2px;
    border-bottom: 1px solid var(--border-light);
    overflow-x: auto;
}

.emoji-categories::-webkit-scrollbar {
    display: none;
}

.emoji-cat-btn {
    padding: 6px 8px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    flex-shrink: 0;
}

.emoji-cat-btn:hover {
    background: var(--bg-tertiary);
}

.emoji-cat-btn.active {
    background: var(--bg-tertiary);
    color: var(--accent);
}

.emoji-grid {
    flex: 1;
    padding: 8px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    align-content: start;
}

.emoji-grid::-webkit-scrollbar {
    width: 4px;
}

.emoji-grid::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 2px;
}

.emoji-item {
    width: 100%;
    aspect-ratio: 1;
    border: none;
    background: transparent;
    font-size: 1.35rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-item:hover {
    background: var(--bg-tertiary);
    transform: scale(1.2);
}

/* ══════════════════════════════════════════════
   NEW CHAT MODAL
   ══════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: overlayFadeIn 0.2s ease;
}

.modal-overlay.open {
    display: flex;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    width: 90%;
    max-width: 440px;
    max-height: 80vh;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.modal-close-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all var(--transition);
}

.modal-close-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-search {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-light);
}

.modal-search input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.modal-search input:focus {
    outline: none;
    background: var(--bg-tertiary);
}

.modal-search input::placeholder {
    color: var(--text-tertiary);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0;
}

.modal-body::-webkit-scrollbar {
    width: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 2px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background var(--transition);
    position: relative;
}

.contact-item:hover {
    background: var(--bg-tertiary);
}

.delete-contact-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item:hover .delete-contact-btn {
    opacity: 1;
    visibility: visible;
}

.delete-contact-btn:hover {
    background: #ef4444;
    color: white;
}

.contact-avatar {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #1a3a4a, #264653);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
}

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

.contact-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.contact-phone {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Add Contact Section */
.add-contact-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.add-contact-section h4 {
    font-size: 0.82rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.add-contact-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.add-contact-form input {
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: border-color var(--transition);
}

.add-contact-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.add-contact-form input::placeholder {
    color: var(--text-tertiary);
}

.add-contact-btn {
    padding: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.add-contact-btn:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    box-shadow: var(--shadow-glow);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
    box-shadow: var(--shadow-md);
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1),
               toastOut 0.3s ease 2.7s forwards;
    max-width: 360px;
}

.toast.success {
    background: var(--accent);
}

.toast.error {
    background: #dc2626;
}

.toast.info {
    background: #2563eb;
}

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

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
}

/* Profile/Settings Modal */
.profile-modal {
    padding: 24px;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.profile-info {
    text-align: center;
    margin-bottom: 24px;
}

.profile-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.logout-btn {
    width: 100%;
    padding: 12px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #ef4444;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.logout-btn:hover {
    background: rgba(220, 38, 38, 0.2);
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .sidebar {
        position: absolute;
        inset: 0;
        width: 100%;
        min-width: unset;
        transform: translateX(0);
        z-index: 10;
    }

    .sidebar.hidden-mobile {
        transform: translateX(-100%);
    }

    .chat-panel {
        position: absolute;
        inset: 0;
        z-index: 5;
    }

    .chat-panel.active-mobile {
        z-index: 15;
    }

    .chat-header-back {
        display: flex;
    }

    .messages-area {
        padding: 12px 16px;
    }

    .message {
        max-width: 85%;
    }

    .emoji-picker {
        width: calc(100% - 32px);
        left: 16px;
        right: 16px;
    }

    .welcome-screen {
        display: none;
    }
}

@media (max-width: 480px) {
    .auth-card {
        margin: 16px;
        padding: 32px 24px;
    }

    .otp-input {
        width: 44px;
        height: 52px;
        font-size: 1.3rem;
    }

    .emoji-picker {
        height: 320px;
    }

    .emoji-grid {
        grid-template-columns: repeat(7, 1fr);
    }
}

/* ─── Utility / Animations ─── */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.3s ease both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 12px 16px;
    background: var(--msg-incoming);
    border-radius: var(--radius-sm);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    max-width: 80px;
}

.typing-dot {
    width: 7px;
    height: 7px;
    background: var(--text-secondary);
    border-radius: var(--radius-full);
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* ══════════════════════════════════════════════
   ANA EKRANA EKLEME BANNERLARI (iOS & Android)
   ══════════════════════════════════════════════ */

/* iOS Alt Banner */
.ios-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(17, 27, 33, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 9999;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.4s ease;
    pointer-events: none;
}

.ios-install-banner.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.ios-install-banner .ios-install-content {
    position: relative;
    text-align: center;
}

.ios-install-banner .ios-install-content p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

.ios-install-banner .ios-install-content p strong {
    color: var(--text-primary);
}

.ios-install-banner .ios-install-close {
    position: absolute;
    top: -4px;
    right: -4px;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-full);
    transition: all var(--transition);
}

.ios-install-banner .ios-install-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Android / Chrome Install Banner */
.android-install-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    padding: 14px 28px;
    border-radius: var(--radius-xl);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    z-index: 9999;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.4s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    border: none;
}

.android-install-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.android-install-banner:hover {
    box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 168, 132, 0.5);
}

.android-install-banner .install-dismiss {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 4px;
    transition: background var(--transition);
}

.android-install-banner .install-dismiss:hover {
    background: rgba(255, 255, 255, 0.4);
}
