/* TheClapty API Theme - Enhanced */

:root {
    --primary: #a855f7;
    --primary-light: #c084fc;
    --primary-dark: #7e22ce;
    --secondary: #6366f1;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --dark-lighter: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

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

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

.api-badge {
    background: var(--gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

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

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

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(168, 85, 247, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168, 85, 247, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

#particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    color: var(--success);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s ease-in-out infinite;
}

.status-dot.active {
    box-shadow: 0 0 10px var(--success);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.stat-card {
    background: rgba(168, 85, 247, 0.05);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    background: rgba(168, 85, 247, 0.1);
    border-color: var(--primary);
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin: 0.5rem 0;
}

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

/* Quick Start */
.quick-start {
    margin: 3rem 0;
}

.code-block {
    background: var(--dark-light);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    text-align: left;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(168, 85, 247, 0.1);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--primary);
}

.copy-btn {
    background: none;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

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

.code-block pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text);
}

/* Section Styling */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: var(--gradient);
    margin: 1rem auto;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
}

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

.service-card {
    background: var(--dark-light);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.service-icon.store { background: rgba(168, 85, 247, 0.1); color: var(--primary); }
.service-icon.github { background: rgba(99, 102, 241, 0.1); color: var(--secondary); }
.service-icon.discord { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.service-icon.utils { background: rgba(245, 158, 11, 0.1); color: var(--warning); }

.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.service-description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.feature-tag {
    background: rgba(168, 85, 247, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.service-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s;
}

.service-link:hover {
    gap: 1rem;
}

/* Endpoints */
.endpoint-category {
    margin-bottom: 3rem;
}

.category-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-title i {
    color: var(--primary);
}

.endpoints-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.endpoint-item {
    background: var(--dark-light);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    overflow: hidden;
}

.endpoint-header {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.endpoint-header:hover {
    background: rgba(168, 85, 247, 0.05);
}

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

.method {
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.75rem;
}

.method.get { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.method.post { background: rgba(99, 102, 241, 0.2); color: var(--secondary); }
.method.patch { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.method.delete { background: rgba(239, 68, 68, 0.2); color: var(--danger); }

.path {
    font-family: 'Fira Code', monospace;
    color: var(--text);
    font-size: 0.95rem;
}

.endpoint-body {
    padding: 0 1.5rem 1.5rem;
    display: none;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

.endpoint-body.active {
    display: block;
}

.endpoint-description {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.endpoint-params {
    margin: 1rem 0;
}

.endpoint-params ul {
    margin-left: 1.5rem;
    color: var(--text-muted);
}

.endpoint-params code {
    background: rgba(168, 85, 247, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    color: var(--primary);
}

.endpoint-example {
    margin: 1rem 0;
}

.example-header {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.endpoint-example pre {
    background: var(--dark);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
}

/* Playground */
.playground-container {
    background: var(--dark-light);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
}

.playground-controls {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.control-group select,
.control-group input {
    background: var(--dark);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.control-group select:focus,
.control-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.playground-response {
    padding: 2rem;
}

.response-header {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

#response-output {
    background: var(--dark);
    padding: 1.5rem;
    border-radius: 0.5rem;
    min-height: 200px;
    overflow-x: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.3);
}

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

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

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(99, 102, 241, 0.1));
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

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

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

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

    .nav-menu {
        display: none;
    }

    .services-grid,
    .hero-stats {
        grid-template-columns: 1fr;
    }

    .playground-controls {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }
}
