/* iOS 26 Inspired Design - Light & Dark Mode */

:root {
    /* Light Mode Colors */
    --primary-color: #007AFF;
    --secondary-color: #5856D6;
    --success-color: #34C759;
    --error-color: #FF3B30;
    --warning-color: #FF9500;
    
    --bg-primary: #F2F2F7;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F9F9F9;
    
    --text-primary: #000000;
    --text-secondary: #3C3C43;
    --text-tertiary: #8E8E93;
    
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
    
    --blur-bg: rgba(255, 255, 255, 0.8);
    --card-bg: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] {
    /* Dark Mode Colors */
    --bg-primary: #000000;
    --bg-secondary: #1C1C1E;
    --bg-tertiary: #2C2C2E;
    
    --text-primary: #FFFFFF;
    --text-secondary: #EBEBF5;
    --text-tertiary: #8E8E93;
    
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.5);
    
    --blur-bg: rgba(28, 28, 30, 0.8);
    --card-bg: rgba(28, 28, 30, 0.95);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Roboto', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
    line-height: 1.6;
    min-height: 100vh;
}

/* Container */
.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Auth Card */
.auth-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px var(--shadow-color);
    border: 1px solid var(--border-color);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    color: var(--text-tertiary);
    font-size: 16px;
}

/* Form Styles */
.auth-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 17px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 122, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

.alert-success {
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 24px;
}

.auth-footer p {
    color: var(--text-tertiary);
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.auth-footer a:hover {
    opacity: 0.7;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-icon {
    font-size: 24px;
}

/* Navbar */
.navbar {
    background: var(--blur-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px var(--shadow-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-brand {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    padding: 8px 16px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link:hover {
    background: var(--bg-tertiary);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

.nav-link.nav-logout {
    color: var(--error-color);
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px var(--shadow-color);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.nav-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: block;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 14px;
}

.dropdown-content a:first-child {
    border-radius: 12px 12px 0 0;
}

.dropdown-content a:last-child {
    border-radius: 0 0 12px 12px;
}

.dropdown-content a:hover {
    background: var(--bg-tertiary);
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.welcome-section {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.welcome-section h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 12px;
}

.welcome-section p {
    font-size: 18px;
    color: var(--text-tertiary);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.dashboard-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    animation: slideUp 0.5s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow-color);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.dashboard-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.dashboard-card p {
    color: var(--text-tertiary);
    font-size: 14px;
}

/* Info Section */
.info-section {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-color);
    animation: slideUp 0.6s ease;
}

.info-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    padding: 12px 0;
    font-size: 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.feature-list li:last-child {
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--blur-bg);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 12px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        max-height: 500px;
    }
    
    .nav-link {
        width: 100%;
        justify-content: center;
    }
    
    .dropdown-content {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 8px;
        display: none;
    }
    
    .nav-dropdown.active .dropdown-content {
        display: block;
    }
    
    .auth-card {
        padding: 30px 24px;
    }
    
    .welcome-section h1 {
        font-size: 32px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .theme-toggle {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 24px 20px;
    }
    
    .auth-header h1 {
        font-size: 28px;
    }
    
    .welcome-section h1 {
        font-size: 28px;
    }
}
