/* Enhanced Reach Together Styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --white: #ffffff;
    --shadow: 0 10px 40px rgba(99, 102, 241, 0.1);
    --shadow-lg: 0 20px 60px rgba(99, 102, 241, 0.15);
}

/* Dark Mode Variables */
body.dark-mode {
    --dark: #f8fafc;
    --light: #0f172a;
    --gray: #cbd5e1;
    --gray-light: #1e293b;
    --white: #1e293b;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
}

body.dark-mode {
    background: #0f172a;
    color: #f8fafc;
}

body.dark-mode .bg-animation {
    opacity: 0.03;
}

/* Preserve footer appearance from light mode when dark-mode is active */
body.dark-mode footer,
body.dark-mode .footer-content,
body.dark-mode .footer-bottom {
    background: #1e293b; /* same as light-mode var(--dark) */
    color: #ffffff; /* same as light-mode var(--white) */
}

body.dark-mode .footer-links a {
    color: #64748b; /* same as light-mode var(--gray) */
}

body.dark-mode .footer-logo p,
body.dark-mode .footer-contact p {
    color: #64748b; /* keep description/contact text same as light mode */
}

body.dark-mode header {
    background: rgba(30, 41, 59, 0.95);
}

body.dark-mode .nav-links a {
    color: #cbd5e1;
}

body.dark-mode .hero::before {
    opacity: 0.05;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.3;
}

section {
    padding: 5rem 5%;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.05;
}

.bg-animation::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo h1 {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.login-btn {
    padding: 0.6rem 1.5rem !important;
    border: 2px solid var(--primary);
    border-radius: 25px;
    color: var(--primary) !important;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: var(--primary);
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.login-btn::after {
    display: none;
}

.signup-btn {
    padding: 0.6rem 1.5rem !important;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white) !important;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.signup-btn::after {
    display: none;
}

/* Burger Menu */
.burger {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.burger div {
    width: 25px;
    height: 3px;
    background: var(--dark);
    margin: 5px;
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* Dark Mode Toggle */
.theme-toggle {
    width: 60px;
    height: 30px;
    background: var(--gray-light);
    border-radius: 30px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--gray-light);
}

.theme-toggle:hover {
    transform: scale(1.05);
}

.theme-toggle-slider {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    position: absolute;
    top: 1px;
    left: 2px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.7rem;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

body.dark-mode .theme-toggle {
    background: #1e293b;
    border-color: #1e293b;
}

body.dark-mode .theme-toggle-slider {
    left: 32px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 4rem 5%;
    gap: 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0.1;
    border-radius: 50%;
    filter: blur(80px);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}

.hero-content {
    flex: 1;
    animation: slideInLeft 0.8s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content h2 {
    font-size: 1.8rem;
    color: var(--gray);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.primary-btn, .secondary-btn {
    padding: 1rem 2.5rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.4);
}

.secondary-btn {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.secondary-btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.hero-image {
    flex: 1;
    animation: slideInRight 0.8s ease;
    position: relative;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-image img {
    width: 100%;
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.hero-image:hover img {
    transform: scale(1.02);
}

/* How It Works Section */
.how-it-works {
    text-align: center;
    background: var(--white);
}

.how-it-works h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.step {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.step:hover::before {
    transform: scaleX(1);
}

.step:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.step-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--white);
    font-size: 2rem;
    transition: all 0.3s ease;
}

.step:hover .step-icon {
    transform: rotateY(360deg);
}

.step h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.step p {
    color: var(--gray);
    line-height: 1.8;
}

/* Features Section */
.features {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    text-align: center;
}

.features h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* two columns on desktop */
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--white);
    font-size: 1.8rem;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.feature-card p {
    color: var(--gray);
    line-height: 1.8;
}

/* Auth Sections */
.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
}

.auth-container {
    background: var(--white);
    padding: 3rem;
    border-radius: 25px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--gray-light);
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Keep auth form inputs light even in dark mode */
body.dark-mode #loginForm .form-group input,
body.dark-mode #loginForm .form-group select,
body.dark-mode #loginForm .form-group textarea,
body.dark-mode #signupForm .form-group input,
body.dark-mode #signupForm .form-group select,
body.dark-mode #signupForm .form-group textarea,
body.dark-mode .auth-container .form-group input,
body.dark-mode .auth-container .form-group select,
body.dark-mode .auth-container .form-group textarea {
    background: #ffffff;
    color: #0f172a;
    border-color: #e5e7eb;
    box-shadow: none;
}

body.dark-mode .auth-container .form-group input::placeholder,
body.dark-mode .auth-container .form-group textarea::placeholder,
body.dark-mode .auth-container .form-group select::placeholder {
    color: #6b7280;
    opacity: 1;
}

body.dark-mode .auth-container .form-group input:focus,
body.dark-mode .auth-container .form-group select:focus,
body.dark-mode .auth-container .form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.08);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    color: var(--gray);
    font-size: 0.875rem;
    display: block;
    margin-top: 0.5rem;
}

.auth-redirect {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray);
}

.auth-redirect a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-redirect a:hover {
    color: var(--primary-dark);
}

/* About Section */
.about {
    background: var(--white);
}

.about h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

.about-text {
    flex: 1;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 25px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.about-image:hover img {
    transform: scale(1.02);
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 3rem 5% 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.footer-logo h2 {
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.footer-logo p {
    color: var(--gray);
}

.footer-links h3,
.footer-contact h3 {
    color: var(--primary-light);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-light);
    padding-left: 5px;
}

.footer-contact p {
    color: var(--gray);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.footer-contact i {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray);
}

/* Scroll animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Dashboard Styles */
.dashboard {
    display: none;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 1.2rem;
}

.dashboard-controls {
    display: flex;
    gap: 15px;
}

/* Utility Classes */
.danger-btn {
    background: var(--danger);
    color: var(--white);
    padding: 0.6rem 1.5rem;
    border-radius: 15px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.danger-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        height: calc(100vh - 70px);
        padding: 2rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        align-items: flex-start;
    }

    .nav-links.active {
        right: 0;
    }

    .theme-toggle {
        margin-right: 1rem;
    }

    .burger {
        display: block;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 5%;
        min-height: auto;
    }

    .hero-content {
        margin-bottom: 3rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content h2 {
        font-size: 1.3rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    h2 {
        font-size: 2rem;
    }

    section {
        padding: 3rem 5%;
    }

    .steps-container,
    .features-grid {
        grid-template-columns: 1fr;
    }

    .auth-container {
        padding: 2rem;
        margin: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content h2 {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
        text-align: center;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    nav {
        padding: 1rem 5%;
    }
}
