* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --surface-panel: #ffffff;
    --surface-panel-muted: #f4f7fb;
    --surface-border: #e2e8f0;
    --surface-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --glass-bg: #ffffff;
    --glass-border: var(--surface-border);
    --glass-shadow: rgba(15, 23, 42, 0.06);
    --primary-gradient: linear-gradient(135deg, #a8d5e2 0%, #b8e0d2 100%);
    --secondary-gradient: linear-gradient(135deg, #c8e6f5 0%, #d4f1f4 100%);
    --accent-gradient: linear-gradient(135deg, #b3e5fc 0%, #b2ebf2 100%);
    --success-gradient: linear-gradient(135deg, #c8e6c9 0%, #dcedc8 100%);
    --danger-gradient: linear-gradient(135deg, #ffccbc 0%, #ffe0b2 100%);
    --text-primary: rgba(50, 50, 50, 0.9);
    --text-secondary: rgba(100, 100, 100, 0.8);
    --heading-color: rgba(40, 40, 40, 0.95);
    --body-bg: linear-gradient(135deg, #e3f2fd 0%, #e0f2f1 50%, #f1f8e9 100%);
    --blur-amount: 20px;
}

:root[data-theme="dark"] {
    --surface-panel: #0f172a;
    --surface-panel-muted: #0b1220;
    --surface-border: rgba(148, 163, 184, 0.2);
    --surface-shadow: 0 30px 60px rgba(2, 6, 23, 0.85);
    --glass-bg: rgba(15, 23, 42, 0.9);
    --glass-border: rgba(94, 109, 139, 0.4);
    --glass-shadow: rgba(2, 6, 23, 0.4);
    --text-primary: rgba(248, 250, 252, 0.95);
    --text-secondary: rgba(148, 163, 184, 0.85);
    --heading-color: #f8fafc;
    --body-bg: radial-gradient(circle at top, #1e293b 0%, #020617 60%, #000814 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--body-bg);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

.hidden {
    display: none !important;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    transition: color 0.3s ease;
}

.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(247, 250, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.25s ease;
}

.auth-overlay.hidden {
    display: none;
}

.auth-overlay-content {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 28px;
    border-radius: 20px;
    background: var(--surface-panel);
    border: 1px solid var(--surface-border);
    box-shadow: var(--surface-shadow);
    font-weight: 600;
    color: rgba(50, 50, 50, 0.85);
}

html[data-theme="dark"] .auth-overlay {
    background: rgba(2, 6, 23, 0.94);
}

html[data-theme="dark"] .auth-overlay-content {
    color: var(--text-primary);
}

/* Glass morphism base styles */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--surface-shadow);
}

/* Login Screen */
.screen {
    min-height: 100vh;
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.logo {
    font-size: 64px;
    font-weight: 800;
    background: linear-gradient(135deg, #4a90e2 0%, #5cb3a8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 20px;
    color: rgba(80, 80, 80, 0.9);
    margin-bottom: 40px;
    font-weight: 500;
}

html[data-theme="dark"] .subtitle,
html[data-theme="dark"] .login-language-selector label,
html[data-theme="dark"] .profile-section h4,
html[data-theme="dark"] .profile-section p,
html[data-theme="dark"] .settings-section-hint,
html[data-theme="dark"] .loader-text {
    color: var(--text-secondary);
}

.login-language-selector {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.login-language-selector label {
    font-size: 14px;
    color: rgba(80, 80, 80, 0.9);
    font-weight: 500;
}

.login-language-selector .language-select {
    min-width: 200px;
}

.google-button {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface-panel);
    color: rgba(50, 50, 50, 0.9);
    padding: 16px 48px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    border: 1px solid var(--surface-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--surface-shadow);
}

.google-button:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.google-button:active {
    transform: translateY(0);
}

/* Main Screen */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: var(--surface-panel);
    border-bottom: 1px solid var(--surface-border);
    box-shadow: var(--surface-shadow);
    width: 100%;
}

.logo-small {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #4a90e2 0%, #5cb3a8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-button {
    background: var(--surface-panel-muted);
    border: 1px solid var(--surface-border);
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: rgba(50, 50, 50, 0.9);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.profile-button:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"] .google-button,
html[data-theme="dark"] .profile-button,
html[data-theme="dark"] .language-select,
html[data-theme="dark"] .logout-btn,
html[data-theme="dark"] .nav-menu-item,
html[data-theme="dark"] .auth-overlay-content,
html[data-theme="dark"] .header,
html[data-theme="dark"] .left-nav-menu {
    background: var(--surface-panel);
    border-color: var(--surface-border);
    box-shadow: var(--surface-shadow);
    color: var(--text-primary);
}

html[data-theme="dark"] .language-select:hover,
html[data-theme="dark"] .google-button:hover,
html[data-theme="dark"] .profile-button:hover,
html[data-theme="dark"] .nav-menu-item:hover {
    background: var(--surface-panel-muted);
}

html[data-theme="dark"] .logout-btn {
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.35);
    box-shadow: 0 20px 45px rgba(2, 6, 23, 0.7);
}

html[data-theme="dark"] .logout-btn:hover {
    background: rgba(248, 113, 113, 0.35);
}

html[data-theme="dark"] .settings-screen {
    background: rgba(2, 6, 23, 0.9);
}

.profile-section {
    margin-bottom: 24px;
}

.profile-section h4 {
    margin-bottom: 12px;
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 700;
}

.profile-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.profile-actions .btn-secondary[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.language-select {
    padding: 12px 18px;
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    font-size: 14px;
    background: var(--surface-panel-muted);
    color: var(--text-primary);
    cursor: pointer;
    min-width: 200px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.language-select:hover {
    background: var(--surface-panel);
    border-color: var(--surface-border);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.language-select:focus {
    outline: none;
    border-color: rgba(74, 144, 226, 0.5);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.15), 0 8px 25px rgba(0, 0, 0, 0.08);
}

.logout-btn {
    padding: 10px 20px;
    background: #ffe0d5;
    color: rgba(150, 80, 60, 0.9);
    border: 1px solid rgba(255, 173, 153, 0.8);
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(255, 204, 188, 0.3);
}

.logout-btn:hover {
    background: rgba(255, 204, 188, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 204, 188, 0.4);
}

.container {
    display: flex;
    width: 100%;
    padding: 0;
    gap: 0;
    min-height: 100vh;
    align-items: stretch;
}

/* Left Navigation Menu */
.left-nav-menu {
    flex: 0 0 60px;
    background: var(--surface-panel);
    border-right: 1px solid var(--surface-border);
    box-shadow: var(--surface-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 16px;
}

.nav-avatar-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0 4px;
}

.avatar-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
    position: relative;
}

.avatar-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

#userInitials {
    font-weight: 700;
    color: rgba(50, 50, 50, 0.85);
}

.nav-menu-item {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--surface-panel-muted);
    border: 1px solid var(--surface-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(80, 80, 80, 0.7);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nav-menu-item:hover {
    background: var(--surface-panel);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: rgba(50, 50, 50, 0.9);
}

.nav-menu-item.active {
    background: var(--primary-gradient);
    color: rgba(50, 50, 50, 0.9);
    border-color: rgba(168, 213, 226, 0.6);
    box-shadow: 0 4px 15px rgba(168, 213, 226, 0.3);
}

.nav-menu-item svg {
    width: 24px;
    height: 24px;
}

/* Tooltip for nav menu items - now handled by JavaScript */
.nav-menu-item {
    z-index: 10001;
    position: relative;
}

.content-section {
    display: flex;
    flex: 1;
    gap: 0;
    min-width: 0;
    width: 100%;
    min-height: 0;
    position: relative;
}

.content-section.hidden {
    display: none !important;
}
