:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1220;
    --bg-tertiary: #151927;

    --text-primary: #e7e9ee;
    --text-secondary: #b7bdd1;
    --text-dim: #8892a6;

    --accent-primary: #06b6d4;
    --accent-secondary: #ff6b35;

    --accent-gradient:
        linear-gradient(
            135deg,
            #06b6d4 0%,
            #ff6b35 100%
        );

    --card-bg: rgba(15, 18, 32, 0.62);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover: rgba(255, 255, 255, 0.03);

    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.5);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    min-height: 100vh;

    font-family:
        "Oxanium",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--text-primary);
    line-height: 1.6;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    background:
        linear-gradient(
            180deg,
            rgba(10, 14, 26, 0.85) 0%,
            rgba(10, 14, 26, 0.92) 100%
        ),
        url("assets/banner.png") center / cover no-repeat fixed;
}


[hidden] {
    display: none !important;
}


main {
    width: min(900px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0;
}


section {
    padding: 32px;

    background: var(--card-bg);
    backdrop-filter: blur(12px);

    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-lg);

    transition:
        border-color var(--transition-base),
        box-shadow var(--transition-base),
        transform var(--transition-base);
}


section:hover {
    border-color: rgba(6, 182, 212, 0.3);
}


section + section {
    margin-top: 28px;
}


h1 {
    display: inline-block;

    margin-bottom: 10px;

    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;

    background: var(--accent-gradient);

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


h2 {
    margin-bottom: 22px;

    font-size: 1.7rem;
    font-weight: 700;

    color: var(--text-primary);
}


p {
    margin-bottom: 30px;

    color: var(--text-secondary);

    font-size: 1rem;
    line-height: 1.7;
}


form {
    display: grid;
    gap: 20px;
}


form > div {
    display: grid;
    gap: 8px;
}


label {
    color: var(--text-primary);

    font-size: 0.9rem;
    font-weight: 600;
}


input,
select,
textarea {
    width: 100%;

    padding: 13px 14px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);

    outline: none;

    background: rgba(21, 25, 39, 0.9);

    color: var(--text-primary);

    font-family: inherit;
    font-size: 0.95rem;

    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast);
}


input:hover,
select:hover,
textarea:hover {
    border-color: rgba(6, 182, 212, 0.35);
}


input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent-primary);

    box-shadow:
        0 0 0 3px rgba(6, 182, 212, 0.12);

    background: rgba(21, 25, 39, 1);
}


input::placeholder,
textarea::placeholder {
    color: var(--text-dim);
}


select:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}


textarea {
    resize: vertical;
    line-height: 1.6;
}


button {
    min-height: 50px;

    padding: 14px 24px;

    border: none;
    border-radius: var(--radius-md);

    cursor: pointer;

    background: var(--accent-gradient);

    color: #ffffff;

    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;

    box-shadow:
        0 4px 16px rgba(6, 182, 212, 0.28);

    transition:
        transform var(--transition-base),
        box-shadow var(--transition-base),
        opacity var(--transition-fast);
}


button:hover:not(:disabled) {
    transform: translateY(-2px);

    box-shadow:
        0 8px 24px rgba(255, 107, 53, 0.35);
}


button:active:not(:disabled) {
    transform: translateY(0);
}


button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}


#form-error {
    padding: 12px 14px;

    border: 1px solid rgba(255, 107, 53, 0.45);
    border-radius: var(--radius-sm);

    background: rgba(255, 107, 53, 0.1);

    color: #ff9a75;

    font-size: 0.9rem;
    font-weight: 500;
}


#loading-icon {
    margin-left: 8px;
}


#loading-icon:not([hidden]) {
    display: inline-block;

    animation: spin 1s linear infinite;
}


#result-section {
    background:
        linear-gradient(
            135deg,
            rgba(6, 182, 212, 0.04) 0%,
            rgba(255, 107, 53, 0.04) 100%
        ),
        var(--card-bg);

    border-color: rgba(6, 182, 212, 0.25);
}


#response-content {
    overflow-x: auto;

    min-height: 90px;

    margin: 0;

    padding: 20px;

    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);

    background: rgba(5, 8, 18, 0.88);

    color: var(--text-primary);

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 0.9rem;
    line-height: 1.65;

    white-space: pre-wrap;
    overflow-wrap: anywhere;
}


dl {
    display: grid;

    grid-template-columns: 190px 1fr;

    gap: 10px 18px;

    margin-top: 26px;
}


dt {
    color: var(--text-secondary);

    font-weight: 500;
}


dd {
    margin: 0;

    color: var(--text-primary);

    font-weight: 500;

    overflow-wrap: anywhere;
}


dt:nth-of-type(1),
dt:nth-of-type(3),
dt:nth-of-type(5),
dt:nth-of-type(7) {
    color: var(--accent-primary);
}


dt:nth-of-type(2),
dt:nth-of-type(4),
dt:nth-of-type(6),
dt:nth-of-type(8) {
    color: var(--accent-secondary);
}


@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


@media (max-width: 768px) {
    main {
        width: min(100% - 24px, 900px);

        padding: 32px 0;
    }

    section {
        padding: 24px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    dl {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    dd {
        margin-bottom: 12px;
    }
}


@media (max-width: 480px) {
    main {
        width: min(100% - 16px, 900px);
    }

    section {
        padding: 20px;
    }

    h1 {
        font-size: 1.55rem;
    }

    p {
        font-size: 0.9rem;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }
}