:root {
    --primary: #00d4ff;
    --primary-dark: #00a8cc;
    --primary-glow: rgba(0, 212, 255, 0.3);
    --secondary: #0066ff;
    --accent: #7b2fff;
    --background: #0a0a0f;
    --surface: #12121a;
    --surface-hover: #1a1a25;
    --surface-card: #16161f;
    --text: #f0f0f5;
    --text-muted: #8888a0;
    --text-dim: #555570;
    --border: #252535;
    --border-light: #353550;
    --code-bg: #0d0d14;
    --link: #00d4ff;
    --success: #00ff88;
    --warning: #ffaa00;
    --error: #ff4466;
    --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #7b2fff 100%);
    --gradient-card: linear-gradient(145deg, #16161f 0%, #0d0d14 100%);
    --glow-primary: 0 0 30px rgba(0, 212, 255, 0.15);
    --glow-accent: 0 0 30px rgba(123, 47, 255, 0.15);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(123, 47, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }

a {
    color: var(--link);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
    text-shadow: 0 0 10px var(--primary-glow);
}

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

.navbar > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    max-width: 1400px;
    margin: 0 auto;
}

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

.nav-brand .logo {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-brand .version {
    background: var(--gradient-primary);
    color: #000;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 8rem 0 4rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.hero .tagline {
    font-size: 1.35rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero .badges {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.hero .badges img {
    height: 28px;
    border-radius: 4px;
}

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

.btn-primary {
    background: var(--gradient-primary);
    color: #000;
    box-shadow: var(--glow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.3);
    color: #000;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(0, 212, 255, 0.1);
}

/* Section */
.section {
    padding: 4rem 0;
    position: relative;
}

.section h2 {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section h2::before {
    content: '';
    width: 4px;
    height: 28px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

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

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

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

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--border-light);
    box-shadow: var(--glow-primary);
}

.card:hover::before {
    opacity: 1;
}

.card h3 {
    color: var(--text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card h3 .icon {
    color: var(--primary);
    font-size: 1.25rem;
}

.card ul {
    list-style: none;
}

.card li {
    padding: 0.5rem 0;
    padding-left: 1.25rem;
    position: relative;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 600;
}

/* Code Block */
.code-block {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.code-header span {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
}

.code-header button {
    background: var(--gradient-primary);
    color: #000;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.code-header button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--primary-glow);
}

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

.code-block code {
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text);
}

/* Inline Code */
code {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
}

pre code {
    background: transparent;
    padding: 0;
    color: var(--text);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

th, td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

td {
    color: var(--text-muted);
}

tr:hover td {
    background: rgba(0, 212, 255, 0.02);
}

/* Note/Warning boxes */
.note, .warning, .info, .tip {
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.note {
    background: rgba(0, 212, 255, 0.05);
    border-color: var(--primary);
    color: var(--text-muted);
}

.warning {
    background: rgba(255, 170, 0, 0.05);
    border-color: var(--warning);
    color: var(--warning);
}

.info {
    background: rgba(123, 47, 255, 0.05);
    border-color: var(--accent);
    color: var(--text-muted);
}

.tip {
    background: rgba(0, 255, 136, 0.05);
    border-color: var(--success);
    color: var(--text-muted);
}

.note strong, .warning strong, .info strong, .tip strong {
    color: var(--text);
}

/* API Container */
.api-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    padding-top: 100px;
    max-width: 1500px;
    margin: 0 auto;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.sidebar h3 {
    color: var(--text-dim);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.toc {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.toc a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.toc a svg {
    color: var(--primary);
    flex-shrink: 0;
}

.toc a:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.toc a.active {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary);
}

/* API Content */
.api-content {
    min-width: 0;
    padding-bottom: 4rem;
}

.api-content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.api-section {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}

.api-section:last-child {
    border-bottom: none;
}

.api-section h2 {
    font-size: 1.75rem;
    color: var(--text);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.api-method {
    margin-bottom: 2.5rem;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.api-method h3 {
    margin-bottom: 1rem;
}

.api-method h3 code {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.1rem;
    font-weight: 700;
}

.api-method h4 {
    color: var(--text);
    margin: 1.5rem 0 0.75rem;
    font-size: 1rem;
}

.api-method > p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Example Section */
.example-section {
    margin-bottom: 4rem;
}

.example-section h2 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.example-section > p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand .logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 3rem;
}

.footer-column h4 {
    color: var(--text);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

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

.footer-column a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

.footer-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Donation Section */
.donation-section {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    margin: 2rem 0;
}

.donation-section h3 {
    color: var(--text);
    margin-bottom: 1rem;
}

.donation-section p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.donation-section img {
    max-width: 400px;
    border-radius: 12px;
    margin: 1.5rem auto;
    display: block;
    box-shadow: var(--glow-primary);
}

/* TOS Section */
.tos-section {
    background: rgba(255, 68, 102, 0.05);
    border: 1px solid rgba(255, 68, 102, 0.2);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.tos-section h3 {
    color: var(--error);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.tos-section li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 68, 102, 0.1);
}

.tos-section li:last-child {
    border-bottom: none;
}

.tos-section li::before {
    content: '⚠';
    position: absolute;
    left: 0;
    color: var(--warning);
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.stat-card .number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .api-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        max-height: none;
        margin-bottom: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .navbar > div {
        height: 60px;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .tagline {
        font-size: 1.1rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .footer .container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 2rem;
    }
    
    .donation-section img {
        max-width: 100%;
    }
}

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

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

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

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

/* Selection */
::selection {
    background: var(--primary);
    color: var(--background);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px var(--primary-glow); }
    50% { box-shadow: 0 0 40px var(--primary-glow); }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

/* Logo Image */
.logo-img {
    height: 40px;
    width: auto;
}

/* Card Icons */
.card-icon {
    width: 24px;
    height: 24px;
    margin-right: 0.5rem;
    color: var(--primary);
    flex-shrink: 0;
}

.card h3 {
    display: flex;
    align-items: center;
}

/* Developer Card */
.overview-content {
    margin-top: 2rem;
}

.overview-text {
    max-width: 900px;
}

.developer-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
}

.developer-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    box-shadow: var(--glow-primary);
    flex-shrink: 0;
}

.developer-info h4 {
    font-size: 1.35rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.developer-title {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.75rem !important;
    font-size: 0.95rem;
}

.developer-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem !important;
}

.developer-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.dev-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.dev-link:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: var(--primary);
    color: var(--text);
}

.dev-link svg {
    color: var(--primary);
}

/* TOS Section Icons */
.tos-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tos-section h3 svg {
    color: var(--warning);
}

/* Donation Section */
.donation-section h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.donation-section h3 svg {
    color: var(--error);
}

/* Responsive Developer Card */
@media (max-width: 600px) {
    .developer-card {
        flex-direction: column;
        text-align: center;
    }
    
    .developer-avatar {
        margin: 0 auto;
    }
    
    .developer-links {
        justify-content: center;
    }
}
