:root {
    --bg-core: #050505;
    --bg-surface: #0f0f0f;
    --bg-card: rgba(20, 20, 20, 0.7);
    --primary: hsl(16, 100%, 50%);
    --primary-glow: rgba(255, 69, 0, 0.4);
    --accent-cyan: #00f2ff;
    --accent-purple: #bd00ff;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --border-light: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --transition-smooth: cubic-bezier(0.645, 0.045, 0.355, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-core);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(255, 69, 0, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(189, 0, 255, 0.04) 0%, transparent 50%);
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.6;
}

.container {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

header {
    padding: 3rem 0 2rem 0;
    text-align: center;
}

.brand {
    margin-bottom: 2rem;
}

.brand h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-main);
    text-shadow: 0 0 40px var(--primary-glow);
}

.brand h1 span {
    color: var(--primary);
}

.brand p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.5rem;
}

.nav-tabs {
    display: inline-flex;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    padding: 6px;
    gap: 4px;
}

.nav-tab {
    padding: 0.6rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: 50px;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
}

.nav-tab:hover {
    color: var(--text-main);
}

.nav-tab.active {
    background: var(--text-main);
    color: var(--bg-core);
}

main {
    padding: 3rem 0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s var(--transition-smooth);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.card {
    background: rgba(20, 20, 20, 0.85);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: border-color 0.3s ease;
}

.card:hover {
    border-color: var(--border-hover);
}

.card-header {
    margin-bottom: 2rem;
}

.card-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.card-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    transition: all 0.3s var(--transition-smooth);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 69, 0, 0.15);
}

.form-input::placeholder {
    color: rgba(160, 160, 160, 0.5);
}

.server-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.server-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.5rem;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.server-btn:hover {
    border-color: var(--border-hover);
    background: rgba(30, 30, 30, 0.8);
}

.server-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, hsl(8, 100%, 45%) 100%);
    border-color: var(--primary);
    color: var(--text-main);
}

.server-btn span {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn {
    width: 65%;
    max-width: 400px;
    margin: 0 auto;
    display: block;
    padding: 1.1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, hsl(8, 100%, 45%) 100%);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.2);
}

.btn::before {
    content: "🚀";
    position: absolute;
    left: 2rem;
    font-size: 1.2rem;
    transition: transform 0.3s var(--transition-smooth);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--primary-glow);
}

.btn:hover::before {
    transform: translateX(3px);
}

.btn:active {
    transform: translateY(0);
}

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

.btn.loading {
    color: transparent;
}

.btn.loading::before {
    display: none;
}

.btn.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--text-main);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.response-panel {
    margin-top: 2rem;
    display: none;
    opacity: 0;
    transform: translateY(10px);
}

.response-panel.visible {
    display: block;
    animation: fadeInUp 0.4s var(--transition-smooth) forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
    }
}

.response-summary {
    background: rgba(20, 20, 20, 0.85);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.response-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.response-header h3::before {
    content: "✨";
    font-size: 1.5rem;
}

.status-badge {
    padding: 0.4rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.status-badge.success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

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

.response-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: border-color 0.3s ease;
}

.response-card:hover {
    border-color: var(--border-hover);
}

.response-card-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.response-card-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.response-card-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.response-card-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.player-card {
    border-left: 3px solid var(--primary);
}

.success-card {
    border-left: 3px solid #22c55e;
}

.success-card .response-card-value {
    color: #22c55e;
}

.failed-card {
    border-left: 3px solid #ef4444;
}

.failed-card .response-card-value {
    color: #ef4444;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.raw-json-section {
    margin-top: 1.5rem;
}

.json-toggle {
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.json-toggle:hover {
    border-color: var(--border-hover);
    color: var(--text-main);
}

.json-toggle-icon {
    transition: transform 0.3s var(--transition-smooth);
}

.json-toggle.expanded .json-toggle-icon {
    transform: rotate(180deg);
}

.response-body {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    overflow-x: auto;
    margin-top: 0.75rem;
    display: none;
}

.response-body.visible {
    display: block;
    animation: fadeIn 0.3s var(--transition-smooth);
}

.response-body pre {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--accent-cyan);
    line-height: 1.7;
}

.info-section {
    margin-top: 3rem;
}

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

.info-card {
    background: rgba(20, 20, 20, 0.85);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: border-color 0.3s ease;
}

.info-card:hover {
    border-color: var(--border-hover);
}

.info-card h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

.info-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Documentation Styles */
.docs-content {
    margin-top: 1rem;
}

.docs-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.docs-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.docs-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.docs-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 1rem;
}

.code-block {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    overflow-x: auto;
}

.code-block code,
.code-block pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--accent-cyan);
    margin: 0;
    line-height: 1.6;
}

.error-block code,
.error-block pre {
    color: #ef4444;
}

.endpoint-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

.method-badge {
    background: linear-gradient(135deg, var(--primary) 0%, hsl(8, 100%, 45%) 100%);
    color: var(--text-main);
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-sm);
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
}

.endpoint-box code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    color: var(--text-main);
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.docs-table th,
.docs-table td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
}

.docs-table th {
    background: var(--bg-surface);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.docs-table td {
    color: var(--text-main);
    font-size: 0.9rem;
}

.docs-table td code {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-cyan);
    font-size: 0.85rem;
}

.docs-table tr:last-child td {
    border-bottom: none;
}

.required-badge {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border-light);
    margin-top: 4rem;
}

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

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

    .brand h1 {
        font-size: 2rem;
    }

    .nav-tabs {
        flex-wrap: wrap;
        justify-content: center;
        border-radius: var(--radius-md);
    }

    .nav-tab {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .card {
        padding: 1.5rem;
    }

    .btn {
        width: 100%;
        padding: 1rem 2rem;
    }

    .btn::before {
        left: 1.5rem;
    }

    .server-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .server-btn {
        padding: 0.6rem 0.4rem;
        font-size: 0.8rem;
    }

    .response-cards {
        grid-template-columns: 1fr;
    }

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

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

    .endpoint-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .docs-table {
        font-size: 0.85rem;
    }

    .docs-table th,
    .docs-table td {
        padding: 0.5rem;
    }
}

@media (hover: none) {
    .btn:active {
        opacity: 0.9;
    }
    
    .server-btn:active {
        opacity: 0.9;
    }
}