/* Landing Page Styles */

:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --secondary: #0f766e;
    --accent: #d97706;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border: #e5e7eb;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --primary-color: #1e40af;
    --text-color: #1f2937;
    --gradient: linear-gradient(135deg, #1e40af, #1e3a8a);
}

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

html {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background-color: var(--bg-white);
    line-height: 1.6;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

/* Header & Navigation */
header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

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

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

.nav-right {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.lang-selector {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text);
}

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

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

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

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

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
    text-align: center;
}

/* Hero Section */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    width: 100%;
    box-sizing: border-box;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--text);
}

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

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

/* Features Section */
.features {
    background: var(--bg-light);
    padding: 4rem 2rem;
    width: 100%;
    box-sizing: border-box;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 2rem;
    box-sizing: border-box;
}

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

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

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

.feature-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Pricing Section */
.pricing {
    padding: 4rem 2rem;
    background: var(--bg-white);
    width: 100%;
    box-sizing: border-box;
}

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

.pricing-card {
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    padding: 2rem;
    transition: all 0.3s;
    text-align: center;
    position: relative;
}

.pricing-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.2);
    transform: translateY(-5px);
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.3);
    transform: scale(1.05);
}

.pricing-badge {
    position: absolute;
    top: -1rem;
    right: 1rem;
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.pricing-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1rem 0;
}

.pricing-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.pricing-features {
    list-style: none;
    margin: 2rem 0;
    text-align: left;
}

.pricing-features li {
    padding: 0.5rem 0;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features strong {
    color: var(--text);
}

.pricing-cta {
    margin-top: 2rem;
}

/* Auth Section */
.auth-section {
    background: var(--bg-light);
    padding: 4rem 2rem;
    width: 100%;
    box-sizing: border-box;
}

.auth-container {
    max-width: 600px;
    margin: 0 auto;
}

.auth-card {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text);
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-btn {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    background: var(--bg-white);
    color: var(--text);
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.auth-btn:hover {
    border-color: var(--primary);
    background: var(--bg-light);
}

.auth-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.auth-divider {
    text-align: center;
    margin: 2rem 0;
    color: var(--text-light);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    display: inline-block;
    width: 40%;
    height: 1px;
    background: var(--border);
    vertical-align: middle;
    margin: 0 0.5rem;
}

.auth-link {
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

.auth-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

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

/* Upgrade Page */
.upgrade-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.upgrade-header {
    text-align: center;
    margin-bottom: 3rem;
}

.upgrade-header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.upgrade-header p {
    color: var(--text-light);
    font-size: 1.125rem;
}

.current-plan {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 3rem;
    border-left: 4px solid var(--warning);
}

.current-plan h2 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.current-plan-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.plan-stat {
    display: flex;
    flex-direction: column;
}

.plan-stat-main {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
}

.plan-stat-type {
    display: inline;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: normal;
    margin-left: 0.5rem;
}

.plan-stat-note {
    color: var(--text-light);
    font-size: 0.875rem;
    font-style: italic;
    margin-top: 0.25rem;
}

.plan-stat-label {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.plan-stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Progress bars */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient);
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* Alert boxes */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-warning {
    background-color: #fef3c7;
    border-left: 4px solid var(--warning);
    color: #92400e;
}

.alert-error {
    background-color: #fee2e2;
    border-left: 4px solid var(--error);
    color: #991b1b;
}

.alert::before {
    content: '⚠️';
    font-size: 1.25rem;
}

.alert-error::before {
    content: '🚫';
}

/* Status colors */
.status-active {
    color: var(--success) !important;
}

.status-trialing {
    color: var(--primary-color) !important;
}

.status-paused {
    color: var(--warning) !important;
}

.status-canceled, .status-cancelled {
    color: var(--text-light) !important;
}

.status-past_due {
    color: var(--error) !important;
}

.status-expired {
    color: var(--error) !important;
}

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

.plan-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
}

.plan-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.plan-type-badge.subscription {
    background-color: #dbeafe;
    color: #1e40af;
}

.plan-type-badge.one-time {
    background-color: #fef3c7;
    color: #92400e;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.plan-card.recommended {
    border: 2px solid var(--primary-color);
}

.plan-card.recommended::before {
    content: 'RECOMMENDED';
    position: absolute;
    top: 1rem;
    right: -2rem;
    background: var(--gradient);
    color: white;
    padding: 0.25rem 3rem;
    font-size: 0.75rem;
    font-weight: 600;
    transform: rotate(45deg);
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

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

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

.plan-features li {
    padding: 0.75rem 0;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.plan-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: bold;
    font-size: 1.25rem;
}

.btn-subscribe {
    width: 100%;
    padding: 1rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 6px 18px rgba(30, 64, 175, 0.25);
}

.btn-subscribe:hover {
    transform: scale(1.02);
}

.btn-subscribe:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-subscribe.btn-current {
    background: #4CAF50;
    cursor: default;
}

.btn-subscribe.btn-disabled {
    background: #9e9e9e;
    font-size: 0.85rem;
}

/* Plan card states */
.plan-card.current {
    border: 2px solid #4CAF50;
    position: relative;
}

.plan-card.unavailable {
    opacity: 0.7;
}

.plan-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Subscription status colors */
.status-active {
    color: #4CAF50;
    font-weight: 600;
}

.status-paused {
    color: #FF9800;
    font-weight: 600;
}

.status-canceled, .status-cancelled {
    color: #f44336;
    font-weight: 600;
}

.status-trialing {
    color: #2196F3;
    font-weight: 600;
}

.status-past_due {
    color: #ff5722;
    font-weight: 600;
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .plans-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer */
footer {
    background: var(--text);
    color: white;
    padding: 3rem 2rem;
    width: 100%;
    box-sizing: border-box;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

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

.footer-section h4 {
    font-weight: 700;
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

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

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

/* Responsive Design */
@media (max-width: 1024px) {
    nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
        font-size: 0.875rem;
    }

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

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

    .hero-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn {
        width: 100%;
    }

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

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

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

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

    .auth-card {
        padding: 1.5rem;
    }

    .auth-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .nav-right {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .hero {
        padding: 2rem 1rem;
        min-height: 400px;
    }

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

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

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

    .section-subtitle {
        font-size: 1rem;
    }

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

    .features,
    .pricing,
    .auth-section {
        padding: 2rem 1rem;
    }

    .container {
        padding: 0 1rem;
    }
}
