/**
 * Dark Theme Styles
 */

body.dark-theme {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --card-bg: #1e293b;
    --input-bg: #334155;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

body.dark-theme {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* App Container */
body.dark-theme .app-container {
    background: var(--bg-primary);
}

/* Navigation */
body.dark-theme .bottom-nav {
    background: var(--bg-secondary);
    border-top-color: var(--border-color);
}

body.dark-theme .nav-item span {
    color: var(--text-muted);
}

body.dark-theme .nav-item.active span {
    color: #667eea;
}

/* Cards */
body.dark-theme .encounter-card,
body.dark-theme .like-card,
body.dark-theme .match-card,
body.dark-theme .message-item {
    background: var(--card-bg);
}

/* Settings Page */
body.dark-theme .settings-page {
    background: var(--bg-primary);
}

body.dark-theme .settings-list {
    background: var(--bg-secondary);
}

body.dark-theme .settings-item {
    border-bottom-color: var(--border-color);
}

body.dark-theme .settings-item .item-text {
    color: var(--text-primary);
}

body.dark-theme .settings-section-title {
    color: var(--text-secondary);
}

body.dark-theme .settings-header h2 {
    color: var(--text-primary);
}

/* Modals */
body.dark-theme .profile-modal,
body.dark-theme .edit-modal-content {
    background: var(--bg-primary);
}

body.dark-theme .profile-modal .modal-content {
    background: var(--bg-primary);
}

body.dark-theme .profile-modal .modal-header span,
body.dark-theme .profile-modal .back-btn i {
    color: var(--text-primary);
}

body.dark-theme .profile-modal .info-section {
    background: var(--bg-secondary);
}

body.dark-theme .profile-modal .info-section h3 {
    color: var(--text-primary);
}

body.dark-theme .profile-modal .info-section p,
body.dark-theme .profile-modal .label {
    color: var(--text-secondary);
}

body.dark-theme .profile-modal .value {
    color: var(--text-primary);
}

body.dark-theme .profile-modal .modal-actions {
    background: var(--bg-secondary);
    border-top-color: var(--border-color);
}

/* Edit Modal */
body.dark-theme .edit-modal-content {
    background: var(--bg-secondary);
}

body.dark-theme .edit-header {
    border-bottom-color: var(--border-color);
}

body.dark-theme .edit-header h3 {
    color: var(--text-primary);
}

body.dark-theme .edit-input {
    background: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-theme .edit-input:focus {
    border-color: #667eea;
}

/* Profile Page */
body.dark-theme .profile-section {
    background: var(--bg-secondary);
}

body.dark-theme .profile-name {
    color: var(--text-primary);
}

body.dark-theme .profile-location {
    color: var(--text-secondary);
}

/* Messages */
body.dark-theme .chat-header {
    background: var(--bg-secondary);
    border-bottom-color: var(--border-color);
}

body.dark-theme .chat-header .user-name {
    color: var(--text-primary);
}

body.dark-theme .message-input-area {
    background: var(--bg-secondary);
    border-top-color: var(--border-color);
}

body.dark-theme .message-input {
    background: var(--input-bg);
    color: var(--text-primary);
}

body.dark-theme .message-bubble.other {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Forms */
body.dark-theme input,
body.dark-theme select,
body.dark-theme textarea {
    background: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Headers */
body.dark-theme .page-header,
body.dark-theme .section-header {
    color: var(--text-primary);
}

/* Scrollbar */
body.dark-theme ::-webkit-scrollbar {
    width: 8px;
}

body.dark-theme ::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

body.dark-theme ::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

/* ============================================
   LIKES PAGE - Who Liked Me / My Likes
   ============================================ */
body.dark-theme .likes-page,
body.dark-theme .likes-container,
body.dark-theme #likesPage {
    background: var(--bg-primary) !important;
}

body.dark-theme .likes-page h1,
body.dark-theme .likes-page h2,
body.dark-theme .likes-page h3,
body.dark-theme .likes-header,
body.dark-theme .section-title {
    color: var(--text-primary) !important;
}

body.dark-theme .likes-grid,
body.dark-theme .likes-list {
    background: var(--bg-primary);
}

body.dark-theme .like-card {
    background: var(--card-bg) !important;
    border-color: var(--border-color);
}

body.dark-theme .like-card .user-name,
body.dark-theme .like-card h3,
body.dark-theme .like-card .name {
    color: var(--text-primary) !important;
}

body.dark-theme .like-card .user-info,
body.dark-theme .like-card .age,
body.dark-theme .like-card .location {
    color: var(--text-secondary) !important;
}

body.dark-theme .likes-tabs,
body.dark-theme .tab-buttons {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

body.dark-theme .tab-btn,
body.dark-theme .likes-tab {
    color: var(--text-secondary);
    background: transparent;
}

body.dark-theme .tab-btn.active,
body.dark-theme .likes-tab.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

/* ============================================
   MATCHES PAGE
   ============================================ */
body.dark-theme .matches-page,
body.dark-theme .matches-container,
body.dark-theme #matchesPage {
    background: var(--bg-primary) !important;
}

body.dark-theme .matches-page h1,
body.dark-theme .matches-page h2,
body.dark-theme .matches-header {
    color: var(--text-primary) !important;
}

body.dark-theme .match-card {
    background: var(--card-bg) !important;
    border-color: var(--border-color);
}

body.dark-theme .match-card .user-name,
body.dark-theme .match-card h3,
body.dark-theme .match-card .name {
    color: var(--text-primary) !important;
}

body.dark-theme .match-card .match-time,
body.dark-theme .match-card .last-message {
    color: var(--text-secondary) !important;
}

body.dark-theme .matches-grid {
    background: var(--bg-primary);
}

/* ============================================
   MESSAGES PAGE
   ============================================ */
body.dark-theme .messages-page,
body.dark-theme .messages-container,
body.dark-theme #messagesPage,
body.dark-theme .chat-page {
    background: var(--bg-primary) !important;
}

body.dark-theme .messages-page h1,
body.dark-theme .messages-page h2,
body.dark-theme .messages-header {
    color: var(--text-primary) !important;
}

body.dark-theme .message-item,
body.dark-theme .conversation-item {
    background: var(--card-bg) !important;
    border-color: var(--border-color);
}

body.dark-theme .message-item .user-name,
body.dark-theme .conversation-item .name {
    color: var(--text-primary) !important;
}

body.dark-theme .message-item .last-message,
body.dark-theme .message-item .time,
body.dark-theme .conversation-item .preview {
    color: var(--text-secondary) !important;
}

body.dark-theme .messages-list {
    background: var(--bg-primary);
}

/* Chat View */
body.dark-theme .chat-view,
body.dark-theme .chat-container {
    background: var(--bg-primary) !important;
}

body.dark-theme .chat-messages {
    background: var(--bg-primary);
}

body.dark-theme .message-bubble {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

body.dark-theme .message-bubble.sent,
body.dark-theme .message-bubble.mine {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

body.dark-theme .message-bubble.received,
body.dark-theme .message-bubble.other {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

body.dark-theme .message-time {
    color: var(--text-muted);
}

/* ============================================
   DISCOVER PAGE
   ============================================ */
body.dark-theme .discover-page,
body.dark-theme #discoverPage {
    background: var(--bg-primary) !important;
}

body.dark-theme .encounter-card {
    background: var(--card-bg) !important;
}

body.dark-theme .card-info .user-name {
    color: var(--text-primary);
}

body.dark-theme .filter-section {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

/* ============================================
   PROFILE PAGE
   ============================================ */
body.dark-theme .profile-page,
body.dark-theme #profilePage {
    background: var(--bg-primary) !important;
}

body.dark-theme .profile-card {
    background: var(--card-bg);
}

body.dark-theme .profile-stats {
    background: var(--bg-secondary);
}

body.dark-theme .stat-value {
    color: var(--text-primary);
}

body.dark-theme .stat-label {
    color: var(--text-secondary);
}

body.dark-theme .profile-actions .btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* ============================================
   GENERAL PAGE BACKGROUNDS
   ============================================ */
body.dark-theme .page-content,
body.dark-theme .main-content,
body.dark-theme .content-area {
    background: var(--bg-primary) !important;
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6 {
    color: var(--text-primary);
}

body.dark-theme p,
body.dark-theme span,
body.dark-theme label {
    color: var(--text-secondary);
}

body.dark-theme .empty-state,
body.dark-theme .no-data,
body.dark-theme .placeholder-text {
    color: var(--text-muted);
}

/* Buttons */
body.dark-theme .btn-secondary,
body.dark-theme .btn-outline {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.dark-theme .btn-secondary:hover,
body.dark-theme .btn-outline:hover {
    background: var(--bg-secondary);
}

/* Icons in dark mode */
body.dark-theme .nav-item i,
body.dark-theme .back-btn i,
body.dark-theme .icon {
    color: var(--text-secondary);
}

body.dark-theme .nav-item.active i {
    color: #667eea;
}