:root {
    --bg: #080b10;
    --surface: #10151d;
    --surface-2: #151c26;
    --border: #26303d;
    --text: #f4f7fb;
    --muted: #9da8b8;
    --accent: #72e6a4;
    --success: #72e6a4;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}


/* NAV */

.nav {
    border-bottom: 1px solid var(--border);
    background: rgba(11, 13, 16, 0.92);
}

.nav-inner {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    color: var(--text);
    text-decoration: none;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.nav-label {
    color: var(--muted);
    font-size: 13px;
}


/* HERO */

.hero {
    padding: 75px 0 60px;
    border-bottom: 1px solid var(--border);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

h1 {
    max-width: 760px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

h1 span {
    display: block;
    color: var(--muted);
}

.lead {
    max-width: 650px;
    margin-top: 24px;
    color: var(--muted);
    font-size: 18px;
}


/* TESTER */

.tester-section {
    padding: 55px 0 80px;
}

.tester-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}


/* REQUEST BAR */

.request-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

#requestName {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    background: var(--surface-2);
    color: var(--text);
    padding: 0 14px;
}

#requestName::placeholder {
    color: #718092;
}

#requestName:focus {
    border-color: #46505c;
}

.request-row {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 10px;
}

.request-bar select,
.request-bar input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    background: var(--surface-2);
    color: var(--text);
    padding: 0 14px;
}

.request-bar input::placeholder {
    color: #718092;
}

.request-bar select:focus,
.request-bar input:focus {
    border-color: #46505c;
}

#sendBtn {
    min-width: 100px;
    border: 0;
    border-radius: 9px;
    background: var(--accent);
    color: #0b0d10;
    font-weight: 800;
    padding: 0 20px;
}
#saveRequestBtn {
    min-width: 90px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: transparent;
    color: var(--text);
    font-weight: 700;
    padding: 0 18px;
}
#updateRequestBtn,
#newRequestBtn {
    min-width: 90px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: transparent;
    color: var(--text);
    font-weight: 700;
    padding: 0 18px;
}

#updateRequestBtn:hover,
#newRequestBtn:hover {
    background: var(--surface-2);
}
.request-actions {
    display: flex;
    gap: 8px;
}
#saveRequestBtn:hover {
    background: var(--surface-2);
}

/* TABS */

.tabs {
    display: flex;
    gap: 4px;
    padding: 12px 16px 0;
    border-bottom: 1px solid var(--border);
}

.tab {
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--muted);
    padding: 10px 14px;
    font-size: 14px;
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    border-bottom-color: var(--text);
    color: var(--text);
}


/* TAB CONTENT */

.tab-content {
    display: none;
    min-height: 150px;
    padding: 20px;
}

.tab-content.active {
    display: block;
}

.empty-state {
    color: var(--muted);
    font-size: 14px;
}

textarea {
    width: 100%;
    min-height: 180px;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    background: #0c1014;
    color: var(--text);
    padding: 16px;
    font-family: Consolas, Monaco, monospace;
    font-size: 14px;
}

textarea:focus {
    border-color: #46505c;
}


/* RESPONSE */

.response-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.response-header h2 {
    font-size: 16px;
}

#status {
    color: var(--muted);
    font-size: 13px;
}

#response {
    min-height: 240px;
    overflow-x: auto;
    padding: 20px;
    background: #090c0f;
    color: var(--text);
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-word;
}


/* FOOTER */

footer {
    border-top: 1px solid var(--border);
}

.footer-inner {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-inner strong {
    font-size: 14px;
}

.footer-inner span {
    color: var(--muted);
    font-size: 13px;
}


/* MOBILE */

@media (max-width: 700px) {

    .container {
        width: min(100% - 28px, 1120px);
    }

    .hero {
        padding: 50px 0 45px;
    }

    h1 {
        font-size: 38px;
    }

    .lead {
        font-size: 16px;
    }

    .request-bar {
        grid-template-columns: 100px 1fr;
    }

    #sendBtn {
        grid-column: 1 / -1;
        min-height: 46px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 25px 0;
    }

}


@media (max-width: 480px) {

    h1 {
        font-size: 32px;
    }

    .hero {
        padding-top: 42px;
        padding-bottom: 42px;
    }

    .request-bar {
        grid-template-columns: 1fr;
    }

    .request-bar select,
    .request-bar input {
        min-height: 46px;
    }

    .tabs {
        overflow-x: auto;
    }

    .tab {
        white-space: nowrap;
    }

    .response-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

}
/* HEADER ROWS */

.header-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 10px;
}

.header-row input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    background: var(--surface-2);
    color: var(--text);
    padding: 0 12px;
}

.header-row input:focus {
    border-color: #46505c;
}

.remove-header-btn {
    min-width: 44px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
}

.remove-header-btn:hover {
    color: var(--text);
}

.add-row-btn {
    margin-top: 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    padding: 10px 14px;
}

.add-row-btn:hover {
    background: var(--surface-2);
}

@media (max-width: 480px) {

    .header-row {
        grid-template-columns: 1fr;
    }

    .remove-header-btn {
        min-height: 42px;
    }

}
/* RESPONSE TOOLS */

.response-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.response-actions button {
    border: 1px solid var(--border);
    border-radius: 7px;
    background: transparent;
    color: var(--text);
    padding: 7px 11px;
    font-size: 12px;
}

.response-actions button:hover {
    background: var(--surface-2);
}

.response-headers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--muted);
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
}

.response-header-item {
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

@media (max-width: 480px) {

    .response-actions {
        width: 100%;
        flex-wrap: wrap;
    }

}
/* REQUEST HISTORY */

.history-section {
    border-top: 1px solid var(--border);
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.history-header h2 {
    font-size: 16px;
}

.history-header button {
    border: 1px solid var(--border);
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    padding: 7px 11px;
    font-size: 12px;
}

.history-header button:hover {
    color: var(--text);
    background: var(--surface-2);
}

#historyList {
    padding: 8px;
}

.history-item {
    display: grid;
    grid-template-columns: 75px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
}

.history-item:hover {
    background: var(--surface-2);
}

.history-method {
    font-size: 12px;
    font-weight: 800;
}

.history-url {
    overflow: hidden;
    color: var(--muted);
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-time {
    color: var(--muted);
    font-size: 11px;
}

@media (max-width: 480px) {

    .history-item {
        grid-template-columns: 60px 1fr;
    }

    .history-time {
        display: none;
    }

}
.saved-section {
    border-top: 1px solid var(--border);
}

.saved-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.saved-header h2 {
    font-size: 16px;
}

.saved-header button {
    border: 1px solid var(--border);
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    padding: 7px 11px;
    font-size: 12px;
}

.saved-header button:hover {
    color: var(--text);
    background: var(--surface-2);
}

#savedList {
    padding: 8px;
}
.delete-saved-btn {
    min-width: 70px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    padding: 7px 11px;
    font-size: 12px;
    cursor: pointer;
}

.delete-saved-btn:hover {
    color: var(--text);
    background: var(--surface-2);
}
.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    z-index: 1000;

    padding: 11px 15px;
    border: 1px solid var(--border);
    border-radius: 9px;

    background: var(--surface-2);
    color: var(--text);

    font-size: 13px;
    font-weight: 600;

    opacity: 0;
    transform: translate(-50%, -10px);
    pointer-events: none;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}
@media (max-width: 480px) {
    .toast {
        top: 16px;
        left: 16px;
        right: 16px;
        text-align: center;
        transform: translateY(-10px);
    }

    .toast.show {
        transform: translateY(0);
    }
}
@media (max-width: 480px) {

    .request-row {
        grid-template-columns: 1fr;
    }

    #sendBtn,
    #saveRequestBtn,
    #updateRequestBtn,
    #newRequestBtn {
        width: 100%;
    }

}
/* MOBILE REQUEST BAR */

@media (max-width: 480px) {

    .request-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    #method,
    #url {
        grid-column: 1 / -1;
    }

    #sendBtn,
    #saveRequestBtn,
    #updateRequestBtn,
    #newRequestBtn {
        width: 100%;
        min-width: 0;
        padding-left: 10px;
        padding-right: 10px;
    }

}