/* Global Styles with Design System - FIXED */
:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary-color: #10b981;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --background-color: #ffffff;
    --background-alt: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 0.5rem;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--background-alt);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Loading Screen Styles */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-logo {
    font-family: 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #4f46e5;
}

.loading-logo span {
    color: #10b981;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(79, 70, 229, 0.2);
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    margin-top: 1.5rem;
    font-family: 'Inter', sans-serif;
    color: #4b5563;
    font-weight: 500;
}

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

a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}

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

ul {
    list-style: none;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background-color: var(--background-alt);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Navigation - ONLY for landing page, not dashboard */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}

.landing-nav .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.landing-nav .logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.landing-nav .logo span {
    color: var(--primary-color);
}

.landing-nav .nav-links {
    display: flex;
    gap: 2rem;
}

.landing-nav .nav-links a {
    font-weight: 500;
}

.landing-nav .auth-buttons {
    display: flex;
    gap: 1rem;
}

.landing-nav .mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.landing-nav .mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* Mobile Menu Styles - FIXED VERSION */
.landing-nav .mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
    z-index: 1001;
}

.landing-nav .mobile-menu-btn span {
    width: 24px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Show hamburger on mobile */
@media (max-width: 768px) {
    .landing-nav .mobile-menu-btn {
        display: flex;
    }
    
    .landing-nav .nav-links, 
    .landing-nav .auth-buttons {
        display: none;
    }
}

.landing-nav .mobile-menu {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: white;
    padding: 80px 2rem 2rem;
    box-shadow: var(--shadow);
    z-index: 1000;
    flex-direction: column;
    gap: 1.5rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.landing-nav .mobile-menu.active {
    transform: translateX(0);
}

.landing-nav .mobile-menu a {
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    border-radius: 8px;
    transition: background-color 0.3s;
    font-size: 1.1rem;
}

.landing-nav .mobile-menu a:hover {
    background-color: #f1f5f9;
    color: var(--primary-color);
}

.landing-nav .mobile-auth {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.landing-nav .mobile-auth .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    overflow: hidden;
}

#geometric-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.stat h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat p {
    font-size: 1rem;
    margin-bottom: 0;
}

/* Features Section */
.features {
    padding: 6rem 0;
    background-color: var(--background-alt);
}

.section-header {
    text-align: center !important;
    margin-bottom: 4rem;
}
.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center !important;
}
.section-header p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-light);
}

/* How It Works Section */
.how-it-works {
    padding: 6rem 0;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    text-align: center;
    padding: 2rem;
    position: relative;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 30px;
    right: -30px;
    width: 60px;
    height: 2px;
    background-color: var(--border-color);
    display: none;
}

.step-number {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
}

.step h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

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

/* Testimonials Section */
.testimonials {
    padding: 6rem 0;
    background-color: var(--background-alt);
}

.testimonial-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    height: 300px;
}

.testimonial-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-slide.active {
    opacity: 1;
    z-index: 1;
}

.testimonial-content {
    background-color: white;
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.testimonial-content p {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.testimonial-author h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.testimonial-author p {
    font-size: 0.9rem;
    margin-bottom: 0;
    font-style: normal;
    color: var(--text-light);
}

.testimonial-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    gap: 1rem;
}

.prev-testimonial,
.next-testimonial {
    background-color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.prev-testimonial:hover,
.next-testimonial:hover {
    background-color: var(--primary-color);
    color: white;
}

.testimonial-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--border-color);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: var(--primary-color);
}

/* CTA Section */
.cta {
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta .btn-primary {
    background-color: white;
    color: var(--primary-color);
}

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

/* Footer */
footer {
    background-color: #1f2937;
    color: white;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-col h3 span {
    color: var(--primary-light);
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-col p {
    color: #d1d5db;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: #d1d5db;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: white;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.contact-info li svg {
    width: 18px;
    height: 18px;
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background-color: white;
    color: var(--text-color);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    border-left: 4px solid var(--secondary-color);
}

.toast-info {
    border-left: 4px solid var(--primary-color);
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex-grow: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 0.25rem;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 25%;
    background: #ef4444;
}

.strength-fill.fair {
    width: 50%;
    background: #f59e0b;
}

.strength-fill.good {
    width: 75%;
    background: #3b82f6;
}

.strength-fill.strong {
    width: 100%;
    background: #10b981;
}

.strength-text {
    font-size: 12px;
    color: #6b7280;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.toast {
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    margin-bottom: 10px;
    animation: slideIn 0.3s ease;
    max-width: 300px;
}

.toast-success {
    background: #10b981;
}

.toast-error {
    background: #ef4444;
}

.toast-info {
    background: #3b82f6;
}

.toast-warning {
    background: #f59e0b;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading spinner */
.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Conditional fields animation */
.conditional-fields {
    transition: all 0.3s ease;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .step:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .landing-nav .nav-links, 
    .landing-nav .auth-buttons {
        display: none;
    }
    
    .landing-nav .mobile-menu-btn {
        display: flex;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .features-grid, .steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .testimonial-content {
        padding: 1.5rem;
    }
}