/* DARK MODE BASE ------------------------------------------------------ */
body {
    margin: 0;
    padding: 0;
    font-family: system-ui, Arial;
    background: #0e0f13;
    color: #e4e7eb;
}

.container {
    max-width: 1050px;
    margin: 20px auto;
    padding: 20px;
}

/* HEADINGS ------------------------------------------------------------- */
h2 {
    margin-bottom: 10px;
    color: #ffffff;
}

/* CARDS --------------------------------------------------------------- */
.card,
.api-box {
    background: #181a1f;
    padding: 22px;
    border-radius: 12px;
    box-shadow: 0 0 0 1px #24262d, 0 4px 15px rgba(0,0,0,0.4);
    margin-bottom: 25px;
}

/* LABELS --------------------------------------------------------------- */
.label {
    font-weight: bold;
    color: #9fa3af;
    margin-bottom: 8px;
    display: inline-block;
}

/* INPUTS + TEXTAREA --------------------------------------------------- */
input[type="text"],
textarea {
    width: 95%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #3a3d45;
    outline: none;
    background: #111317;
    color: #e4e7eb;
    font-size: 14px;
    transition: 0.2s;
}

input[type="text"]:focus,
textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

/* BUTTONS -------------------------------------------------------------- */
button {
    padding: 10px 18px;
    background: #2563eb;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .3px;
    transition: 0.2s;
}

button:hover {
    background: #1d4fcc;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.5);
}

/* API BOX --------------------------------------------------------------- */
.api-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.method {
    font-weight: bold;
    color: #60a5fa;
}

/* RESPONSE BOX ---------------------------------------------------------- */
.runResult {
    background: #0d0f14 !important;
    color: #e4e7eb !important;
    padding: 18px !important;
    border-radius: 10px !important;
    margin-top: 12px;
    max-height: 420px;
    overflow: auto;
    border: 1px solid #2a2d35;
    font-family: monospace;
    font-size: 14px;
}

/* SCROLLBARS ------------------------------------------------------------ */
.runResult::-webkit-scrollbar,
textarea::-webkit-scrollbar {
    width: 8px;
}

.runResult::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb {
    background: #333842;
    border-radius: 8px;
}

.runResult::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track {
    background: #1a1c21;
}
/* ACCORDION ----------------------------------------------------------- */
.accordion {
    margin-top: 10px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #2a2d35;
}

.accordion-item {
    border-bottom: 1px solid #2a2d35;
}

.accordion-header {
    padding: 15px 18px;
    background: #13151a;
    color: #e4e7eb;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: .3px;
    transition: 0.2s;
}

.accordion-header:hover {
    background: #1b1d23;
}

.accordion-header span {
    color: #60a5fa;
    font-weight: bold;
}

.accordion-body {
    display: none;
    padding: 18px;
    background: #181a1f;
}

.accordion-open .accordion-body {
    display: block;
}

.accordion-header .arrow {
    transition: 0.3s;
}

.accordion-open .arrow {
    transform: rotate(90deg);
}

.spinner {
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.status-badge {
    padding: 4px 8px;
    border-radius: 5px;
    margin-top: 8px;
    display: inline-block;
    font-size: 13px;
    font-weight: bold;
}

.status-success { background: #d1fae5; color: #065f46; }
.status-error { background: #fee2e2; color: #991b1b; }
/* Background overlay */
/* ============================
   MODAL (Dark Theme, Premium UI)
   ============================ */

/* Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Modal box */
.modal-box {
    width: 480px;
    background: #15171c;
    border-radius: 14px;
    box-shadow: 0 0 0 1px #262a33, 0 12px 35px rgba(0,0,0,0.55);
    overflow: hidden;
    animation: modalFadeIn 0.25s ease-out;
}

/* Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #2563eb;
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

/* Close button */
.modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    padding: 4px 10px;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-size: 15px;
    transition: 0.2s;
}
.modal-close:hover {
    background: rgba(255,255,255,0.35);
}

/* HQ Project ID container */
.modal-field {
    padding: 18px 20px 5px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-field label {
    font-weight: 600;
    color: #d0d3d9;
    font-size: 14px;
}

.modal-input {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #333842;
    background: #0f1115;
    color: #e4e7eb;
    font-size: 14px;
    outline: none;
}
.modal-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.35);
}

/* Textarea */
.modal-textarea {
    width: 90%;
    padding: 14px 20px;
    height: 180px;
    border: none;
    border-top: 1px solid #23262e;
    border-bottom: 1px solid #23262e;
    background: #101216;
    color: #e4e7eb;
    font-family: monospace;
    resize: none;
    outline: none;
    font-size: 14px;
}

/* Footer actions */
.modal-actions {
    padding: 16px 20px 20px 20px;
    display: flex;
    justify-content: flex-end;
}

.modal-submit {
    background: #2563eb;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

/* Fade animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hidden {
    display:none !important;
}
.spinnerBtn {
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.8s linear infinite;
    margin-right: 6px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


.folder {
    margin-bottom: 10px;
}

.folder-header {
    padding: 10px 14px;
    background: #13151a;
    border: 1px solid #2a2d35;
    border-radius: 6px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.folder-body {
    display: none;
    margin-top: 6px;
}

.folder-header:hover {
    background: #1b1d23;
}

.folder-header .arrow {
    margin-left: auto;
    transition: 0.25s;
}

.folder-body.open {
    display: block !important;
}

.method-tag {
    color: #60a5fa;
    font-weight: bold;
}
