* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    --scrollbar-color: #767faa transparent;
    scrollbar-color: var(--scrollbar-color);
    -webkit-overflow-scrolling: touch;
}
*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
*::-webkit-scrollbar-track {
    background: transparent;
}
*::-webkit-scrollbar-thumb {
    background-color: #767faa;
    border-radius: 4px;
}
*::-webkit-scrollbar-thumb:hover {
    background-color: #5d6395;
}
html,
body {
    height: 100%;
    width: 100%;
    background-color: #070b23;
    overflow: hidden;
}
.header-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 20px;
}

.curl-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}
.center-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-size: 1.875rem;
    font-weight: 700;
    color: white;
    font-family: system-ui;
    white-space: nowrap;
}
.container {
    width: 90%;
    height: 100vh;
    padding-top: 35px;
    padding-bottom: 35px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}
.box {
    width: 100%;
    height: 100%;
    background-color: #1f2546;
    border: 1px solid #e9b10e;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}
.title {
    font-size: 1.875rem;
    font-weight: 700;
    color: white;
    font-family: system-ui;
    text-align: center;
    margin-bottom: 20px;
    margin: 0;
}
.box-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    width: 100%;
    flex-grow: 1;
    overflow: hidden;
}
.leftBox,
.rightBox {
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.leftBox {
    align-items: center;
    overflow-y: auto;
}
.rightBox {
    align-items: flex-start;
    gap: 10px;
    overflow: hidden;
}
.rightBox .buttons-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-direction: row;
    width: 100%;
}
/* Updated json-box styles to ensure loader centering */
.json-box {
    position: relative; /* Makes json-box the positioning context for the loader */
    width: 100%;
    flex-grow: 1;
    background-color: #070b23;
    border: 1px solid #e9b10e;
    border-radius: 4px;
    padding: 10px;
    color: white;
    font-family: monospace;
    font-size: 14px;
    overflow-y: auto;
    white-space: pre;
}
.rightBox .raw-all,
.rightBox .history-box {
    width: 100%;
    flex-grow: 1;
    background-color: #070b23;
    border: 1px solid #e9b10e;
    border-radius: 4px;
    padding: 10px;
    color: white;
    font-family: monospace;
    font-size: 14px;
    overflow-y: auto;
    white-space: pre;
}
.rightBox .headers-box {
    width: 100%;
    flex-grow: 1;
    background-color: #070b23;
    border: 1px solid #e9b10e;
    border-radius: 4px;
    padding-left: 1px;
    padding-top: 1px;
    padding-bottom: 1px;
    color: white;
    font-family: monospace;
    font-size: 14px;
    overflow-y: auto;
    white-space: pre;
}
/* Updated history-box styles to ensure loader centering */
.history-box {
    position: relative; /* Makes history-box the positioning context for the loader */
    width: 100%;
    flex-grow: 1;
    background-color: #070b23;
    border: 1px solid #e9b10e;
    border-radius: 4px;
    padding: 10px;
    color: white;
    font-family: monospace;
    font-size: 14px;
    overflow-y: auto;
    white-space: pre;
}
/* Loader styles for centered animation */
.loader {
    border: 4px solid #767faa; /* Matches box background */
    border-top: 4px solid #e9b10e; /* Matches theme border color */
    border-radius: 50%;
    width: 70px;
    height: 70px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}
@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}
.headers-box table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.headers-box th,
.headers-box td {
    padding: 5px;
    text-align: left;
    border: 1px solid #e9b10e;
}
.headers-box th {
    font-weight: 700;
    color: #e9b10e;
}
.headers-box td {
    color: white;
    word-break: break-all;
    position: relative;
}
.headers-box td:nth-child(1),
.headers-box th:nth-child(1) {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}
.headers-box td:nth-child(1)::-webkit-scrollbar,
.headers-box th:nth-child(1)::-webkit-scrollbar {
    display: none;
}
.headers-box td:nth-child(1)::after {
    display: none;
}
.headers-box td:nth-child(2),
.headers-box th:nth-child(2) {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}
.headers-box td:nth-child(2)::-webkit-scrollbar,
.headers-box th:nth-child(2)::-webkit-scrollbar {
    display: none;
}
.headers-box td:nth-child(2)::after {
    content: "...";
    color: #e9b10e;
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: #070b23;
    margin-right: -4px;
    display: none;
}
.headers-box td:nth-child(2)[data-overflow]::after {
    display: block;
}
.headers-box td:nth-child(3),
.headers-box th:nth-child(3) {
    width: 50px;
    max-width: 50px;
    text-align: center;
}
.headers-box button {
    padding: 2px;
    font-size: 1rem;
    font-family: system-ui;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: filter 0.3s ease;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: brightness(35%);
}
.headers-box button:hover {
    background: rgba(255, 165, 0, 0.1);
    filter: brightness(100%) drop-shadow(0px 0px 3px orange);
}
.leftBox .titlesAll {
    font-size: 16px;
    font-weight: 700;
    color: white;
    font-family: sans-serif;
    line-height: 20px;
    margin: 0;
    width: 100%;
    text-align: left;
    margin-top: 20px;
}
.rightBox .titlesAll {
    font-size: 16px;
    font-weight: 700;
    color: white;
    font-family: sans-serif;
    line-height: 20px;
    margin: 0;
    flex-shrink: 1;
    flex-grow: 0;
}
.leftBox .inputAndresponseTitle,
.rightBox .inputAndresponseTitle {
    font-size: 20px;
    font-weight: 500;
    color: white;
    font-family: system-ui;
    width: 100%;
}
.leftBox input[type="text"],
.leftBox textarea,
.leftBox select {
    width: 100%;
    padding: 8px;
    font-size: 0.875rem;
    font-family: system-ui;
    color: #374151;
    border: 1px solid #e9b10e;
    border-radius: 5px;
    min-height: 40px;
}
.leftBox input[type="text"]:focus,
.leftBox textarea:focus,
.leftBox select:focus {
    border: 1px solid #e9b10e;
    outline: none;
}
.leftBox input[type="text"]::placeholder,
.leftBox textarea::placeholder {
    font-size: 15px;
    font-family: system-ui;
    color: #9ca3af;
    font-weight: 500;
}
.leftBox textarea[name="curlCommand"] {
    flex-grow: 1;
    min-height: 40px;
    resize: vertical;
    background-color: #070b23;
    color: white;
    font-size: 16px;
    margin-top: 10px;
}
.leftBox input[name="url"] {
    max-width: 100%;
    background-color: #070b23;
    color: white;
    font-size: 16px;
    margin-top: 5px;
}
.leftBox select[name="httpMethod"] {
    max-width: 100%;
    font-size: 15px;
    font-weight: 700;
    font-family: system-ui;
    background-color: #070b23;
    color: white;
    margin-top: 5px;
}
.leftBox textarea[name="headers"] {
    height: 110px;
    resize: vertical;
    background-color: #070b23;
    color: white;
    font-size: 16px;
    margin-top: 5px;
}
.leftBox textarea[name="body"] {
    height: 110px;
    resize: vertical;
    background-color: #070b23;
    color: white;
    font-size: 16px;
    margin-top: 5px;
}
.button-group {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
}
.button-group.left {
    justify-content: flex-end;
}
.button-group.right {
    justify-content: space-between;
    align-items: center;
}
.button-group.right .right-buttons {
    display: flex;
    gap: 10px;
}
@keyframes revertColor {
    from {
        background-color: orange;
    }
    to {
        background-color: #070b23;
    }
}
.leftBox button[name="copyCurl"],
.leftBox button[name="parseCurl"],
.leftBox button[name="generateCurl"],
.leftBox button[name="clearForm"],
.leftBox button[name="jsonPretty"],
.leftBox button[name="submitRequest"],
.leftBox button[name="fetchHistory"] {
    padding: 8px 16px;
    font-family: system-ui;
    color: white;
    background-color: #070b23;
    border: 1px solid #e9b10e;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 1s linear;
    font-weight: 700;
    font-size: 15px;
}
.leftBox button[name="copyCurl"]:hover,
.leftBox button[name="parseCurl"]:hover,
.leftBox button[name="generateCurl"]:hover,
.leftBox button[name="clearForm"]:hover,
.leftBox button[name="jsonPretty"]:hover,
.leftBox button[name="submitRequest"]:hover,
.leftBox button[name="fetchHistory"]:hover {
    background-color: orange;
    font-weight: 700;
    font-size: 15px;
    color: #070b23;
    transition: color 1s cubic-bezier(0, 1, 0, 1);
}
.leftBox button[name="copyCurl"].clicked,
.leftBox button[name="parseCurl"].clicked,
.leftBox button[name="generateCurl"].clicked,
.leftBox button[name="clearForm"].clicked,
.leftBox button[name="jsonPretty"].clicked,
.leftBox button[name="submitRequest"].clicked,
.leftBox button[name="fetchHistory"].clicked {
    background-color: orange;
    animation: revertColor 1s ease forwards;
    font-weight: 700;
    font-size: 15px;
}
.leftBox button[name="copyCurl"] {
    display: none;
}
.rightBox button[name="showJson"],
.rightBox button[name="showHeaders"],
.rightBox button[name="showRaw"],
.rightBox button[name="showHistory"] {
    padding: 8px 16px;
    font-family: system-ui;
    color: white;
    background-color: #070b23;
    border: 1px solid #e9b10e;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 1s linear;
    font-weight: 700;
    font-size: 15px;
}
.rightBox button[name="showJson"]:hover,
.rightBox button[name="showHeaders"]:hover,
.rightBox button[name="showRaw"]:hover,
.rightBox button[name="showHistory"]:hover {
    background-color: orange;
    font-weight: 700;
    font-size: 15px;
    color: #070b23;
    transition: color 1s cubic-bezier(0, 1, 0, 1);
}
.rightBox button[name="showJson"].active,
.rightBox button[name="showHeaders"].active,
.rightBox button[name="showRaw"].active,
.rightBox button[name="showHistory"].active {
    background-color: orange;
    color: black;
    font-weight: 700;
    font-size: 15px;
}
.rightBox button[name="copyData"] {
    padding: 8px 16px;
    font-family: system-ui;
    color: transparent;
    background-color: transparent;
    border: none;
    cursor: default;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: 700;
    font-size: 15px;
}
.rightBox button[name="copyData"].visible {
    color: white;
    background-color: #070b23;
    border: 1px solid #e9b10e;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.rightBox button[name="copyData"].visible:hover {
    background-color: orange;
}
.rightBox button[name="copyData"].visible.clicked {
    background-color: orange;
    color: white;
    border: 1px solid #e9b10e;
    animation: revertColor 1s ease forwards;
}
.response-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
    width: 100%;
    flex-wrap: nowrap;
}
.response-title-row .titlesAll {
    margin-right: 10px;
    flex-grow: 1;
}
.response-code {
    font-size: 17px;
    font-family: system-ui;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    display: none;
    font-weight: 700;
    margin-right: 10px;
}
.response-code.success {
    background-color: green;
    border: 1px solid #e9b10e;
}
.response-code.error {
    background-color: red;
    border: 1px solid #e9b10e;
}
@media (max-width: 768px) {
    .box-container {
        flex-direction: column;
        align-items: center;
    }
    .leftBox,
    .rightBox {
        width: 100%;
        height: 50%;
    }
    .rightBox .buttons-row {
        flex-wrap: wrap;
    }
    .response-code {
        margin-right: 5px;
        margin-top: 10px;
    }
    .response-title-row {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .headers-box td:nth-child(3),
    .headers-box th:nth-child(3) {
        width: 40px;
    }
    .button-group.right {
        flex-direction: column;
        align-items: flex-start;
    }
    .button-group.right .right-buttons {
        justify-content: flex-end;
        width: 100%;
    }
}