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

:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --secondary-color: #06b6d4;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-brand i {
    font-size: 1.75rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

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

.btn-login {
    color: var(--primary-color) !important;
}

.btn-signup {
    background: var(--primary-color);
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    transition: background 0.3s;
}

.btn-signup:hover {
    background: var(--primary-dark);
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5rem 0;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

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

.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

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

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

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

.stat h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat p {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.email-illustration {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.email-illustration i {
    font-size: 8rem;
    opacity: 0.9;
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 3rem;
}

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

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

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

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

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon i {
    font-size: 1.75rem;
    color: white;
}

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

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

/* Calculator Section */
.calculator {
    background: var(--bg-white);
}

.calculator-card {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-light);
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.calculator-input {
    margin-bottom: 2rem;
}

.calculator-input label {
    display: block;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

#emailCount {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #d1d5db;
    outline: none;
    -webkit-appearance: none;
}

#emailCount::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

#emailCount::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

.email-count-display {
    text-align: center;
    margin-top: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.calculator-result {
    text-align: center;
}

.price-display {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
}

.price-display .currency {
    font-size: 2rem;
}

.price-display .period {
    font-size: 1.5rem;
    color: var(--text-light);
}

.price-per-email {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Pricing Section */
.pricing {
    background: var(--bg-light);
}

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

.pricing-card {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

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

.pricing-card.popular {
    border: 2px solid var(--primary-color);
    transform: scale(1.05);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.plan-header {
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

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

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.plan-price .currency {
    font-size: 1.5rem;
    color: var(--text-light);
}

.plan-price .amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.plan-price .period {
    font-size: 1rem;
    color: var(--text-light);
}

.plan-emails {
    color: var(--text-light);
    font-size: 0.875rem;
}

.plan-features {
    list-style: none;
    margin-bottom: 2rem;
}

.plan-features li {
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.plan-features i {
    color: var(--success-color);
    font-size: 1rem;
}

.plan-features .fa-times {
    color: var(--text-light);
}

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

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

.pricing-card .btn {
    width: 100%;
}

/* API Documentation */
.api-docs {
    background: var(--bg-white);
}

.api-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.api-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.api-menu {
    list-style: none;
    background: var(--bg-light);
    border-radius: 0.5rem;
    overflow: hidden;
}

.api-menu li {
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.api-menu li:hover {
    background: var(--bg-white);
}

.api-menu li.active {
    background: var(--bg-white);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.api-section {
    display: none;
}

.api-section.active {
    display: block;
}

.api-section h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.api-section > p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.code-block {
    background: #1e293b;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 2rem;
}

.code-header {
    background: #0f172a;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #94a3b8;
    font-size: 0.875rem;
}

.copy-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: #334155;
    color: white;
}

.code-block pre {
    padding: 1.5rem;
    margin: 0;
    overflow-x: auto;
}

.code-block code {
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.code-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

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

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

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

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

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

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

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

.footer-col a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s;
}

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

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

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

.social-links a:hover {
    background: var(--primary-color);
    color: white;
}

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

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 1rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.3s ease-out;
}

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

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--text-dark);
}

.modal-content h2 {
    margin-bottom: 2rem;
    text-align: center;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

.btn-full {
    width: 100%;
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-light);
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
    }

    .hero-image {
        display: none;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card.popular {
        transform: scale(1);
    }

    .api-content {
        grid-template-columns: 1fr;
    }

    .api-sidebar {
        position: static;
    }

    .api-menu {
        display: flex;
        overflow-x: auto;
    }

    .api-menu li {
        white-space: nowrap;
    }

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

    .modal-content {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .price-display {
        font-size: 3rem;
    }

    .calculator-card {
        padding: 2rem;
    }
}
