/* Modern Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Modern Gradient Colors */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-warning: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-purple: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --gradient-ocean: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* High Contrast Colors */
    --primary: #6366F1;
    --primary-dark: #4F46E5;
    --secondary: #EC4899;
    --accent: #F59E0B;
    --dark: #0F172A;
    --darker: #020617;
    --light: #F8FAFC;
    --white: #FFFFFF;

    /* Text Colors */
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-light: #94A3B8;
    --text-white: #FFFFFF;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);

    /* Borders */
    --border-color: #E2E8F0;
    --border-radius: 16px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo span {
    opacity: 0.7;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 12px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--light);
    color: var(--primary);
}

.arrow {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

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

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

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

.dropdown-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.dropdown-grid a {
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: block;
}

.dropdown-grid a:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateX(4px);
}

.btn-contribute {
    background: var(--gradient-primary);
    color: white !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 12px;
    font-weight: 700;
}

.btn-contribute:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 6rem;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-background {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 1000px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: white;
    font-weight: 600;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.badge-icon {
    font-size: 1.25rem;
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 900;
    color: white;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.gradient-text {
    display: inline-block;
    background: linear-gradient(135deg, #FDE047 0%, #FCD34D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin-bottom: 3rem;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 2.5rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
}

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

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

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Sections */
section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Features Section */
.features {
    background: var(--light);
}

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

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

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

.feature-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.gradient-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.gradient-2 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.gradient-3 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.gradient-4 { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.gradient-5 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.gradient-6 { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-card p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Categories Section */
.category-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.category-large {
    position: relative;
    padding: 3rem;
    border-radius: 24px;
    color: white;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.category-large::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.category-large:hover::before {
    background: rgba(0, 0, 0, 0);
}

.category-large:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.gradient-card-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.gradient-card-2 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.gradient-card-3 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.gradient-card-4 { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.gradient-card-5 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.gradient-card-6 { background: linear-gradient(135deg, #a8edea 0%, #764ba2 100%); }

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.category-large h3 {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.category-large p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.category-link {
    display: inline-block;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    position: relative;
    z-index: 1;
}

.category-badge {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 1;
}

/* Calculators Section */
.calculators {
    padding: 6rem 0;
    background: #fafbfc;
}

#calculators-grid {
    display: grid;
    gap: 3rem;
}

.calculator-category {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.calculator-category h3 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--accent-color);
}

.calculator-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.calculator-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e8eef3;
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.calculator-card:hover::before {
    transform: scaleX(1);
}

.calculator-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.calculator-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.calculator-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.calculator-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Popular Guides Section */
.popular-guides {
    background: var(--light);
}

.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.guide-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.guide-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

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

.guide-category {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.guide-votes {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.guide-card h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.guide-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.guide-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-light);
}

.author {
    font-weight: 600;
    color: var(--primary);
}

.section-cta {
    text-align: center;
    margin-top: 3rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 6rem 2rem;
}

.cta-content h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
}

.cta-content p {
    font-size: 1.35rem;
    opacity: 0.95;
    margin-bottom: 2.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
footer {
    background: var(--darker);
    color: var(--text-white);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-col h4 span {
    opacity: 0.7;
}

.footer-col h5 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: white;
}

.footer-col p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.95rem;
}

.footer-col ul {
    list-style: none;
}

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

.footer-col a {
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: white;
    padding-left: 4px;
}

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

.footer-bottom p {
    color: var(--text-light);
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-menu {
        display: none; /* Mobile menu would go here */
    }

    .hero {
        min-height: 90vh;
        padding: 6rem 1.5rem 4rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid,
    .category-showcase,
    .guides-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    section {
        padding: 4rem 0;
    }

    .features-grid {
        gap: 1.5rem;
    }

    .feature-card {
        padding: 2rem;
    }

    .category-showcase {
        gap: 1.5rem;
    }

    .guides-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content > * {
    animation: fadeInUp 0.8s ease-out backwards;
}

.hero-badge { animation-delay: 0.1s; }
.hero-title { animation-delay: 0.2s; }
.hero-subtitle { animation-delay: 0.3s; }
.hero-buttons { animation-delay: 0.4s; }
.hero-stats { animation-delay: 0.5s; }

/* Smooth transitions */
* {
    transition: background-color 0.2s, border-color 0.2s;
}