:root {
    /* Primary / Accent */
    --primary: #3f51b5;
    --primary-hover: #303f9f;
    --primary-alpha-15: rgba(63, 81, 181, 0.15);
    --primary-color: var(--primary); /* Maintain backward compatibility */
    
    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Backgrounds */
    --bg-body: #f5f5f5;
    --bg-color: var(--bg-body); /* Maintain backward compatibility */
    --bg-card: #ffffff;
    --white: var(--bg-card); /* Maintain backward compatibility */
    --bg-input: #ffffff;
    --bg-modal: #ffffff;
    
    /* Text Colors */
    --text-main: #333333;
    --text-color: var(--text-main); /* Maintain backward compatibility */
    --text-muted: #6b7280;
    --text-inverse: #ffffff;
    
    /* Borders and Shadows */
    --border-color: #dddddd;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.main-header {
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header nav {
    height: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand .logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.user-profile {
    display: flex;
    align-items: center;
    border-left: 1px solid var(--border-color);
    padding-left: 1.5rem;
    margin-left: 0.5rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.1rem;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
}

.auth-link {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.auth-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-inverse) !important;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-outline {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

.hero {
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

footer {
    background-color: var(--bg-card);
    color: var(--text-main);
    text-align: center;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Dark Mode Theme Variables */
.dark-mode {
    --primary: #5c6bc0;
    --primary-hover: #7986cb;
    --primary-alpha-15: rgba(92, 107, 192, 0.15);
    
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --info: #60a5fa;
    
    --bg-body: #1a1a1a;
    --bg-card: #2d2d2d;
    --bg-input: #2d2d2d;
    --bg-modal: #2d2d2d;
    
    --text-main: #e5e5e5;
    --text-muted: #9ca3af;
    --text-inverse: #1a1a1a;
    
    --border-color: #404040;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

/* Navigation Dropdowns */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    min-width: 220px;
    display: none;
    z-index: 1000;
    padding: 0.5rem 0;
}

.nav-dropdown:hover > .dropdown-menu {
    display: block;
}

.dropdown-menu a, .submenu-toggle {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem !important;
    color: var(--text-color) !important;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 0.95rem;
    font-weight: 500;
}

.dropdown-menu a:hover, .submenu-toggle:hover {
    background: var(--primary-alpha-15);
    color: var(--primary-color) !important;
}

/* Nested Submenus */
.dropdown-submenu {
    position: relative;
}

.submenu-content {
    position: absolute;
    left: 100%;
    top: -0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    min-width: 200px;
    display: none;
    padding: 0.5rem 0;
}

.dropdown-submenu:hover > .submenu-content {
    display: block;
}

.submenu-toggle i.fa-chevron-right {
    margin-left: auto;
    font-size: 0.75rem;
    opacity: 0.6;
}

/* Icon Styles */
.nav-dropdown i, .dropdown-menu i {
    width: 1.25rem;
    text-align: center;
}
