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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --accent: #f472b6;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light: #f1f5f9;
    --white: #ffffff;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --gradient-2: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

html {
    scroll-behavior: smooth;
}

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

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -150px;
    left: -150px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(-30px, -20px) scale(1.02); }
}

/* Container */
.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    color: var(--primary-light);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 32px;
}

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

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 0 40px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.highlight {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-light);
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Proxy Form */
.proxy-form {
    max-width: 700px;
    margin: 0 auto;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: var(--dark-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 8px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.input-icon {
    width: 24px;
    height: 24px;
    margin-left: 16px;
    color: var(--gray);
    flex-shrink: 0;
}

.url-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 16px;
    font-size: 1.1rem;
    color: var(--white);
}

.url-input::placeholder {
    color: var(--gray);
}

.browse-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-1);
    color: var(--white);
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.browse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.browse-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.browse-btn svg {
    width: 20px;
    height: 20px;
}

/* Status and Error Messages */
.error-message, .status-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
}

.error-message svg {
    width: 18px;
    height: 18px;
}

.status-message {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--primary-light);
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: var(--primary-light);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Quick Links */
.quick-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.quick-label {
    color: var(--gray);
    font-size: 0.9rem;
}

.quick-link {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray-light);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-link:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    color: var(--white);
}

/* Browse Options */
.browse-options {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
}

.option-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-light);
    font-size: 0.9rem;
    cursor: pointer;
}

.option-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Iframe Container */
.iframe-container {
    margin-top: 40px;
    background: var(--dark-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.iframe-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.iframe-url-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-light);
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: var(--radius);
    flex: 1;
    max-width: 600px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.iframe-url-bar svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.iframe-controls {
    display: flex;
    gap: 8px;
}

.iframe-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray-light);
    padding: 8px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.iframe-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
    color: var(--white);
}

.iframe-btn svg {
    width: 18px;
    height: 18px;
}

.proxy-frame {
    width: 100%;
    height: 70vh;
    border: none;
    background: var(--white);
}

/* Section Title */
.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 48px;
}

/* Features Section */
.features {
    padding: 80px 0;
}

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

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: var(--white);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

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

/* How It Works */
.how-it-works {
    padding: 80px 0;
}

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

.step {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    text-align: center;
    padding: 32px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--gradient-2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.step p {
    color: var(--gray-light);
    font-size: 0.9rem;
}

.step-arrow {
    color: var(--gray);
    flex-shrink: 0;
}

.step-arrow svg {
    width: 32px;
    height: 32px;
}

/* Tech Info */
.tech-info {
    padding: 80px 0;
}

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

.tech-item {
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
}

.tech-item h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-light);
}

.tech-item p {
    color: var(--gray-light);
    font-size: 0.9rem;
}

/* FAQ Section */
.faq {
    padding: 80px 0;
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: color 0.2s;
}

.faq-question:hover {
    color: var(--primary-light);
}

.faq-question svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 16px;
}

.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;
    padding-bottom: 24px;
}

.faq-answer p {
    color: var(--gray-light);
}

/* Footer */
.footer {
    padding: 48px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 40px;
}

.footer-content {
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--gray-light);
}

.footer-brand .logo-icon {
    width: 24px;
    height: 24px;
}

.footer-text {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.footer-disclaimer {
    color: var(--gray);
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
    }

    .nav {
        gap: 20px;
    }

    .hero {
        padding: 40px 0;
    }

    .input-wrapper {
        flex-direction: column;
        padding: 16px;
    }

    .input-icon {
        display: none;
    }

    .url-input {
        width: 100%;
        text-align: center;
    }

    .browse-btn {
        width: 100%;
        justify-content: center;
        margin-top: 12px;
    }

    .step-arrow {
        display: none;
    }

    .steps {
        flex-direction: column;
    }

    .step {
        max-width: 100%;
    }

    .browse-options {
        flex-direction: column;
        gap: 12px;
    }

    .iframe-toolbar {
        flex-direction: column;
        gap: 12px;
    }

    .iframe-url-bar {
        max-width: 100%;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}
