/* =========================================================
   TEMA+ (theme-plus.css)
   Yalnızca html[data-theme="dark"] altında çalışır; beyaz mod
   hiçbir kuraldan etkilenmez.
   ========================================================= */

html[data-theme="dark"] {
    --bg-primary: #0f0f14;
    --bg-secondary: #17171f;
    --text-primary: #f2f3f7;
    --text-secondary: #a9afbe;
    --border-color: #2a2b35;
    --accent-color: #6c8cff;
    --sidebar-bg: #121219;
    --card-bg: #1a1a23;
    --glass-bg: rgba(15, 15, 20, 0.92);
    --input-bg: #22222d;
    --shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
    background: #0f0f14;
}

html[data-theme="dark"] body {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .main-content,
html[data-theme="dark"] .content-area,
html[data-theme="dark"] .page,
html[data-theme="dark"] #app {
    background: var(--bg-primary) !important;
    color: var(--text-primary);
}

html[data-theme="dark"] .sidebar {
    border-right: 1px solid var(--border-color);
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] header,
html[data-theme="dark"] .mobile-topbar {
    background: var(--glass-bg) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary);
}

/* Kartlar, listeler, paneller */
html[data-theme="dark"] .card,
html[data-theme="dark"] .post-card,
html[data-theme="dark"] .feed-post,
html[data-theme="dark"] .story-card,
html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .settings-content-area,
html[data-theme="dark"] .settings-nav,
html[data-theme="dark"] .notifications-shell,
html[data-theme="dark"] .notifications-container,
html[data-theme="dark"] .notification-item,
html[data-theme="dark"] .chat-sidebar,
html[data-theme="dark"] .chat-area,
html[data-theme="dark"] .chat-header,
html[data-theme="dark"] .chat-messages,
html[data-theme="dark"] .user-search-container,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-box,
html[data-theme="dark"] .ui-dialog,
html[data-theme="dark"] .profile-info-card,
html[data-theme="dark"] .profile-tabs,
html[data-theme="dark"] .invest-panel,
html[data-theme="dark"] .vi-panel {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html[data-theme="dark"] .settings-nav-item,
html[data-theme="dark"] .menu-item,
html[data-theme="dark"] .chat-item,
html[data-theme="dark"] .notification-item {
    color: var(--text-primary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .settings-nav-item:hover,
html[data-theme="dark"] .menu-item:hover,
html[data-theme="dark"] .chat-item:hover,
html[data-theme="dark"] .settings-nav-item.active {
    background: rgba(108, 140, 255, 0.14) !important;
}

html[data-theme="dark"] .sidebar .menu-item.active,
html[data-theme="dark"] .sidebar .menu-item.active .text {
    background: rgba(108, 140, 255, 0.18) !important;
    color: #fff !important;
}

/* Form alanları */
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .chat-input-area,
html[data-theme="dark"] .chat-text-input,
html[data-theme="dark"] .comment-input,
html[data-theme="dark"] .search-input {
    background: var(--input-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #7d8394 !important;
}

html[data-theme="dark"] .setting-item,
html[data-theme="dark"] .setting-description,
html[data-theme="dark"] .settings-item-subtitle,
html[data-theme="dark"] .notification-time,
html[data-theme="dark"] .chat-time,
html[data-theme="dark"] .last-message {
    color: var(--text-secondary) !important;
}

/* Açılır menüler */
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .context-menu,
html[data-theme="dark"] .chat-row-menu,
html[data-theme="dark"] .custom-select-options,
html[data-theme="dark"] .search-results {
    background: #1c1c26 !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-hover);
}

html[data-theme="dark"] .dropdown-menu *,
html[data-theme="dark"] .context-menu *,
html[data-theme="dark"] .chat-row-menu * {
    color: var(--text-primary) !important;
}

/* Mesaj balonları */
html[data-theme="dark"] .message.received,
html[data-theme="dark"] .chat-message.received {
    background: #252533 !important;
    color: var(--text-primary) !important;
}

html[data-theme="dark"] .message.sent,
html[data-theme="dark"] .chat-message.sent {
    background: linear-gradient(135deg, #4f6bdd, #7b5cff) !important;
    color: #fff !important;
}

/* Reels / video yüzeyleri */
html[data-theme="dark"] .reels-page,
html[data-theme="dark"] .reels-container,
html[data-theme="dark"] .video-card {
    background: #050508 !important;
}

/* Profil */
html[data-theme="dark"] .profile-cover {
    border-color: var(--border-color) !important;
}

html[data-theme="dark"] #display-username,
html[data-theme="dark"] .profile-username {
    color: var(--text-primary) !important;
}

html[data-theme="dark"] .profile-tab {
    color: var(--text-secondary) !important;
}

/* Bildirimler */
html[data-theme="dark"] .notifications-hero {
    background: linear-gradient(135deg, #1d2547, #241a3f) !important;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

html[data-theme="dark"] .notif-chip {
    background: var(--input-bg) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
}

html[data-theme="dark"] .notif-chip.active {
    background: rgba(108, 140, 255, 0.22) !important;
    color: #fff !important;
}

html[data-theme="dark"] .notification-item.unread,
html[data-theme="dark"] .notification-item:not(.read) {
    background: rgba(108, 140, 255, 0.08) !important;
}

/* Ayarlar: Accounts Center gibi sabit beyaz paneller */
html[data-theme="dark"] #settings-accounts-center,
html[data-theme="dark"] #settings-accounts-center > div,
html[data-theme="dark"] .acc-hero,
html[data-theme="dark"] .settings-pane-header {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html[data-theme="dark"] #settings-accounts-center h3,
html[data-theme="dark"] #settings-accounts-center h4,
html[data-theme="dark"] #settings-accounts-center strong,
html[data-theme="dark"] #settings-accounts-center p,
html[data-theme="dark"] #settings-accounts-center span,
html[data-theme="dark"] #settings-accounts-center div {
    border-color: var(--border-color);
}

/* Alt menü (mobil) */
html[data-theme="dark"] .mshell-nav,
html[data-theme="dark"] .mobile-nav,
html[data-theme="dark"] .mshell-bottom-nav {
    background: rgba(16, 16, 22, 0.96) !important;
    border-top: 1px solid var(--border-color);
}

html[data-theme="dark"] .mshell-item,
html[data-theme="dark"] .mobile-nav-item {
    color: var(--text-secondary) !important;
}

html[data-theme="dark"] .mshell-item.active,
html[data-theme="dark"] .mobile-nav-item.active {
    color: var(--accent-color) !important;
}

/* Hızlı tema seçici (Ayarlar) */
.theme-quick {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.theme-quick button {
    flex: 1 1 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-color, #dee2e6);
    background: var(--bg-secondary, #f8f9fa);
    color: var(--text-primary, #212529);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.theme-quick button:hover {
    transform: translateY(-1px);
    border-color: var(--accent-color, #4361ee);
}

.theme-quick button.is-active {
    border-color: var(--accent-color, #4361ee);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.18);
}

.theme-quick button.is-active i {
    color: #f5b301;
}

html[data-theme="dark"] .theme-quick button {
    background: #22222d;
    color: #f2f3f7;
    border-color: #343541;
}

html[data-theme="dark"] .theme-quick button.is-active {
    background: rgba(108, 140, 255, 0.2);
    border-color: #6c8cff;
}
