:root {
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --text-primary: #0a0a0a;
    --text-secondary: #525252;
    --text-muted: #a3a3a3;
    --border-color: #e5e5e5;
    --accent-primary: #ff4757;
    --accent-secondary: #ff6b81;
    --accent-gradient: linear-gradient(135deg, #ff4757, #ff6b81);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --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);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #171717;
    --text-primary: #fafafa;
    --text-secondary: #a3a3a3;
    --text-muted: #525252;
    --border-color: #262626;
    --accent-primary: #ff6b81;
    --accent-secondary: #ff4757;
    --accent-gradient: linear-gradient(135deg, #ff6b81, #ff4757);
    --glass-bg: rgba(23, 23, 23, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
}

* {
    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(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

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

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

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-secondary);
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #ffa502;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

.notification-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.notification {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease-out;
    pointer-events: auto;
}

.notification.success {
    border-color: #22c55e;
}

.notification.success i {
    color: #22c55e;
}

.notification.error {
    border-color: var(--accent-primary);
}

.notification.error i {
    color: var(--accent-primary);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

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

.logo-img {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 8px rgba(255, 71, 87, 0.3));
}

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

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
}

.theme-toggle:hover {
    background: var(--border-color);
    transform: scale(1.05);
}

.theme-toggle [data-lucide="sun"] {
    display: block;
}

.theme-toggle [data-lucide="moon"] {
    display: none;
}

[data-theme="dark"] .theme-toggle [data-lucide="sun"] {
    display: none;
}

[data-theme="dark"] .theme-toggle [data-lucide="moon"] {
    display: block;
}

.main {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.hero {
    text-align: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

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

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    position: relative;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    margin-bottom: 2.5rem;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: var(--transition);
}

.cta-button:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.cta-button:hover::before {
    opacity: 1;
}

.cta-button:active {
    transform: translateY(-2px);
}

.cta-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-arrow {
    transition: var(--transition);
}

.cta-button:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--accent-gradient);
    filter: blur(20px);
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
}

.cta-button:hover .btn-glow {
    opacity: 0.5;
}

.result-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    margin-bottom: 1rem;
    position: relative;
}

.result-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

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

.result-icon {
    font-size: 1.5rem;
}

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

.result-content {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 1rem;
}

.result-placeholder {
    color: var(--text-muted);
    font-style: italic;
    font-size: 1rem;
    text-align: center;
}

.result-text {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    display: none;
    text-align: center;
    width: 100%;
}

.result-text.show {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

.copy-btn {
    position: absolute;
    bottom: 1.25rem;
    right: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

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

.copy-btn i {
    width: 12px;
    height: 12px;
    transition: var(--transition);
}

.copy-btn:hover i {
    transform: scale(1.1);
}

.api-section {
    margin-top: 2rem;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

.accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.accordion-item:hover {
    transform: translateX(4px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg);
}

.accordion-item.active {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.accordion-header:hover {
    background: rgba(0, 0, 0, 0.02);
}

.accordion-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    color: var(--accent-primary);
    flex-shrink: 0;
    transition: var(--transition);
}

.accordion-item:hover .accordion-icon {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: rotate(-5deg) scale(1.1);
}

.accordion-item.active .accordion-icon {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.accordion-title {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.accordion-title span:not(.method-badge) {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.method-badge {
    align-self: flex-start;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.method-badge.get { background: #22c55e; color: white; }
.method-badge.info { background: #3b82f6; color: white; }
.method-badge.error { background: #ef4444; color: white; }
.method-badge.example { background: #8b5cf6; color: white; }

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

.accordion-chevron {
    transition: var(--transition);
    color: var(--text-muted);
}

.accordion-item.active .accordion-chevron {
    transform: rotate(180deg);
    color: var(--accent-primary);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item.active .accordion-content {
    max-height: 2000px;
}

.accordion-content-inner {
    padding: 0 1.5rem 2rem;
}

.accordion-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.code-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    margin-top: 0.75rem;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
    position: relative;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.copy-code-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.copy-code-btn:hover {
    background: var(--border-color);
    color: var(--accent-primary);
}

.copy-code-btn i {
    width: 12px;
    height: 12px;
}

.copy-code-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.copy-code-btn:active {
    transform: scale(0.95);
}

.code-block pre {
    padding: 0.875rem 1rem;
    overflow-x: auto;
    margin: 0;
    background: var(--bg-primary);
}

.code-block code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8125rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.rate-limit-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0.875rem;
    background: var(--bg-primary);
    border-radius: 8px;
    transition: var(--transition);
}

.rate-item:hover {
    background: var(--bg-secondary);
}

.rate-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.rate-value {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.examples-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.example-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.example-item:hover {
    border-color: var(--accent-primary);
    transform: scale(1.02);
}

.example-header {
    padding: 0.625rem 0.875rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.lang-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.example-item .code-block {
    border: none;
    border-radius: 0;
    margin-top: 0;
}

.example-item .code-block pre {
    padding: 0.875rem 1rem;
}

.footer {
    padding: 3rem 2rem;
    text-align: center;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    border-top-color: var(--accent-primary);
    animation: spin 0.8s linear infinite;
}

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

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .header {
        padding: 1rem 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

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

    .cta-button {
        padding: 1rem 2rem;
        font-size: 1rem;
        width: 100%;
    }

    .result-card {
        padding: 1.5rem;
    }

    .result-text {
        font-size: 1.25rem;
    }

    .api-section {
        margin-top: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .accordion {
        max-width: 100%;
    }

    .accordion-header {
        padding: 1.25rem;
    }

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

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}
