/* Zeitline Global Styles */

:root {
    --bg-deep: #050508;
    --bg-elevated: #0a0a0f;
    --bg-card: #111118;
    --bg-input: #0d0d14;
    --accent-primary: #c9ff57;
    --accent-secondary: #57ffd4;
    --accent-tertiary: #ff6b6b;
    --text-primary: #f0f0f5;
    --text-secondary: #8a8a9a;
    --text-muted: #4a4a5a;
    --border-subtle: rgba(255,255,255,0.06);
    --border-focus: rgba(201, 255, 87, 0.5);
    --glow-primary: rgba(201, 255, 87, 0.15);
    --glow-secondary: rgba(87, 255, 212, 0.1);
    --success: #57ffd4;
    --error: #ff6b6b;
    --warning: #ffcc57;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-weight: 400;
    line-height: 1.2;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
}

.logo {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.5rem;
    letter-spacing: 0.15em;
    text-decoration: none;
    color: var(--text-primary);
}

.logo:hover {
    color: var(--accent-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.8rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-deep);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px var(--glow-primary);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
}

.btn-ghost:hover {
    color: var(--text-primary);
}

.btn-social {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    width: 100%;
    padding: 1rem;
}

.btn-social:hover {
    background: var(--bg-elevated);
    border-color: rgba(255,255,255,0.15);
}

.btn-social img {
    width: 20px;
    height: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

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

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px var(--glow-primary);
}

.form-input::placeholder {
    color: var(--text-muted);
}

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a8a9a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.input-with-prefix {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 1.25rem;
    color: var(--text-muted);
    font-weight: 500;
    pointer-events: none;
}

.input-with-prefix .form-input {
    padding-left: 2.5rem;
}

.input-with-suffix {
    position: relative;
    display: flex;
    align-items: center;
}

.input-suffix {
    position: absolute;
    right: 1.25rem;
    color: var(--text-muted);
    font-weight: 500;
    pointer-events: none;
}

.input-with-suffix .form-input {
    padding-right: 2.5rem;
}

/* Toggle Buttons */
.toggle-group {
    display: flex;
    gap: 0.5rem;
}

.toggle-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: var(--bg-card);
}

.toggle-btn.active {
    background: rgba(201, 255, 87, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Multi-select */
.multi-select-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.multi-select-option {
    padding: 0.6rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.multi-select-option:hover {
    background: var(--bg-card);
    border-color: rgba(255,255,255,0.15);
}

.multi-select-option.selected {
    background: rgba(201, 255, 87, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: space-between;
}

.form-actions .btn {
    min-width: 140px;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 2rem;
}

/* Auth Pages */
.auth-page {
    display: flex;
    min-height: 100vh;
}

.auth-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    max-width: 500px;
    margin: 0 auto;
}

.auth-right {
    flex: 1;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-right::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse at 30% 30%, rgba(201, 255, 87, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 70%, rgba(87, 255, 212, 0.08) 0%, transparent 50%);
    animation: gradientShift 15s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(5%, 5%) rotate(5deg); }
}

@media (max-width: 900px) {
    .auth-right {
        display: none;
    }
}

.auth-header {
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-form {
    margin-top: 2rem;
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent-primary);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Onboarding Pages */
.onboarding-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.onboarding-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
}

.progress-container {
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
}

.progress-bar-wrapper {
    height: 4px;
    background: var(--bg-card);
    border-radius: 4px;
    overflow: hidden;
}

#progressBar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

#progressText {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.5rem;
}

.step-indicators {
    display: flex;
    gap: 0.5rem;
}

.step-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.step-indicator.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--bg-deep);
}

.step-indicator.completed {
    background: rgba(87, 255, 212, 0.2);
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

.onboarding-content {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 3rem 2rem;
}

.step-content {
    width: 100%;
    max-width: 640px;
}

.step-header {
    margin-bottom: 2.5rem;
}

.step-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.step-header p {
    color: var(--text-secondary);
}

.onboarding-form {
    animation: fadeIn 0.5s ease;
}

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

/* Review Section */
.review-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.review-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.5rem;
}

.review-section h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.review-item {
    padding: 0.75rem;
    background: var(--bg-elevated);
    border-radius: 10px;
}

.review-item.full-width {
    grid-column: 1 / -1;
}

.review-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.review-value {
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* Dashboard */
.dashboard {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 260px;
    background: var(--bg-elevated);
    border-right: 1px solid var(--border-subtle);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.sidebar-nav {
    flex: 1;
    margin-top: 2rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-bottom: 0.25rem;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(201, 255, 87, 0.1);
    color: var(--accent-primary);
}

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

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 2rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--bg-deep);
}

/* Toasts */
.error-toast,
.success-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 9999;
    animation: slideUp 0.3s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.error-toast {
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid var(--error);
    color: var(--error);
}

.success-toast {
    background: rgba(87, 255, 212, 0.15);
    border: 1px solid var(--success);
    color: var(--success);
}

.error-toast button,
.success-toast button {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
}

.error-toast button:hover,
.success-toast button:hover {
    opacity: 1;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 8, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    margin-top: 1rem;
    color: var(--text-secondary);
}

/* Location Status */
#locationStatus .detecting {
    color: var(--accent-primary);
    animation: pulse 1.5s ease-in-out infinite;
}

#locationStatus .detected {
    color: var(--success);
}

#locationStatus .error {
    color: var(--error);
}

#locationStatus .manual {
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .auth-left {
        padding: 2rem 1.5rem;
    }
    
    .step-content {
        padding: 0;
    }
    
    .review-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

