/* ==========================================================================
   QRForge Studio — Developer API Hub & Playground Styles
   ========================================================================== */

/* Page Specific Wrapper */
.api-page {
    background-color: var(--bg-page);
    color: var(--text-primary);
    min-height: 100vh;
}

/* --- Hero Section --- */
.api-hero {
    padding: 4rem 2rem 1.5rem;
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
}

.api-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.api-badge .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    display: inline-block;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.api-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: -0.025em;
    max-width: 900px;
    margin: 0 auto 1.25rem;
}

.api-hero h1 span {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 50%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.api-hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 760px;
    margin: 0 auto 2.25rem;
    line-height: 1.6;
}

.api-hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

.api-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, border-color 0.15s ease;
    border: 1px solid transparent;
}

.api-btn.primary {
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

.api-btn.primary:hover {
    box-shadow: 0 6px 22px rgba(59, 130, 246, 0.55);
    filter: brightness(1.08);
}

.api-btn:active {
    filter: brightness(0.95);
}

.api-btn.secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.api-btn.secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-focus);
}

/* --- Hero Interactive Split Banner --- */
.hero-split-preview {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    text-align: left;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    box-shadow: var(--shadow-lg), 0 0 30px rgba(59, 130, 246, 0.1);
}

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

.window-dots {
    display: flex;
    gap: 6px;
}

.window-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red {
    background: #ef4444;
}

.dot-yellow {
    background: #f59e0b;
}

.dot-green {
    background: #10b981;
}

.window-endpoint {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.window-endpoint span {
    color: #10b981;
    font-weight: 700;
}

.code-window-content {
    background: #090d16;
    border-radius: var(--radius-md);
    padding: 1rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85rem;
    color: #e2e8f0;
    overflow-x: auto;
    max-width: 100%;
    min-width: 0;
    line-height: 1.5;
}

.json-key {
    color: #38bdf8;
}

.json-string {
    color: #a7f3d0;
}

.json-num {
    color: #f472b6;
}

.json-bool {
    color: #fbbf24;
}

.hero-render-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.75rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-render-card .qr-preview-box {
    width: 220px;
    height: 220px;
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    position: relative;
}

.hero-render-card canvas {
    max-width: 100%;
    height: auto;
}

.hero-badge-live {
    margin-top: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.status-tag {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.75rem;
}

.speed-tag {
    color: var(--accent);
    font-weight: 600;
    font-family: monospace;
}

/* --- Features Grid --- */
.api-features-section {
    padding: 4rem 2rem;
    max-width: 1280px;
    margin: 0 auto;
}

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

.section-head h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.section-head p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 650px;
    margin: 0 auto;
}

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

.api-feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.25s ease;
}

.api-feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-focus);
    box-shadow: var(--shadow-md), 0 0 20px rgba(59, 130, 246, 0.15);
}

.feature-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.api-feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.api-feature-card p {
    color: var(--text-secondary);
    font-size: 0.925rem;
    line-height: 1.6;
}

/* --- Interactive Live Playground --- */
.playground-section {
    padding: 4rem 2rem;
    background: rgba(17, 24, 39, 0.6);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.playground-container {
    max-width: 1380px;
    margin: 0 auto;
}

.playground-grid {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr) 340px;
    gap: 1.5rem;
    align-items: start;
}

.playground-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    min-width: 0;
    max-width: 100%;
}

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

.panel-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-group {
    margin-bottom: 1.25rem;
}

.control-group label {
    display: block;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.control-input,
.control-select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

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

.format-pills {
    display: flex;
    gap: 0.5rem;
}

.format-pill {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.format-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.color-pair-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.color-picker-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.6rem;
}

.color-picker-box input[type="color"] {
    -webkit-appearance: none;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
}

.color-picker-box input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-box input[type="color"]::-webkit-color-swatch {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.color-picker-box span {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Playground Code Inspector */
.code-inspector-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.inspector-tab-btn {
    padding: 0.45rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.inspector-tab-btn.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    border-color: rgba(59, 130, 246, 0.4);
}

#boxJsonInspector,
#boxCurlInspector {
    min-width: 0;
    max-width: 100%;
}

#boxCurlInspector .code-window-content {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
}

.inspector-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-copy {
    padding: 0.5rem 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: var(--bg-hover);
    border-color: var(--border-focus);
}

/* Playground Live Output */
.playground-output-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.5rem 0;
}

.preview-canvas-holder {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1;
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    margin: 0 auto;
    position: relative;
    box-sizing: border-box;
}

.preview-canvas-holder canvas {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: auto;
}

/* --- API Endpoints Section --- */
.endpoints-section {
    padding: 4.5rem 2rem;
    max-width: 1280px;
    margin: 0 auto;
}

.endpoint-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    overflow: hidden;
}

.endpoint-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.method-tag {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.method-post {
    background: #10b981;
    color: #ffffff;
}

.method-get {
    background: #3b82f6;
    color: #ffffff;
}

.endpoint-path {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.endpoint-body {
    padding: 1.75rem;
}

.endpoint-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Parameter Table */
.param-table-wrapper {
    overflow-x: auto;
    margin: 1.25rem 0;
}

.param-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.param-table th {
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border-color);
}

.param-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    vertical-align: top;
}

.param-name {
    font-family: monospace;
    font-weight: 700;
    color: #38bdf8;
}

.param-type {
    font-family: monospace;
    font-size: 0.8rem;
    color: #f472b6;
}

.param-badge-req {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.param-badge-opt {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* --- Multi-Language Code SDKs --- */
.sdks-section {
    padding: 4.5rem 2rem;
    background: rgba(17, 24, 39, 0.4);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.sdk-container {
    max-width: 1080px;
    margin: 0 auto;
}

.sdk-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
}

.sdk-tab-btn {
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

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

.sdk-code-box {
    position: relative;
    background: #090d16;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #e2e8f0;
    overflow-x: auto;
}

.sdk-code-box .copy-pill {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sdk-code-box .copy-pill:hover {
    color: var(--text-primary);
    border-color: var(--border-focus);
}

/* --- Pricing Tiers --- */
.pricing-section {
    padding: 2.5rem 2rem 5rem;
    max-width: 1280px;
    margin: 0 auto;
}

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

.pricing-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.25rem 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: all 0.25s ease;
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.25);
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.05) 0%, var(--bg-surface) 100%);
}

.pricing-card.current-plan {
    border-color: #10b981;
    box-shadow: 0 0 32px rgba(16, 185, 129, 0.28);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, var(--bg-surface) 100%);
}

.pricing-current-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    padding: 0.25rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    white-space: nowrap;
}

.api-btn.current-plan-btn {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #34d399;
    cursor: default;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    box-shadow: inset 0 0 14px rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-md);
    letter-spacing: 0.01em;
}

.api-btn.current-plan-btn svg {
    color: #10b981;
    flex-shrink: 0;
    display: block;
}

.api-btn.current-plan-btn:hover {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.55);
    transform: none;
    box-shadow: inset 0 0 14px rgba(16, 185, 129, 0.15);
}

.contact-enterprise-btn {
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    font-size: 0.88rem !important;
    padding: 0.75rem 0.9rem !important;
    letter-spacing: 0.01em;
}

.contact-enterprise-btn svg {
    flex-shrink: 0;
    display: block;
}

/* Active Subscription Status Banner */
.active-subscription-banner {
    max-width: 820px;
    margin: 1.75rem auto 0 auto;
    padding: 1rem 1.4rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    text-align: left;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    animation: fadeIn 0.3s ease;
}

.active-sub-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.active-sub-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 9999px;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.active-sub-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.active-sub-text {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.active-sub-text strong {
    color: #ffffff;
}

.active-sub-quota {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.pricing-featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), #06b6d4);
    color: #ffffff;
    padding: 0.25rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.pricing-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.pricing-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.pricing-amount {
    font-size: 2.75rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: baseline;
}

.pricing-amount span {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.pricing-amount span[id^="price"] {
    font-size: 2.75rem;
    font-weight: 900;
    color: var(--text-primary);
}

.pricing-amount span.pricing-interval,
.pricing-amount span[id^="interval"] {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

.pricing-features-list {
    list-style: none;
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pricing-features-list li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.pricing-features-list li svg {
    color: #10b981;
    flex-shrink: 0;
}

/* Pricing Card Action Buttons - Universal Single Line & Alignment */
.pricing-card .api-btn,
.pricing-card button.api-btn,
.pricing-card a.api-btn,
.pricing-card span.api-btn {
    width: 100% !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.45rem !important;
    font-size: 0.88rem !important;
    padding: 0.75rem 0.85rem !important;
    letter-spacing: 0.01em !important;
    box-sizing: border-box !important;
}

.pricing-card .api-btn svg,
.pricing-card button.api-btn svg {
    flex-shrink: 0 !important;
    display: block !important;
}

.endpoint-try-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.endpoint-try-btn:hover {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 0 12px var(--primary-glow);
    filter: brightness(1.1);
}

.endpoint-try-btn:active {
    filter: brightness(0.95);
}

@keyframes highlightPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.6);
    }

    50% {
        box-shadow: 0 0 30px 4px rgba(59, 130, 246, 0.5);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.playground-container.highlight-pulse {
    animation: highlightPulse 1.2s ease-out;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .hero-split-preview {
        grid-template-columns: 1fr;
    }

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

/* ==============================================================================
   ENTERPRISE CUSTOM ARCHITECTURE MODAL SYSTEM
   ============================================================================== */
.enterprise-modal {
    max-width: 560px !important;
    padding: 2.25rem !important;
    text-align: left !important;
    background: #0f172a !important;
    border: 1px solid rgba(245, 158, 11, 0.28) !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 45px rgba(245, 158, 11, 0.12) !important;
}

.ent-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.28rem 0.75rem;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 9999px;
    color: #fbbf24;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.ent-badge svg {
    color: #f59e0b;
}

.ent-title {
    font-size: 1.45rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin: 0 0 0.35rem 0 !important;
    letter-spacing: -0.01em !important;
}

.ent-subtitle {
    color: var(--text-secondary) !important;
    font-size: 0.88rem !important;
    line-height: 1.45 !important;
    margin: 0 0 1.25rem 0 !important;
}

.enterprise-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ent-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 540px) {
    .ent-form-row {
        grid-template-columns: 1fr;
    }
}

.ent-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ent-form-group label {
    display: block !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    margin-bottom: 0.25rem !important;
}

.ent-input,
.ent-select,
.ent-textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    font-size: 0.92rem !important;
    line-height: 1.45 !important;
    color: #f8fafc !important;
    background: rgba(17, 24, 39, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: var(--radius-md) !important;
    padding: 0.75rem 1rem !important; /* Clean standard padding - eliminates 2.9rem displacement! */
    transition: all 0.2s ease !important;
    outline: none !important;
}

.ent-input::placeholder,
.ent-textarea::placeholder {
    color: #64748b !important;
    font-family: inherit !important;
    font-style: normal !important;
}

.ent-input:focus,
.ent-select:focus,
.ent-textarea:focus {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25) !important;
    background: #111827 !important;
}

/* Custom Select Dropdown with Clean SVG Chevron */
.ent-select-wrap {
    position: relative;
    width: 100%;
}

.ent-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    padding-right: 2.75rem !important;
    cursor: pointer !important;
}

.ent-select:invalid,
.ent-select option[value=""] {
    color: #64748b !important;
}

.ent-select option {
    background: #0f172a !important;
    color: #f8fafc !important;
}

.ent-select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.ent-textarea {
    resize: vertical !important;
    min-height: 80px !important;
    max-height: 220px !important;
}

.btn-submit-enterprise {
    width: 100% !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border: 1px solid rgba(245, 158, 11, 0.5) !important;
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35) !important;
    padding: 0.85rem 1.5rem !important;
    color: #ffffff !important;
    border-radius: var(--radius-md) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin-top: 0.25rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.btn-submit-enterprise:hover {
    background: linear-gradient(135deg, #fbbf24, #d97706) !important;
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.45) !important;
    filter: brightness(1.08) !important;
}

.btn-submit-enterprise:active {
    filter: brightness(0.95) !important;
}

.ent-footer {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-copy-ent-email {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-copy-ent-email:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

/* Footer Contact & Legal Buttons */
.footer-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.footer-legal-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.15rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-legal-btn:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
}

.footer-legal-btn svg {
    color: inherit;
    flex-shrink: 0;
}

.footer-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 1.15rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-contact-btn:hover {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.45);
    color: #fbbf24;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
}

.footer-contact-btn svg {
    color: inherit;
    flex-shrink: 0;
}

/* ==========================================================================
   Live API Key & Request Usage Dashboard (Above Pricing Section)
   ========================================================================== */
.usage-dashboard-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 2.5rem;
}

.usage-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl, 18px);
    padding: 1.75rem 2rem;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(59, 130, 246, 0.12);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.usage-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4, #10b981);
}

.usage-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1.5rem;
}

.usage-card-identity {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.usage-tier-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.usage-tier-pill.tier-free {
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.usage-tier-pill.tier-dev {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.usage-tier-pill.tier-biz {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.usage-tier-pill.tier-ent {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.usage-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: statusPulse 2s infinite ease-in-out;
}

.usage-status-dot.danger {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

.usage-user-email {
    font-size: 0.92rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.usage-card-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.usage-billing-badge {
    font-size: 0.78rem;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    font-weight: 600;
}

.btn-sync-usage {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sync-usage:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-sync-usage.rotating svg {
    animation: spinQuick 0.7s linear infinite;
}

/* Two-column Grid for Key + Usage */
.usage-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 2rem;
    align-items: stretch;
}

@media (max-width: 900px) {
    .usage-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.usage-block {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.usage-block-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
}

.usage-block-title svg {
    color: var(--primary);
}

.api-key-display-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: rgba(3, 7, 18, 0.85);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: var(--radius-md, 10px);
    padding: 0.65rem 0.9rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.api-key-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.88rem;
    font-weight: 600;
    color: #67e8f9;
    letter-spacing: 0.03em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    user-select: all;
}

.api-key-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.btn-key-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-key-icon:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.btn-key-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0.75rem;
    height: 32px;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 6px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-key-copy:hover {
    background: #2563eb;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
}

.usage-key-hint {
    margin-top: 0.65rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.usage-key-hint code {
    background: rgba(255, 255, 255, 0.07);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    color: #93c5fd;
    font-family: ui-monospace, monospace;
    font-size: 0.78rem;
}

/* Usage Metrics */
.usage-metric-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.6rem;
}

.usage-numbers {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.usage-count {
    font-size: 1.65rem;
    font-weight: 800;
    color: #fff;
    font-feature-settings: "tnum";
}

.usage-divider {
    font-size: 1.15rem;
    color: var(--text-muted);
}

.usage-limit {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-feature-settings: "tnum";
}

.usage-unit {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: 0.2rem;
}

.usage-remaining-tag {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.usage-remaining-tag.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.35);
}

.usage-progress-bar-wrap {
    width: 100%;
    height: 10px;
    background: rgba(3, 7, 18, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 0.6rem;
    position: relative;
}

.usage-progress-bar-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.usage-progress-bar-fill[style*="width:"]:not([style*="width: 0%"]):not([style*="width:0%"]) {
    min-width: 6px;
}

.usage-progress-bar-fill.normal {
    background: linear-gradient(90deg, #3b82f6, #06b6d4, #10b981);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.usage-progress-bar-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.usage-progress-bar-fill.danger {
    background: #ef4444;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.7);
}

.usage-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Logged-Out State Banner — Modern, Balanced Developer Portal Teaser */
.usage-card.logged-out {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: nowrap;
    padding: 1.6rem 2.2rem;
    background: linear-gradient(135deg, rgba(20, 29, 49, 0.88) 0%, rgba(13, 20, 36, 0.96) 100%);
    border: 1px solid rgba(59, 130, 246, 0.22);
    box-shadow: 0 14px 34px -8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.logged-out-glow {
    position: absolute;
    top: -40px;
    right: 20%;
    width: 260px;
    height: 100px;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.16), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.logged-out-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.logged-out-icon {
    width: 50px;
    height: 50px;
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(6, 182, 212, 0.12));
    border: 1px solid rgba(59, 130, 246, 0.35);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    flex-shrink: 0;
}

.logged-out-text {
    flex: 1;
    min-width: 0;
}

.logged-out-title-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-bottom: 0.3rem;
}

.logged-out-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.logged-out-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 9999px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.logged-out-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0;
}

.logged-out-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.btn-usage-signin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.72rem 1.55rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: 1px solid rgba(147, 197, 253, 0.35);
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-usage-signin:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    filter: brightness(1.08);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-usage-signin:active {
    filter: brightness(0.95);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.logged-out-perks {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.logged-out-perks svg {
    color: #10b981;
    flex-shrink: 0;
}

/* Tablet & Mobile Responsiveness */
@media (max-width: 960px) {
    .usage-card.logged-out {
        flex-direction: column;
        align-items: stretch;
        gap: 1.35rem;
        padding: 1.4rem 1.35rem;
    }

    .logged-out-right {
        align-items: stretch;
        width: 100%;
        gap: 0.55rem;
    }

    .btn-usage-signin {
        width: 100%;
    }

    .logged-out-perks {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logged-out-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.85rem;
    }
}

@keyframes spinQuick {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}