/* Stylesheet specialized for Developer Portal & API Docs */

:root {
    --code-bg: #0d0c18;
    --code-border: rgba(255, 255, 255, 0.05);
    --badge-calls-bg: rgba(139, 92, 246, 0.1);
    --btn-danger-bg: rgba(244, 63, 94, 0.1);
    --btn-danger-border: rgba(244, 63, 94, 0.3);
    --btn-danger-hover: #f43f5e;
}

/* Sidebar Menu Navigation */
.doc-menu {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
}

.doc-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 8px;
    border: 1px solid transparent;
}

.doc-menu-item:hover {
    color: var(--text-primary);
    background: var(--panel-hover-bg);
    border-color: var(--panel-border);
}

.doc-menu-item.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.05);
}

.doc-menu-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: var(--primary-color);
}

/* System Status Panel */
.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-row span {
    color: var(--text-secondary);
}

/* Tab Management */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel-header-custom {
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 15px;
}

.panel-header-custom h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-header-custom h2 i {
    font-size: 20px;
}

/* API Key Generator */
.key-gen-container {
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--panel-border);
    padding: 15px;
    border-radius: 12px;
    align-items: center;
}

.custom-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--panel-border);
    color: var(--text-primary);
    padding: 12px 15px;
    border-radius: 8px;
    outline: none;
    font-family: var(--font-main);
    font-size: 14px;
    transition: all 0.3s;
}

.custom-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
}

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

.error-msg {
    color: var(--accent-red);
    font-size: 13px;
    font-weight: 500;
}

/* Keys Table */
.table-responsive {
    overflow-x: auto;
}

.keys-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.keys-table th {
    text-align: left;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 12px 15px;
    border-bottom: 1px solid var(--panel-border);
}

.keys-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

.keys-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

.key-display-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.key-value-masked {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.btn-icon:hover {
    color: #ffffff;
    background: var(--panel-hover-bg);
}

.badge-calls {
    background: var(--badge-calls-bg);
    color: var(--primary-color);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.btn-danger {
    background: var(--btn-danger-bg);
    border: 1px solid var(--btn-danger-border);
    color: var(--accent-red);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: var(--btn-danger-hover);
    color: #ffffff;
    border-color: var(--btn-danger-hover);
}

/* Documentation Styles */
.doc-section {
    margin-bottom: 30px;
}

.section-subtitle {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 12px;
}

.doc-list {
    margin-left: 20px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 14px;
}

.doc-list li {
    margin-bottom: 15px;
}

.code-block {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 8px;
    padding: 12px 15px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #38bdf8;
    overflow-x: auto;
    margin-top: 8px;
}

.json-block {
    color: #e2e8f0;
    line-height: 1.5;
    max-height: 350px;
}

.doc-divider {
    border: none;
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
    margin: 30px 0;
}

.endpoint-badge {
    margin: 15px 0;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-get {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 800;
}

.table-param-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 20px 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.params-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--code-border);
}

.params-table th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    padding: 10px 15px;
    font-weight: 600;
    text-align: left;
    border-bottom: 1px solid var(--code-border);
}

.params-table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
}

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

.params-table td code {
    font-family: 'Courier New', Courier, monospace;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-primary);
}

/* API Playground Grid */
.playground-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 25px;
    align-items: stretch;
}

@media (max-width: 900px) {
    .playground-grid {
        grid-template-columns: 1fr;
    }
}

.playground-controls {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding-right: 25px;
}

@media (max-width: 900px) {
    .playground-controls {
        border-right: none;
        padding-right: 0;
        padding-bottom: 25px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
}

.playground-output {
    display: flex;
    flex-direction: column;
}

.panel-subtitle-small {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 6px;
    display: inline-block;
}

.form-group-custom {
    margin-bottom: 15px;
}

.form-group-custom label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.custom-select-docs, .custom-input-docs {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    color: var(--text-primary);
    padding: 10px 12px;
    border-radius: 6px;
    outline: none;
    font-family: var(--font-main);
    font-size: 13px;
    transition: all 0.3s;
}

.custom-select-docs:focus, .custom-input-docs:focus {
    border-color: var(--primary-color);
}

.custom-select-docs option {
    background: #090714;
    color: #ffffff;
}

/* Playground Output Response */
.response-status-bar {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--panel-border);
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 13px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.response-status-bar strong {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status-200 strong {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-400 strong, .status-401 strong, .status-404 strong, .status-500 strong {
    background: rgba(244, 63, 94, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.json-viewer-container {
    flex-grow: 1;
    min-height: 350px;
    display: flex;
}

.json-viewer-container pre {
    width: 100%;
    margin-top: 0;
    max-height: 500px;
}

/* Gradient text */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Modal Overlay & Card for Secure Key Reveal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
}

.modal-card {
    background: #0d0c18;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    width: 90%;
    max-width: 550px;
    padding: 25px;
    animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

@keyframes modalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-warning {
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
    color: var(--accent-gold);
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.modal-warning i {
    font-size: 16px;
    margin-top: 2px;
}

.modal-key-box {
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    align-items: center;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
}

/* Authentication tab styling in Portal */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 25px;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}

/* Category Tabs Navigation for Docs */
.doc-category-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.2);
}

.doc-cat-btn {
    white-space: nowrap;
    padding: 10px 18px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-cat-btn:hover {
    color: #ffffff;
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

.doc-cat-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(59, 130, 246, 0.3) 100%);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.cat-pane {
    display: none;
}

.cat-pane.active {
    display: block;
    animation: fadeIn 0.35s ease-out forwards;
}


