/* ==========================================
   Maveraa Proxy - Modern Web Proxy Stylesheet
   ========================================== */

:root,
[data-theme="dark"] {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --accent: #f093fb;
    --dark: #1a1a2e;
    --darker: #0f0f1e;
    --card-bg: #16213e;
    --card-border: #1a2744;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;
    --white: #ffffff;
    --success: #48bb78;
    --warning: #f6ad55;
    --danger: #fc8181;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --navbar-bg: rgba(15, 15, 30, 0.85);
    --input-bg: #0f0f1e;
}

[data-theme="light"] {
    --dark: #f1f5f9;
    --darker: #ffffff;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-light: #475569;
    --white: #0f172a;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --navbar-bg: rgba(255, 255, 255, 0.9);
    --input-bg: #f1f5f9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--darker);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   Navbar
   ========================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--white);
}

.logo-icon {
    font-size: 24px;
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--white);
}

/* ==========================================
   Hero Section
   ========================================== */

.hero {
    position: relative;
    padding: 140px 0 80px;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(240, 147, 251, 0.08) 0%, transparent 50%);
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--white) 0%, var(--text-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 580px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

/* ==========================================
   Proxy Form
   ========================================== */

.proxy-form-wrapper {
    max-width: 680px;
    margin: 0 auto;
}

.proxy-form {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-lg);
}

.input-group {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.3s;
}

.input-group:focus-within {
    border-color: var(--primary);
}

.input-icon {
    padding: 0 4px 0 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 12px;
    color: var(--white);
    font-size: 15px;
    font-family: inherit;
    outline: none;
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.btn-go {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 28px;
    background: var(--gradient);
    color: var(--white);
    border: none;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-go:hover {
    opacity: 0.9;
    transform: translateX(2px);
}

.btn-go:active {
    transform: scale(0.98);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    gap: 16px;
    flex-wrap: wrap;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-group label {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

.option-group select {
    background: var(--input-bg);
    color: var(--text-light);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
}

.option-group select:focus {
    border-color: var(--primary);
}

.option-toggles {
    display: flex;
    gap: 16px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    accent-color: var(--primary);
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.toggle-text {
    font-weight: 500;
}

.form-disclaimer {
    text-align: center;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.form-disclaimer a {
    color: var(--primary);
    text-decoration: none;
}

.form-disclaimer a:hover {
    text-decoration: underline;
}

/* ==========================================
   Features Section
   ========================================== */

.features {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 48px;
    color: var(--white);
    letter-spacing: -0.02em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ==========================================
   How It Works
   ========================================== */

.how-it-works {
    padding: 80px 0;
    background: var(--dark);
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.step {
    text-align: center;
    max-width: 250px;
}

.step-number {
    width: 56px;
    height: 56px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: var(--white);
    margin: 0 auto 16px;
}

.step h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.step p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.step-arrow {
    font-size: 28px;
    color: var(--primary);
    font-weight: 700;
}

/* ==========================================
   FAQ Section
   ========================================== */

.faq {
    padding: 80px 0;
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: color 0.2s;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-question svg {
    transition: transform 0.3s;
    flex-shrink: 0;
    color: var(--text-muted);
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 0 20px 18px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ==========================================
   Footer
   ========================================== */

.footer {
    padding: 60px 0 0;
    background: var(--dark);
    border-top: 1px solid var(--card-border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 8px;
}

.footer-links h4 {
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--card-border);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ==========================================
   Loading State
   ========================================== */

.loading .btn-go {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.loading .btn-go::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   Error Page
   ========================================== */

.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}

.error-page .error-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.error-page h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 12px;
}

.error-page p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 24px;
    max-width: 400px;
}

.error-page .btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--gradient);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    transition: opacity 0.2s;
}

.error-page .btn-back:hover {
    opacity: 0.9;
}

/* ==========================================
   Theme Toggle
   ========================================== */

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--card-border);
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

[data-theme="light"] .logo-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .hero-title {
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .navbar {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* ==========================================
   Loading Overlay
   ========================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: var(--darker);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.loader-container {
    text-align: center;
}

.spinner {
    width: 56px;
    height: 56px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 24px;
}

.loader-container h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}

.loader-url {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 400px;
    word-break: break-all;
    margin: 0 auto 20px;
}

.progress-bar {
    width: 300px;
    height: 4px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient);
    border-radius: 4px;
    animation: progress 4s ease-in-out forwards;
}

@keyframes progress {
    0% { width: 0%; }
    30% { width: 40%; }
    60% { width: 70%; }
    80% { width: 85%; }
    100% { width: 95%; }
}

.loader-tip {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 24px;
}

/* ==========================================
   Bandwidth Section
   ========================================== */

.bandwidth-section {
    padding: 40px 0;
}

.bandwidth-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 24px 32px;
}

.bandwidth-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bandwidth-icon {
    font-size: 28px;
}

.bandwidth-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bandwidth-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 768px) {
    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        flex-direction: column;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        display: none;
    }

    .input-group {
        flex-direction: column;
        border-radius: var(--radius-sm);
    }

    .input-group input {
        width: 100%;
    }

    .btn-go {
        width: 100%;
        justify-content: center;
        border-radius: 0 0 6px 6px;
    }

    .bandwidth-card {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .progress-bar {
        width: 250px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 26px;
    }

    .proxy-form {
        padding: 16px;
    }

    .section-title {
        font-size: 24px;
    }
}
