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

/* Light theme (default) */
:root {
    --primary: #008800;
    --primary-dark: #006600;
    --primary-light: #00aa00;
    --secondary: #008800;
    --background: #ffffff;
    --surface: #f5f5f5;
    --surface-light: #eeeeee;
    --text: #000000;
    --text-secondary: #555555;
    --success: #008800;
    --error: #cc0000;
    --border: #cccccc;
}

/* Dark theme */
[data-theme="dark"] {
    --primary: #00ff00;
    --primary-dark: #00cc00;
    --primary-light: #33ff33;
    --secondary: #00ff00;
    --background: #000000;
    --surface: #0a0a0a;
    --surface-light: #141414;
    --text: #ffffff;
    --text-secondary: #aaaaaa;
    --success: #00ff00;
    --error: #ff3333;
    --border: #333333;
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: border-color 0.2s;
}

.theme-toggle:hover {
    border-color: var(--primary);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

:root .theme-toggle .icon-moon {
    display: inline;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: inline;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

/* Badges Section */
.product-badge-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 1rem;
    margin: 0 auto;
    max-width: 600px;
    flex-wrap: wrap;
}

.product-badge-section a {
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s;
    text-decoration: none;
}

.product-badge-section img {
    height: 48px;
    width: auto;
}

.product-badge-section a:hover {
    transform: scale(1.05);
}

.x-badge {
    background: #000;
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    gap: 0.5rem;
}

.x-badge:hover {
    background: #333;
}

[data-theme="dark"] .x-badge {
    background: #fff;
    color: #000;
}

[data-theme="dark"] .x-badge:hover {
    background: #e0e0e0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.background-gradient {
    display: none;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    border-bottom: 1px solid var(--border);
}

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

.logo-icon {
    font-size: 1.75rem;
}

.logo-text {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

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

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

#auth-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 1rem;
    padding-left: 1.5rem;
    border-left: 1px solid var(--border);
}

.nav-auth-btn {
    background: transparent;
    border: 1px solid var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    color: var(--primary) !important;
    transition: background 0.2s;
}

.nav-auth-btn:hover {
    background: var(--primary);
    color: var(--background) !important;
}

/* Hero Section */
.hero {
    padding: 4rem 5% 6rem;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.gradient-text {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* Shortener Card */
.shortener-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.url-form {
    width: 100%;
}

.input-wrapper {
    display: flex;
    gap: 1rem;
    background: var(--surface-light);
    border-radius: 0.25rem;
    padding: 0.5rem;
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
}

#url-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    color: var(--text);
    outline: none;
    font-family: inherit;
}

#url-input::placeholder {
    color: var(--text-secondary);
}

#submit-btn {
    background: var(--primary);
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--background);
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    min-width: 120px;
}

#submit-btn:hover {
    background: var(--primary-light);
}

#submit-btn:active {
    background: var(--primary-dark);
}

#submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-top-color: var(--background);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Advanced Options */
.toggle-advanced {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0;
    font-family: inherit;
    transition: color 0.2s;
}

.toggle-advanced:hover {
    color: var(--primary);
}

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

.toggle-advanced.active .toggle-arrow {
    transform: rotate(180deg);
}

.advanced-options {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.advanced-row {
    margin-bottom: 1rem;
}

.advanced-row:last-child {
    margin-bottom: 0;
}

.advanced-row label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.advanced-row input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background: var(--surface-light);
    color: var(--text);
    font-size: 0.875rem;
    font-family: inherit;
}

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

.advanced-row small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.pro-badge {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #000;
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Result */
.result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--surface-light);
    border: 1px solid var(--primary);
    border-radius: 0.25rem;
    animation: slideIn 0.3s ease;
}

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

.result-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: var(--background);
    border-radius: 50%;
    font-size: 0.875rem;
}

.result-url-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

#short-url {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    color: var(--primary);
    font-weight: 500;
    font-family: monospace;
}

.copy-btn {
    background: var(--primary);
    border: none;
    padding: 0.875rem 1rem;
    border-radius: 0.25rem;
    color: var(--background);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    background: var(--primary-light);
}

.copy-btn.copied {
    background: var(--primary);
}

.result-original {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.result-original a {
    color: var(--text-secondary);
    text-decoration: none;
    word-break: break-all;
    transition: color 0.2s;
}

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

/* Result QR Code */
.result-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.result-qr img {
    width: 150px;
    height: 150px;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: white;
}

.download-qr-btn {
    background: var(--primary);
    color: var(--background);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.download-qr-btn:hover {
    background: var(--primary-light);
}

/* Error */
.error {
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--surface-light);
    border: 1px solid var(--error);
    border-radius: 0.25rem;
    color: var(--error);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
}

.error-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--error);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.875rem;
}

/* Stats Row */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 4rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

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

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Features Section */
.features {
    padding: 6rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    border-top: 1px solid var(--border);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text);
}

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

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    padding: 2rem;
    transition: border-color 0.2s;
}

.feature-card:hover {
    border-color: var(--primary);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

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

/* How It Works */
.how-it-works {
    padding: 6rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid var(--border);
}

.how-it-works h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 4rem;
    color: var(--text);
}

.steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.step {
    text-align: center;
    max-width: 250px;
}

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

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

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

.step-arrow {
    font-size: 2rem;
    color: var(--primary);
}

/* Pricing Section */
.pricing {
    padding: 6rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    border-top: 1px solid var(--border);
}

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

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

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

.pricing-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color 0.2s, transform 0.2s;
}

.pricing-card:hover {
    border-color: var(--primary);
}

.pricing-card.featured {
    border-color: var(--primary);
    border-width: 2px;
    transform: scale(1.02);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--background);
    padding: 0.25rem 1rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

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

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

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

.pricing-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.pricing-features {
    list-style: none;
    flex: 1;
    margin-bottom: 2rem;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    color: var(--text);
    font-size: 0.9375rem;
}

.pricing-features li.disabled {
    color: var(--text-secondary);
}

.pricing-features .check {
    color: var(--primary);
    font-weight: 700;
}

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

.pricing-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
    background: var(--primary);
    border: 2px solid var(--primary);
    color: var(--background);
}

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

.pricing-btn-outline {
    background: transparent;
    color: var(--primary);
}

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

/* Footer */
footer {
    padding: 3rem 5%;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary);
}

footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links > a:not(.nav-auth-btn) {
        display: none;
    }

    #auth-links {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
    }

    .input-wrapper {
        flex-direction: column;
    }

    #submit-btn {
        width: 100%;
    }

    .stats-row {
        gap: 2rem;
    }

    .step-arrow {
        display: none;
    }

    .steps {
        flex-direction: column;
    }
}

/* Hidden utility */
[hidden] {
    display: none !important;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

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

.toast-error {
    background: var(--error);
    color: white;
}

/* PRO badge */
.pro-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.15rem 0.4rem;
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

/* FAQ Section */
.faq {
    padding: 5rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.faq h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

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

.faq-grid {
    display: grid;
    gap: 1rem;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: border-color 0.2s;
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-item h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .faq h2 {
        font-size: 1.75rem;
    }

    .faq-item {
        padding: 1.25rem;
    }

    .faq-item h3 {
        font-size: 1rem;
    }
}
