/* Theme System - Dark and Light Mode Variables */

/* Dark Theme (Default) */
:root {
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --bg-dark: #0a0a14;
    --text-primary: #e0e0e0;
    --text-secondary: #9ca3af;
    --border: #2d2d44;
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    --code-bg: #1e1e3f;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f3f4f6;
    --bg-card: #ffffff;
    --bg-dark: #e5e7eb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --primary-color: #4f46e5;
    --secondary-color: #7c3aed;
    --accent-color: #059669;
    --danger-color: #dc2626;
    --warning-color: #d97706;
    --success-color: #059669;
    --code-bg: #f9fafb;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-right: 1rem;
}

.theme-toggle-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(180deg);
}

.theme-icon-dark,
.theme-icon-light {
    transition: opacity 0.3s ease;
}

/* Smooth transitions for theme changes */
body,
.navbar,
.hero,
.stats-grid,
.projects-grid,
.project-card,
.footer,
.dashboard-container,
.stat-card,
.quick-actions,
.recent-activity,
.comments-section,
.comment-card,
.search-autocomplete,
.messages-main,
.conversations-sidebar,
input,
textarea,
button,
.btn,
.modal-content {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Light theme specific overrides */
[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

[data-theme="light"] .project-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .project-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .stat-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .comment-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] code {
    background: var(--code-bg);
    border: 1px solid var(--border);
}

[data-theme="light"] pre {
    background: var(--code-bg) !important;
    border: 1px solid var(--border);
}

[data-theme="light"] .hljs {
    background: var(--code-bg) !important;
    color: var(--text-primary) !important;
}

/* Light theme code highlighting adjustments */
[data-theme="light"] .hljs-keyword,
[data-theme="light"] .hljs-selector-tag,
[data-theme="light"] .hljs-built_in {
    color: #7c3aed;
}

[data-theme="light"] .hljs-string,
[data-theme="light"] .hljs-title {
    color: #059669;
}

[data-theme="light"] .hljs-comment {
    color: #6b7280;
}

[data-theme="light"] .hljs-number,
[data-theme="light"] .hljs-literal {
    color: #d97706;
}

/* Light theme interactive background */
[data-theme="light"] #interactive-bg {
    opacity: 0.3;
}

/* Light theme scrollbar */
[data-theme="light"] ::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: var(--border);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .theme-toggle-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        margin-right: 0.5rem;
    }
}
