/* ProxyBoi - Stylesheet */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

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

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

/* Header */
.header {
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

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

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

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

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

.btn-docs, .btn-admin {
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: background-color 0.2s;
}

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

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

.btn-admin {
    background: var(--secondary-color);
}

.btn-admin:hover {
    background: #475569;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--surface-color) 0%, var(--background-color) 100%);
}

.hero h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-number {
    font-size: 2rem;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* How It Works Section */
.how-it-works {
    padding: 4rem 0;
    background: var(--surface-color);
}

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

.flow-diagram {
    margin-bottom: 4rem;
}

.flow-widget {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    min-height: 400px;
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    width: fit-content;
    max-width: 100%;
}

.flow-steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.flow-step {
    display: inline-block;
    width: 240px;
    height: 140px;
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
    padding: 1.2rem;
    margin: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    vertical-align: middle;
}

.flow-step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.flow-step.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
}

.flow-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-size: 1.2rem;
    font-weight: bold;
}

.flow-step-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.flow-step-desc {
    font-size: 0.75rem;
    opacity: 0.8;
}

.flow-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: bold;
    margin: 0 0.5rem;
    height: 140px;
}

.flow-details {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--background-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.flow-details h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.flow-details p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
}

.diagram-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 3rem;
    background: var(--background-color);
    border-radius: var(--border-radius);
    border: 2px dashed var(--border-color);
}

.step {
    text-align: center;
    flex: 1;
    max-width: 200px;
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

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

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

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

.diagram-note {
    text-align: center;
    padding: 1rem;
    background: #fef3cd;
    border: 1px solid #f6e05e;
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

.diagram-note code {
    background: #2d3748;
    color: #e2e8f0;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

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

.feature {
    padding: 2rem;
    background: var(--background-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.feature h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

/* Usage Section */
.usage {
    padding: 4rem 0;
    background: var(--background-color);
}

.usage h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.endpoint-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

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

.method {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
}

.url {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.rate-limit {
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    background: var(--surface-color);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    overflow: hidden;
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    font-size: 0.875rem;
}

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

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

.usage-grid {
    position: relative;
}

.code-example {
    position: relative;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    display: none;
}

.code-example.active {
    display: block;
}

.code-example h3 {
    background: var(--text-primary);
    color: white;
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.code-example pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
    background: #2d3748 !important;
}

.code-example code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.copy-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.copy-button:hover {
    background: var(--primary-dark);
}

/* Examples Section */
.examples {
    padding: 4rem 0;
    background: var(--surface-color);
}

.examples h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

.example-container {
    margin-bottom: 2rem;
    background: var(--background-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.example-container h3 {
    background: var(--text-primary);
    color: white;
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.example-container pre {
    margin: 0;
    padding: 1.5rem;
    background: #2d3748 !important;
    overflow-x: auto;
}

.supported-urls {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--background-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.supported-urls h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.url-examples {
    display: grid;
    gap: 1rem;
}

.url-example {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.url-example strong {
    min-width: 100px;
    color: var(--primary-color);
    font-weight: 600;
}

.url-example code {
    background: #2d3748;
    color: #e2e8f0;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
}

/* Getting Started Section */
.getting-started {
    padding: 4rem 0;
    background: var(--background-color);
}

.getting-started h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

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

.step-card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

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

.step-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.step-card code {
    background: #2d3748;
    color: #e2e8f0;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #cbd5e1;
    line-height: 1.6;
}

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

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

.footer-section ul li a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s;
}

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

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: #cbd5e1;
}

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

    .nav {
        gap: 1rem;
    }

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

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .diagram-placeholder {
        flex-direction: column;
        gap: 1rem;
    }

    .arrow {
        transform: rotate(90deg);
    }

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

    .endpoint-info {
        flex-direction: column;
        gap: 1rem;
    }

    .url-example {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 2rem 0;
    }

    .how-it-works,
    .usage,
    .examples,
    .getting-started {
        padding: 2rem 0;
    }

    .hero h2 {
        font-size: 1.75rem;
    }

    .how-it-works h2,
    .usage h2,
    .examples h2,
    .getting-started h2 {
        font-size: 2rem;
    }
}