/* Theme Toggle Styles */
.theme-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    background: #f0f0f0;
    border-radius: 30px;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.theme-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.theme-toggle-slider i {
    color: white;
    font-size: 12px;
    transition: opacity 0.3s ease;
}

.theme-toggle.dark {
    background: #2d3748;
    border-color: #4a5568;
}

.theme-toggle.dark .theme-toggle-slider {
    transform: translateX(30px);
    background: linear-gradient(135deg, #ffd89b, #19547b);
}

.theme-toggle.dark .theme-toggle-slider .fa-sun {
    opacity: 0;
}

.theme-toggle:not(.dark) .theme-toggle-slider .fa-moon {
    opacity: 0;
}

/* Theme Toggle Position in Header */
.theme-toggle-container {
    display: flex;
    align-items: center;
    margin-left: auto;
}

/* Dark Mode Variables */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-tertiary: #6b7280;
    --border-primary: #e5e7eb;
    --border-secondary: #d1d5db;
    --accent-primary: #4f46e5;
    --accent-secondary: #7c3aed;
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-heavy: rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #404040;
    --text-primary: #f3f4f6;
    --text-secondary: #e5e7eb;
    --text-tertiary: #d1d5db;
    --border-primary: #404040;
    --border-secondary: #4b5563;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --shadow-light: rgba(0, 0, 0, 0.2);
    --shadow-medium: rgba(0, 0, 0, 0.3);
    --shadow-heavy: rgba(0, 0, 0, 0.4);
}

/* Dark Mode Base Styles */
[data-theme="dark"] body {
    background-color: var(--bg-primary);
    color: #ffffff;
}

[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: #ffffff;
}

[data-theme="dark"] p, [data-theme="dark"] span, [data-theme="dark"] div {
    color: #e5e7eb;
}

[data-theme="dark"] .text-primary {
    color: #ffffff !important;
}

[data-theme="dark"] .text-secondary {
    color: #e5e7eb !important;
}

[data-theme="dark"] header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
}

[data-theme="dark"] .logo {
    color: #ffffff;
}

[data-theme="dark"] .nav-links a {
    color: #e5e7eb;
}

[data-theme="dark"] .nav-links a:hover {
    color: var(--accent-primary);
}

/* Active navigation menu in dark mode */
[data-theme="dark"] .nav-links a.active {
    background-color: rgba(99, 102, 241, 0.2);
    color: #ffffff;
    font-weight: 600;
}

[data-theme="dark"] .nav-links a.active::after {
    background-color: var(--accent-primary);
}

/* Footer - White text in both modes */
.footer-section h3 {
    color: #ffffff !important;
}

.footer-section p,
.footer-section ul li {
    color: #ffffff !important;
}

.footer-section a {
    color: #ffffff !important;
}

.footer-section a:hover {
    color: var(--accent-primary);
}

.footer-bottom p {
    color: #ffffff !important;
}

[data-theme="dark"] footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
}

[data-theme="dark"] .footer-section h3 {
    color: #ffffff;
}

[data-theme="dark"] .footer-section p,
[data-theme="dark"] .footer-section ul li {
    color: #e5e7eb;
}

[data-theme="dark"] .footer-section a {
    color: #e5e7eb;
}

[data-theme="dark"] .footer-section a:hover {
    color: var(--accent-primary);
}

/* Dark Mode Card Styles */
[data-theme="dark"] .card,
[data-theme="dark"] .article-card,
[data-theme="dark"] .news-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    box-shadow: 0 4px 6px var(--shadow-light);
}

/* Latest Articles Section - Black background in dark mode */
[data-theme="dark"] .latest-articles {
    background-color: #1a1a1a !important;
}

[data-theme="dark"] .latest-articles .section-title h2 {
    color: #ffffff;
}

[data-theme="dark"] .latest-articles .section-title p {
    color: #e5e7eb;
}

[data-theme="dark"] .card h3,
[data-theme="dark"] .article-card h3,
[data-theme="dark"] .news-card h3 {
    color: #ffffff;
}

[data-theme="dark"] .card p,
[data-theme="dark"] .article-card p,
[data-theme="dark"] .news-card p {
    color: #e5e7eb;
}

/* Dark Mode Form Styles */
[data-theme="dark"] .form-control {
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-primary);
    color: #ffffff;
}

[data-theme="dark"] .form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .form-label {
    color: #ffffff;
}

[data-theme="dark"] .form-help {
    color: #d1d5db;
}

/* Dark Mode Button Styles */
[data-theme="dark"] .btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

[data-theme="dark"] .btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

[data-theme="dark"] .btn-secondary:hover {
    background: var(--bg-primary);
    border-color: var(--border-secondary);
}

/* Dark Mode Alert Styles */
[data-theme="dark"] .alert-success {
    background: #065f46;
    border: 1px solid #047857;
    color: #d1fae5;
}

[data-theme="dark"] .alert-danger {
    background: #7f1d1d;
    border: 1px solid #991b1b;
    color: #fecaca;
}

[data-theme="dark"] .alert-warning {
    background: #78350f;
    border: 1px solid #92400e;
    color: #fef3c7;
}

/* Dark Mode Auth Pages */
[data-theme="dark"] .auth-container {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
}

[data-theme="dark"] .auth-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    box-shadow: 0 20px 40px var(--shadow-heavy);
}

[data-theme="dark"] .auth-header {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid var(--border-primary);
}

[data-theme="dark"] .auth-title {
    color: #ffffff;
}

[data-theme="dark"] .auth-subtitle {
    color: #e5e7eb;
}

[data-theme="dark"] .auth-footer {
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-primary);
}

[data-theme="dark"] .back-to-login {
    color: #e5e7eb;
}

[data-theme="dark"] .back-to-login a {
    color: var(--accent-primary);
}

[data-theme="dark"] .back-to-login a:hover {
    color: var(--accent-secondary);
}

/* Dark Mode Success Page */
[data-theme="dark"] .success-icon i {
    color: #34d399;
}

[data-theme="dark"] .success-message h3 {
    color: #ffffff;
}

[data-theme="dark"] .success-message p {
    color: #e5e7eb;
}

[data-theme="dark"] .email-tips {
    background: #064e3b;
    border-left: 4px solid #10b981;
}

[data-theme="dark"] .email-info {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
}

[data-theme="dark"] .timer-section {
    background: #451a03;
    border: 1px solid #92400e;
}

[data-theme="dark"] .timer-text {
    color: #fef3c7;
}

[data-theme="dark"] .help-section details {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
}

[data-theme="dark"] .help-section summary {
    color: #ffffff;
}

[data-theme="dark"] .help-section summary:hover {
    color: var(--accent-primary);
}

/* Light Mode - Ensure proper text colors */
body:not([data-theme="dark"]) {
    color: var(--text-color);
}

body:not([data-theme="dark"]) h1,
body:not([data-theme="dark"]) h2,
body:not([data-theme="dark"]) h3,
body:not([data-theme="dark"]) h4,
body:not([data-theme="dark"]) h5,
body:not([data-theme="dark"]) h6 {
    color: var(--text-color);
}

body:not([data-theme="dark"]) p,
body:not([data-theme="dark"]) span,
body:not([data-theme="dark"]) div {
    color: var(--text-color);
}

/* Dark Mode Animations */
@media (prefers-reduced-motion: no-preference) {
    .theme-toggle-slider {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    [data-theme="dark"] * {
        transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    }
}

/* Additional text elements that might need fixing */
[data-theme="dark"] .section-title h2 {
    color: #ffffff;
}

[data-theme="dark"] .section-title p {
    color: #e5e7eb;
}

[data-theme="dark"] .page-title {
    color: #ffffff;
}

[data-theme="dark"] .page-description {
    color: #e5e7eb;
}

[data-theme="dark"] .article-title,
[data-theme="dark"] .news-title {
    color: #000000;
}

[data-theme="dark"] .article-excerpt,
[data-theme="dark"] .news-excerpt {
    color: #e5e7eb;
}

[data-theme="dark"] .professor-name {
    color: #ffffff;
}

[data-theme="dark"] .professor-title {
    color: #e5e7eb;
}

[data-theme="dark"] .card-title {
    color: #ffffff;
}

[data-theme="dark"] .card-description {
    color: #e5e7eb;
}

[data-theme="dark"] .stat-card-value {
    color: #ffffff;
}

[data-theme="dark"] .stat-card-title {
    color: #e5e7eb;
}

[data-theme="dark"] .help-content p {
    color: #e5e7eb;
}

[data-theme="dark"] .help-content li {
    color: #e5e7eb;
}

[data-theme="dark"] .tip-item {
    color: #e5e7eb;
}

/* Alert text colors in dark mode */
[data-theme="dark"] .alert {
    color: #ffffff;
}

/* Table text colors in dark mode */
[data-theme="dark"] .data-table td {
    color: #e5e7eb;
}

[data-theme="dark"] .data-table th {
    color: #ffffff;
}

/* Featured Professors Section */
[data-theme="dark"] .professor-name {
    color: #000000;
}

[data-theme="dark"] .professor-name a {
    color: #000000;
}

[data-theme="dark"] .professor-name a:hover {
    color: var(--accent-primary);
}

[data-theme="dark"] .professor-title {
    color: #000000;
}

/* News Section - White dates in both modes */
.card-meta span,
.news-date {
    color: #ffffff !important;
}

.card-meta i {
    color: var(--accent-primary);
}

[data-theme="dark"] .card-meta {
    color: #e5e7eb;
}

[data-theme="dark"] .card-meta span {
    color: #ffffff !important;
}

[data-theme="dark"] .card-meta i {
    color: var(--accent-primary);
}

/* Hero Section - White text in both modes */
.hero h1 {
    color: #ffffff !important;
}

.hero p {
    color: #ffffff !important;
}

[data-theme="dark"] .hero h1 {
    color: #ffffff;
}

[data-theme="dark"] .hero p {
    color: #e5e7eb;
}

/* Section Titles */
[data-theme="dark"] .section-title h2 {
    color: #ffffff;
}

[data-theme="dark"] .section-title p {
    color: #e5e7eb;
}

/* Professor Panel/Dashboard */
[data-theme="dark"] .dashboard h1,
[data-theme="dark"] .dashboard h2,
[data-theme="dark"] .dashboard h3 {
    color: #ffffff;
}

[data-theme="dark"] .dashboard p,
[data-theme="dark"] .dashboard span {
    color: #e5e7eb;
}

/* Professor Dashboard Cards - Black in dark mode */
[data-theme="dark"] .stat-card {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border: 1px solid var(--border-primary);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

[data-theme="dark"] .stat-card-header {
    background: linear-gradient(135deg, #2d2d2d, #404040);
    border-bottom: 1px solid var(--border-primary);
}

/* Professor Form Cards - Black in dark mode */
[data-theme="dark"] .form-card {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border: 1px solid var(--border-primary);
    box-shadow: 0 8px 32px var(--shadow-heavy);
}

[data-theme="dark"] .profile-container {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border: 1px solid var(--border-primary);
    box-shadow: 0 8px 32px var(--shadow-heavy);
}

/* CV and Settings Sections in Profile */
[data-theme="dark"] .cv-section,
[data-theme="dark"] .settings-section {
    background: linear-gradient(135deg, #2d2d2d, #404040);
    border: 1px solid var(--border-primary);
}

[data-theme="dark"] .cv-item {
    background-color: #1a1a1a;
    border: 1px solid var(--border-primary);
}

[data-theme="dark"] .tab-navigation {
    background: linear-gradient(135deg, #2d2d2d, #404040);
    border-bottom: 1px solid var(--border-primary);
}

/* Status Cards in Forms */
[data-theme="dark"] .status-card {
    background: linear-gradient(135deg, #2d2d2d, #404040);
    border: 1px solid var(--border-primary);
}

[data-theme="dark"] .status-card.selected {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

/* Image Upload Sections */
[data-theme="dark"] .image-upload-section {
    background: #2d2d2d;
    border-color: var(--border-primary);
}

[data-theme="dark"] .image-upload-section:hover {
    background: #404040;
    border-color: var(--accent-primary);
}

/* Form Actions Footer */
[data-theme="dark"] .form-actions {
    background: linear-gradient(135deg, #2d2d2d, #404040);
    border-top: 1px solid var(--border-primary);
}

[data-theme="dark"] .data-table {
    background-color: #1a1a1a;
    border: 1px solid var(--border-primary);
}

[data-theme="dark"] .data-table thead {
    background: linear-gradient(135deg, #2d2d2d, #404040);
}

[data-theme="dark"] .data-table th {
    background-color: #2d2d2d;
    border-bottom: 1px solid var(--border-primary);
    color: #ffffff;
}

[data-theme="dark"] .data-table td {
    background-color: #1a1a1a;
    border-bottom: 1px solid var(--border-primary);
    color: #e5e7eb;
}

[data-theme="dark"] .data-table tr:hover td {
    background-color: #2d2d2d;
}

[data-theme="dark"] .user-info {
    color: #e5e7eb;
}

[data-theme="dark"] .author-name {
    color: #ffffff;
}

[data-theme="dark"] .author-title {
    color: #e5e7eb;
}

/* Professor Detail Page */
[data-theme="dark"] .professor-name-large {
    color: #ffffff;
}

[data-theme="dark"] .professor-title-large {
    color: #e5e7eb;
}

[data-theme="dark"] .professor-contact {
    color: #e5e7eb;
}

[data-theme="dark"] .professor-bio h3 {
    color: #ffffff;
}

[data-theme="dark"] .professor-bio p {
    color: #e5e7eb;
}

[data-theme="dark"] .specialization-section h3 {
    color: #ffffff;
}

[data-theme="dark"] .specialization-section p {
    color: #e5e7eb;
}

[data-theme="dark"] .current-position,
[data-theme="dark"] .institution-info {
    color: #e5e7eb;
}

[data-theme="dark"] .article-item h4,
[data-theme="dark"] .news-item h4 {
    color: #ffffff;
}

[data-theme="dark"] .article-item h4 a,
[data-theme="dark"] .news-item h4 a {
    color: #ffffff;
}

[data-theme="dark"] .article-item h4 a:hover,
[data-theme="dark"] .news-item h4 a:hover {
    color: var(--accent-primary);
}

[data-theme="dark"] .article-meta,
[data-theme="dark"] .news-meta {
    color: #e5e7eb;
}

[data-theme="dark"] .article-item p,
[data-theme="dark"] .news-item p {
    color: #e5e7eb;
}

[data-theme="dark"] .cv-item-header h4 {
    color: #ffffff;
}

[data-theme="dark"] .cv-item-date {
    color: #e5e7eb;
}

[data-theme="dark"] .cv-item p {
    color: #e5e7eb;
}

[data-theme="dark"] .tab-content h3 {
    color: #ffffff;
}

[data-theme="dark"] .tab-content p {
    color: #e5e7eb;
}

/* News Page */
[data-theme="dark"] .news-title {
    color: #ffffff;
}

[data-theme="dark"] .news-title a {
    color: #ffffff;
}

[data-theme="dark"] .news-title a:hover {
    color: var(--accent-primary);
}

/* Articles Page */
[data-theme="dark"] .article-title {
    color: #ffffff;
}

[data-theme="dark"] .article-title a {
    color: #ffffff;
}

[data-theme="dark"] .article-title a:hover {
    color: var(--accent-primary);
}

/* Article Category - White text in both modes */
.article-category {
    color: #ffffff !important;
    background-color: var(--accent-primary);
}

[data-theme="dark"] .article-category {
    color: #ffffff !important;
    background-color: var(--accent-primary);
}

[data-theme="dark"] .article-meta {
    color: #e5e7eb;
}

[data-theme="dark"] .article-meta span {
    color: #e5e7eb;
}

[data-theme="dark"] .article-excerpt {
    color: #e5e7eb;
}

/* Form controls in articles page */
[data-theme="dark"] .form-control {
    background-color: var(--bg-tertiary);
    border-color: var(--border-primary);
    color: #ffffff;
}

[data-theme="dark"] .form-control option {
    background-color: var(--bg-tertiary);
    color: #ffffff;
}

/* Search filter container */
[data-theme="dark"] .search-filter-container {
    background-color: var(--bg-secondary);
    border-color: var(--border-primary);
}

/* Centered search containers in dark mode */
[data-theme="dark"] .articles-page .search-filter-container,
[data-theme="dark"] .news-page .search-filter-container {
    background-color: var(--bg-secondary);
    border-color: var(--border-primary);
    box-shadow: 0 4px 20px var(--shadow-medium);
}

/* Professor Page Tab Navigation */
[data-theme="dark"] .tab-nav {
    border-bottom-color: var(--border-primary);
}

[data-theme="dark"] .tab-nav-item {
    color: #e5e7eb;
    border-bottom-color: transparent;
}

[data-theme="dark"] .tab-nav-item.active {
    color: #ffffff;
    border-bottom-color: var(--accent-primary);
}

[data-theme="dark"] .tab-nav-item:hover {
    color: #ffffff;
}

/* Professor Page Cards - Black Background */
[data-theme="dark"] .professor-positions {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border-left-color: var(--accent-primary);
}

[data-theme="dark"] .specialization-section {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border-color: var(--border-primary);
}

[data-theme="dark"] .professor-bio {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

[data-theme="dark"] .cv-item {
    background-color: #1a1a1a;
    border-left-color: var(--accent-primary);
}

/* Enhanced text visibility for dark mode cards */
[data-theme="dark"] .professor-positions .current-position,
[data-theme="dark"] .professor-positions .institution-info {
    color: #ffffff;
}

[data-theme="dark"] .specialization-section h3 {
    color: #ffffff;
}

[data-theme="dark"] .specialization-section p {
    color: #e5e7eb;
}

[data-theme="dark"] .professor-bio h3 {
    color: #ffffff;
}

[data-theme="dark"] .professor-bio p {
    color: #e5e7eb;
}

/* Article and News items in professor page */
[data-theme="dark"] .article-item,
[data-theme="dark"] .news-item {
    background-color: #1a1a1a;
    border-color: var(--border-primary);
}

[data-theme="dark"] .article-item h4 a,
[data-theme="dark"] .news-item h4 a {
    color: #ffffff;
}

[data-theme="dark"] .article-item h4 a:hover,
[data-theme="dark"] .news-item h4 a:hover {
    color: var(--accent-primary);
}

/* Dark Mode Scrollbar */
[data-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* Dark Mode Selection */
[data-theme="dark"] ::selection {
    background: var(--accent-primary);
    color: white;
}

/* Dark Mode Focus Styles */
[data-theme="dark"] *:focus {
    outline-color: var(--accent-primary);
}

/* Mobile Responsive for Theme Toggle */
@media (max-width: 768px) {
    .theme-toggle-container {
        margin-left: 0;
        margin-top: 1rem;
    }

    .theme-toggle {
        width: 50px;
        height: 25px;
    }

    .theme-toggle-slider {
        width: 19px;
        height: 19px;
        top: 1px;
        left: 1px;
    }

    .theme-toggle.dark .theme-toggle-slider {
        transform: translateX(25px);
    }

    .theme-toggle-slider i {
        font-size: 10px;
    }
}

/* Language Switcher Styles */
.language-switcher {
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
}

.language-select {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #495057;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%23495057" d="M6 8L0 0h12z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    min-width: 150px;
}

.language-select:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    background-color: #fff;
}

.language-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Dark mode styles for language switcher */
[data-theme="dark"] .language-select {
    background: #2d3748;
    color: #e2e8f0;
    border-color: #4a5568;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%23e2e8f0" d="M6 8L0 0h12z"/></svg>');
}

[data-theme="dark"] .language-select:hover {
    border-color: #667eea;
    background-color: #374151;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

[data-theme="dark"] .language-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Language loading overlay */
#languageLoadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.language-loading-content {
    text-align: center;
    color: #495057;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Language change animations */
.language-changing * {
    transition: opacity 0.3s ease !important;
}

/* Notification styles for language changes */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transform: translateY(-20px);
    animation: slideInFadeOut 3s ease-in-out;
}

.notification-success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.notification-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

@keyframes slideInFadeOut {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    10% {
        opacity: 1;
        transform: translateY(0);
    }
    90% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Responsive adjustments for language switcher */
@media (max-width: 768px) {
    .language-switcher {
        margin: 0.5rem 0;
        width: 100%;
    }

    .language-select {
        width: 100%;
        min-width: auto;
    }

    .nav-links.active .language-switcher {
        padding: 0 1rem;
    }
}