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

:root {
    --space-s: 12px;
    --space-m: 20px;
    --space-l: 32px;
    --space-xl: 52px;
    --space-xxl: 84px;

    --font-size-s: 12px;
    --font-size-m: 20px;
    --font-size-l: 26px;
    --font-size-xl: 52px;
    --font-size-xxl: 84px;

    --color-main: black;
    --color-secondary: gray;
    --color-cta: #86ffff;
}

body {
    font-family: "Roboto Mono", monospace;
    font-optical-sizing: auto;
    font-style: normal;
    background-color: #f4f4f4;
    color: var(--color-main);
    line-height: 1.4;
    margin: 0;
    padding: 0;
    font-size: 14px;
    letter-spacing: 0.3px;
}

main {
    padding: var(--space-m);
    padding-top: 140px;
    max-width: 1720px;
    margin: 0 auto;
}

header {
    font-size: var(--font-size-m);
    font-weight: normal;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--color-main);
    color: white;
    padding: var(--space-s) var(--space-m);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999;
}

header h1 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

header h2 {
    font-size: 12px;
    font-weight: 400;
    margin: 0;
    color: var(--color-cta);
    letter-spacing: 0.5px;
}

.button {
    background-color: var(--color-cta);
    color: var(--color-main);
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    width: fit-content;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(134, 255, 255, 0.3);
    font-family: "Roboto Mono", monospace;
    letter-spacing: 0.3px;
}

.button:hover {
    background-color: #6fffff;
    box-shadow: 0 4px 12px rgba(134, 255, 255, 0.4);
    transform: translateY(-1px);
}

.button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(134, 255, 255, 0.3);
}

.button:disabled {
    background-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
    transform: none;
}

.button:disabled:hover {
    background-color: #e0e0e0;
    box-shadow: none;
    transform: none;
}

section {
    margin-bottom: var(--space-xl);
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--color-main);
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    position: relative;
    width: fit-content;
    padding-bottom: 4px;
    z-index: 1;
}

.section-title::before {
    content: "";
    width: 100%;
    height: 40%;
    position: absolute;
    left: 0;
    bottom: 0;
    background-color: var(--color-cta);
    z-index: -1;
    display: block;
}

.section-title .button {
    margin-left: auto;
    right: -100%;
    position: absolute;
}

.section-description {
    font-size: 12px;
    color: var(--color-secondary);
    margin-bottom: 16px;
    line-height: 1.4;
    letter-spacing: 0.3px;
}

.section-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--color-cta), rgba(134, 255, 255, 0));
    margin-bottom: var(--space-l);
}

#modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

#modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 32px;
    border: none;
    width: 80%;
    max-width: 600px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

#modal-content h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-main);
    margin-bottom: 16px;
    margin-top: 0;
    letter-spacing: 0.5px;
}

#modal-content h3 {
    font-size: 14px;
    color: var(--color-main);
    margin-bottom: 8px;
    font-weight: 600;
    margin-top: 20px;
    border-bottom: 2px solid var(--color-cta);
    padding-bottom: 8px;
    letter-spacing: 0.3px;
}

#modal-content h3:first-of-type {
    margin-top: 24px;
}

.h3-description {
    font-size: 11px;
    color: var(--color-secondary);
    margin-bottom: 16px;
    font-weight: normal;
    line-height: 1.4;
    letter-spacing: 0.3px;
}

#add-source-form>div,
#edit-source-form>div,
#api-fields>div {
    margin-bottom: 16px;
}

#add-source-form label,
#edit-source-form label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-main);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

#add-source-form input[type="text"],
#add-source-form select,
#add-source-form textarea,
#edit-source-form input[type="text"],
#edit-source-form select,
#edit-source-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 12px;
    font-family: "Roboto Mono", monospace;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: white;
    letter-spacing: 0.3px;
}

#add-source-form input[type="text"]:focus,
#add-source-form select:focus,
#add-source-form textarea:focus,
#edit-source-form input[type="text"]:focus,
#edit-source-form select:focus,
#edit-source-form textarea:focus {
    outline: none;
    border-color: var(--color-cta);
    box-shadow: 0 0 0 3px rgba(134, 255, 255, 0.1);
    background-color: white;
}

#add-source-form textarea,
#edit-source-form textarea {
    resize: vertical;
    min-height: 80px;
    font-family: "Roboto Mono", monospace;
    font-size: 11px;
}

#add-source-form select,
#edit-source-form select {
    cursor: pointer;
    background-color: #fff;
}

#add-source-form button[type="submit"],
#edit-source-form button[type="submit"] {
    background: var(--color-cta);
    color: var(--color-main);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(134, 255, 255, 0.3);
    margin-top: 20px;
    width: 100%;
    font-family: "Roboto Mono", monospace;
    letter-spacing: 0.3px;
}

#add-source-form button[type="submit"]:hover,
#edit-source-form button[type="submit"]:hover {
    background: #6fffff;
    box-shadow: 0 6px 20px rgba(134, 255, 255, 0.4);
    transform: translateY(-2px);
}

#add-source-form button[type="submit"]:active,
#edit-source-form button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(134, 255, 255, 0.3);
}

#api-fields {
    background-color: rgba(134, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(134, 255, 255, 0.2);
}

#receive-payload-div {
    margin-bottom: var(--space-l);
}

#receive-payload-div label {
    display: block;
    font-size: calc(var(--font-size-m) * 0.7);
    font-weight: 600;
    color: var(--color-main);
    margin-bottom: 6px;
    letter-spacing: 1.5px;
}

#receive-payload-div textarea {
    width: 100%;
    padding: var(--space-s) var(--space-m);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: calc(var(--font-size-m) * 0.7);
    font-family: "Roboto Mono", monospace;
    min-height: 80px;
    resize: vertical;
    background-color: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    letter-spacing: 1px;
}

#receive-payload-div textarea:focus {
    outline: none;
    border-color: var(--color-cta);
    box-shadow: 0 0 0 3px rgba(134, 255, 255, 0.1);
    background-color: white;
}

footer {
    background: var(--color-main);
    color: white;
    padding: var(--space-m) var(--space-l);
    margin-top: var(--space-xl);
    border-top: 4px solid var(--color-cta);
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 100;
}

.footer-content {
    /* max-width: 1200px; */
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

footer p {
    margin: 0;
    font-size: calc(var(--font-size-m) * 0.7);
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.3px;
}

footer a {
    color: var(--color-cta);
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #6fffff;
    text-decoration: underline;
}

/* General link styling for text content */
main a {
    color: var(--color-main);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    background: linear-gradient(to right, rgba(134, 255, 255, 0.1) 0%, rgba(134, 255, 255, 0.1) 100%);
    background-size: 0% 100%;
    background-repeat: no-repeat;
    background-position: 0 100%;
    border-radius: 2px;
    padding: 1px 2px;
}

main a:hover {
    color: var(--color-main);
    border-bottom-color: var(--color-main);
    background-size: 100% 100%;
    text-decoration: none;
}

main a:active {
    color: var(--color-secondary);
    transform: translateY(1px);
}

/* Special styling for links in descriptions and helper text */
.section-description a,
.h3-description a,
.test-message a {
    color: var(--color-main);
    text-decoration: none;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(134, 255, 255, 0.1), rgba(134, 255, 255, 0.05));
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(134, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.section-description a:hover,
.h3-description a:hover,
.test-message a:hover {
    background: linear-gradient(135deg, rgba(134, 255, 255, 0.2), rgba(134, 255, 255, 0.1));
    border-color: rgba(134, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(134, 255, 255, 0.2);
    text-decoration: none;
}

/* Code block links */
pre a {
    color: var(--color-cta);
    text-decoration: none;
    font-weight: 600;
    background: rgba(134, 255, 255, 0.1);
    padding: 1px 4px;
    border-radius: 3px;
    border: 1px solid rgba(134, 255, 255, 0.3);
    transition: all 0.2s ease;
}

pre a:hover {
    background: rgba(134, 255, 255, 0.2);
    border-color: rgba(134, 255, 255, 0.5);
    text-decoration: none;
}

/* External link indicator */
main a[target="_blank"]::after {
    content: " ↗";
    font-size: 0.8em;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

main a[target="_blank"]:hover::after {
    opacity: 1;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: var(--space-s);
    font-size: calc(var(--font-size-m) * 0.7);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--color-cta);
    text-decoration: none;
}

.separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: calc(var(--font-size-m) * 0.8);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    footer p {
        font-size: 13px;
    }

    .footer-links {
        font-size: 13px;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#modal-close {
    color: #999;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

#modal-close:hover,
#modal-close:focus {
    color: #1a1a1a;
    text-decoration: none;
}

h3 {
    font-size: 16px;
    color: var(--color-main);
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.h3-description {
    font-size: 11px;
    color: var(--color-secondary);
    margin-bottom: 16px;
    font-weight: normal;
    line-height: 1.4;
    letter-spacing: 0.3px;
}