:root {
    --bg-main: #f8fafc;
    --bg-panel: #ffffff;
    --bg-card: #f1f5f9;
    --bg-input: #ffffff;
    --border-color: #e2e8f0;
    --accent-color: #4f46e5;
    --accent-glow: rgba(79, 70, 229, 0.15);
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --console-bg: #011522;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    background-image: linear-gradient(to right, #e2e8f0 1px, transparent 1px), linear-gradient(to bottom, #e2e8f0 1px, transparent 1px);
    background-size: 20px 30px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%);
}

.app-container {
    width: 95vw;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    position: relative;
    z-index: 1;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 10px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.25s ease;
}

.nav-links a:hover, .nav-links a.active {
    background: var(--bg-card);
    color: var(--text-primary);
}

.category-scroll-container {
    width: 100%;
    overflow-x: auto;
    padding: 20px 0;
    scrollbar-width: none;
}

.category-scroll-container::-webkit-scrollbar {
    display: none;
}

.category-wrapper {
    display: flex;
    gap: 16px;
    white-space: nowrap;
    padding: 4px;
}

.Documents-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: fit-content;
    height: 50px;
    border: 1px solid var(--border-color);
    padding: 0px 20px;
    border-radius: 14px;
    background-color: var(--bg-panel);
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

.folderContainer {
    width: 32px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
}

.fileBack {
    z-index: 1;
    width: 100%;
    height: auto;
}

.filePage {
    width: 65%;
    height: auto;
    position: absolute;
    z-index: 2;
    transition: all 0.3s ease-out;
    transform: translateY(-2px);
}

.fileFront {
    width: 105%;
    height: auto;
    position: absolute;
    z-index: 3;
    opacity: 0.95;
    transform-origin: bottom;
    transition: all 0.3s ease-out;
}

.Documents-btn .text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: capitalize;
    transition: color 0.3s;
}

.Documents-btn:hover {
    background-color: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}

.Documents-btn:hover .filePage {
    transform: translateY(-7px);
}

.Documents-btn:hover .fileFront {
    transform: rotateX(30deg);
}

.Documents-btn.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 10px 20px var(--accent-glow);
}

.Documents-btn.active .text {
    color: #ffffff;
}

.Documents-btn.active .filePage {
    transform: translateY(-7px);
}

.Documents-btn.active .fileFront {
    transform: rotateX(30deg);
}

.Documents-btn:active {
    transform: scale(0.96);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
    margin-bottom: 30px;
}

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

.panel-section {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.panel-header-search {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.panel-header-search h2 {
    margin-bottom: 0;
}

.search-group {
    display: flex;
    line-height: 28px;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 240px;
}

.search-input {
    width: 100%;
    height: 40px;
    padding-left: 2.5rem;
    padding-right: 1rem;
    box-shadow: 0 0 0 1.5px var(--border-color), 0 4px 6px -1px rgba(0,0,0,0.02);
    border: 0;
    border-radius: 10px;
    background-color: var(--bg-panel);
    outline: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.25s cubic-bezier(0.19, 1, 0.22, 1);
    cursor: text;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-input:hover {
    box-shadow: 0 0 0 2px #cbd5e1;
}

.search-input:focus {
    box-shadow: 0 0 0 2.5px var(--accent-color);
    background-color: #ffffff;
}

.search-icon {
    position: absolute;
    left: 0.9rem;
    fill: var(--text-secondary);
    width: 1.1rem;
    height: 1.1rem;
    pointer-events: none;
    z-index: 1;
}

h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.endpoint-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 18px;
    border-radius: 14px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    animation: fadeInUp 0.35s ease forwards;
    opacity: 0;
}

.endpoint-card:hover {
    border-color: #94a3b8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.endpoint-card.selected {
    border-color: var(--accent-color);
    background: var(--accent-glow);
}

.endpoint-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 6px;
    text-transform: capitalize;
}

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

#endpointMeta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    padding: 10px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.badge-method {
    background: #10b981;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
}

.path-text {
    font-family: monospace;
    font-size: 0.95rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 700;
}

input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

input:focus {
    border-color: var(--accent-color);
    background: #fff;
    box-shadow: 0 0 0 4px var(--accent-glow);
}

button#btnRun {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: var(--accent-color);
    color: white;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.2s ease;
}

button#btnRun:hover:not(.btn-disabled) {
    background: #3730a3;
}

.btn-disabled {
    background: #cbd5e1 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
}

.bottom-output-section {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    margin-top: 10px;
    width: 100%;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.output-header h2 {
    margin-bottom: 0;
}

.btn-copy {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: #e2e8f0;
}

.btn-copy-disabled {
    display: none;
}

.card-console {
    width: 100%;
    background-color: var(--console-bg);
    border-radius: 14px;
    z-index: 1;
    padding: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.tools {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 10px 10px 0 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.circle {
    padding: 0 4px;
    display: flex;
    align-items: center;
}

.box {
    display: inline-block;
    align-items: center;
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.red {
    background-color: #ff605c;
}

.yellow {
    background-color: #ffbd44;
}

.green {
    background-color: #00ca4e;
}

.card__content {
    width: 100%;
}

#jsonOutput {
    color: #38bdf8;
    padding: 24px;
    height: 380px;
    max-height: 380px;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}

.placeholder-text {
    color: #475569;
    font-style: italic;
}

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

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 999;
}

.toast {
    padding: 12px 18px;
    border-radius: 10px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 10px 15px rgba(0,0,0,0.05);
    animation: inSlide 0.2s ease forwards;
}

.toast.success {
    background: #10b981;
}

.toast.error {
    background: #ef4444;
}

.toast.info {
    background: #3b82f6;
}

@keyframes inSlide {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
