body {
    min-height: 100vh;
    margin: 0;
    background: rgb(34, 34, 34);
    color: white;
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    font-size: 1.1em;
    font-weight: 400;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 25px;
}

header img {
    width: 180px;
    height: auto;
}

header div {
    margin: 20px;
    text-align: center;
}

h1 {
    margin: 0;
    font-weight: 600;
    font-size: 3em;
}

h2 {
    margin: 0;
    font-weight: 300;
}

h3,
h4 {
    margin: 0;
}

main {
    width: min(1500px, calc(100vw - 48px));
    display: flex;
    flex-direction: column;
    align-items: center;
}

#intro {
    width: 100%;
    max-width: 1480px;
    margin: 20px 0;
}

p {
    margin-top: 0;
    text-align: center;
    line-height: 1.4;
}

em {
    font-weight: bolder;
    font-style: unset;
}

a {
    color: white;
    text-decoration: unset;
    font-weight: bold;
    transition: opacity .3s;
}

a:hover {
    opacity: .6;
}

form[name="generator"] {
    width: 100%;
    max-width: 1480px;
    margin: 10px 0 25px;
    padding: 22px;
    border-radius: 15px;
    background-color: rgb(43, 43, 43);
    box-shadow: 2px 2px 10px 2px black;
    box-sizing: border-box;
}

.setup_layout {
    display: grid;
    grid-template-columns: 460px minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}

.settings_panel,
.preview_panel {
    min-width: 0;
}

.settings_panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.settings_header,
.preview_header {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.settings_header h3,
.preview_title h3 {
    font-size: 1.25em;
    font-weight: 700;
}

.settings_header span,
.preview_title span {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.78em;
}

.settings_group {
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.settings_group h4 {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.form_row {
    min-height: 34px;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 8px;
    align-items: center;
    margin: 7px 0;
}

.form_row.full {
    display: flex;
}

.form_row.full input {
    width: 100%;
}

.form_row label {
    padding-right: 4px;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.9);
}

.toggle_row {
    grid-template-columns: 1fr 54px;
}

.toggle_row.platform_badges_row {
    grid-template-columns: 1fr 76px;
}

.inline_controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.fade_row {
    grid-template-columns: 1fr auto;
}

.fade_row .inline_controls {
    min-width: 140px;
}

input[type="text"] {
    width: 100%;
    height: 30px;
    border: none;
    border-radius: 5px;
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    font-size: 0.95em;
    text-align: center;
    padding: 2px 12px;
    box-sizing: border-box;
}

input[type="text"].short {
    width: 58px;
    height: 25px;
    font-size: 0.8em;
}

input[type="color"] {
    width: 100%;
    height: 32px;
    border: none;
    border-radius: 5px;
    padding: 0;
    cursor: pointer;
}

input[type="checkbox"] {
    font-size: 17px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 50px;
    height: 25px;
    background: rgb(221, 221, 221);
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    outline: none;
    -webkit-transition: all .2s ease-in-out;
    transition: all .2s ease-in-out;
    justify-self: end;
}

input[type="checkbox"]:checked {
    background: rgb(14, 207, 255);
}

input[type="checkbox"]:after {
    position: absolute;
    content: "";
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: white;
    -webkit-box-shadow: 0 0 .25em rgba(0, 0, 0, .3);
    box-shadow: 0 0 .25em rgba(0, 0, 0, .3);
    -webkit-transform: scale(.7);
    transform: scale(.7);
    left: 0;
    -webkit-transition: all .2s ease-in-out;
    transition: all .2s ease-in-out;
}

input[type="checkbox"]:checked:after {
    left: calc(100% - 1.5em);
}

select {
    width: 100%;
    height: 28px;
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    font-size: 0.85em;
    padding: 0 10px;
    cursor: pointer;
    border-radius: 5px;
    border: none;
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

#fade_seconds {
    font-size: 0.75em;
    font-weight: 300;
}

select:focus,
input:focus {
    outline: none;
}


/* Kick channel helper layout */

.kick_channel_block {
    min-height: 34px;
    display: grid;
    grid-template-columns: 135px minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 6px;
    align-items: flex-start;
    margin: 9px 0 6px;
}

.kick_channel_block>label {
    padding-top: 6px;
    padding-right: 4px;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.9);
}

.kick_channel_control {
    width: 100%;
    min-width: 0;
}

.kick_channel_control input[type="text"] {
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
}

/* Compatibility for the older rough layout that used .kick_channel_line */
.kick_channel_line {
    display: contents;
}

.kick_channel_line label {
    grid-column: 1;
    padding-top: 6px;
    padding-right: 4px;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.9);
}

.kick_channel_line input[type="text"] {
    grid-column: 2;
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
}

.help_text,
.kick_channel_control .help_text,
.kick_channel_block>.help_text {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.72em;
    line-height: 1.25;
}

.kick_channel_control .help_text {
    width: 100%;
    margin-top: 7px;
    padding: 0 8px;
    box-sizing: border-box;
    text-align: center;
}

.kick_channel_block>.help_text {
    grid-column: 2;
    width: 100%;
    margin-top: 1px;
    padding: 0 8px;
    box-sizing: border-box;
    text-align: center;
}


/* Preview */

.preview_panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    min-height: 0;
}

.preview_header {
    flex: 0 0 auto;
    min-height: 38px;
    justify-content: center;
}

.preview_title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview_title img {
    width: 30px;
    height: 30px;
    cursor: pointer;
}

#preview_container {
    width: 100%;
    height: auto;
    flex: 1 1 auto;
    min-height: 0;
    border-radius: 15px;
    overflow: hidden;
    background-color: transparent;
    transition: background-color .3s ease-in-out;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

#preview_container.white {
    background-color: white;
}

#overlay_preview {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: transparent;
}


/* Generate URL panel */

.generate_panel {
    margin-top: auto;
    padding: 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

input[type="submit"],
input[type="button"] {
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 5px;
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    opacity: .82;
    transition: opacity .3s;
}

input[type="submit"]:hover,
input[type="button"]:hover {
    opacity: 1;
}

#result {
    position: relative;
    width: 100%;
    padding-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#alert {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 6px;
    left: 0;
    right: 0;
    height: 30px;
    background-color: white;
    border-radius: 5px;
    cursor: default;
    color: black;
    font-size: 0.9em;
    text-align: center;
    padding: 5px 10px;
    box-sizing: border-box;
    transition: opacity .2s ease-out;
    pointer-events: none;
}

#url {
    width: 100%;
    cursor: pointer;
    font-size: 0.75em;
}

#result p {
    text-align: center;
    font-size: 0.78em;
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
}

#url_status {
    min-height: 1.2em;
}

#form_error {
    margin: 0;
    color: #ffb8b8;
    font-size: 0.82em;
    line-height: 1.4;
    text-align: left;
}

input[aria-invalid="true"] {
    outline: 2px solid #ff9090;
    outline-offset: 2px;
}

#preview_empty {
    margin: 0;
    text-align: left;
}


/* Footer */

.site_footer {
    width: 100%;
    margin-top: 34px;
    padding: 0 0 28px;
    background: transparent;
    box-sizing: border-box;
}

.footer_inner {
    width: min(760px, calc(100vw - 48px));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.footer_support {
    width: 100%;
    padding: 24px 28px;
    border-radius: 14px;
    background: rgb(24, 24, 24); 
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 2px 2px 10px 2px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;

    text-align: center;
}

.footer_support_text {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.35;
}

.footer_support_text strong {
    color: white;
    font-size: 1em;
    font-weight: 800;
}

.footer_support_text span {
    font-size: 0.92em;
    font-weight: 400;
}

.footer_support .emote {
    display: inline-block;
    height: 30px;
    width: 30px;
    margin-left: 7px;
    vertical-align: top;
}

.footer_support form {
    margin: 0;
    display: flex;
    justify-content: center;
}

#paypal {
    width: 118px;
    height: 34px;
    border-radius: 999px;
    background-color: rgb(255, 196, 57);
    color: black;
    font-size: 0.88em;
    font-weight: 800;
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.24);
}

.footer_meta {
    padding: 18px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    text-align: center;
}

.footer_meta p {
    max-width: 980px;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9em;
    font-weight: 400;
    line-height: 1.45;
}

.footer_meta a {
    color: rgba(255, 255, 255, 0.96);
    font-weight: 700;
}

.github {
    height: 22px;
    margin-left: 7px;
    vertical-align: middle;
}


/* Public intro and updates */

.intro-lead {
    margin-bottom: 18px;
    font-size: 1.05em;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.feature-card,
.update-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    overflow-wrap: anywhere;
}

.feature-card h3 {
    margin-bottom: 7px;
    font-size: 0.9em;
}

.feature-card p,
.update-card p,
.incident-notice p {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85em;
    line-height: 1.5;
    text-align: left;
}

#site-incidents {
    width: 100%;
    max-width: 1480px;
}

.incident-notice {
    margin-bottom: 12px;
    padding: 16px 20px;
    border: 1px solid rgba(14, 207, 255, 0.28);
    border-left: 3px solid rgb(14, 207, 255);
    border-radius: 12px;
    background: rgba(14, 207, 255, 0.045);
    overflow-wrap: anywhere;
}

.incident-notice h2 {
    margin-bottom: 5px;
    font-size: 1em;
    font-weight: 700;
}

.incident-notice a {
    display: inline-block;
    margin-top: 7px;
}

#whats-new {
    width: 100%;
    max-width: 1100px;
    margin: 20px 0 0;
}

.updates-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px 20px;
    margin-bottom: 14px;
}

.updates-heading h2 {
    font-size: 1.2em;
    font-weight: 700;
}

.updates-heading a,
.incident-notice a,
.updates-intro a {
    color: rgb(14, 207, 255);
    font-size: 0.85em;
}

.updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.update-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.75em;
}

.update-card h2,
.update-card h3 {
    margin: 0 0 8px;
    font-size: 1em;
    line-height: 1.4;
    font-weight: 700;
}

.update-status {
    padding: 3px 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.status-active {
    border-color: rgba(14, 207, 255, 0.35);
    background: rgba(14, 207, 255, 0.07);
    color: rgb(14, 207, 255);
}

.status-resolved {
    background: rgba(255, 255, 255, 0.04);
}

main.updates-page {
    max-width: 860px;
}

.updates-intro {
    margin: 20px 0 28px;
    text-align: center;
}

.updates-intro p {
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.updates-list {
    width: 100%;
    display: grid;
    gap: 16px;
}

.updates-list .update-card {
    padding: 24px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 24px;
    margin-bottom: 8px;
    font-size: 0.85em;
}

/* Responsive */

@media (max-width: 1100px) {
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .setup_layout {
        grid-template-columns: 1fr;
    }

    #preview_container {
        height: 420px;
        flex: none;
    }
}

@media (max-width: 650px) {
    .feature-grid,
    .updates-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .feature-card {
        padding: 14px 16px;
    }

    .updates-list .update-card {
        padding: 18px;
    }

    main {
        width: min(100% - 24px, 1500px);
    }

    form[name="generator"] {
        padding: 14px;
    }

    .form_row,
    .kick_channel_block {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .toggle_row {
        grid-template-columns: 1fr 54px;
    }

    .fade_row {
        grid-template-columns: 1fr auto;
    }

    .kick_channel_block>label,
    .kick_channel_line label {
        padding-top: 0;
        padding-right: 0;
    }

    .kick_channel_line {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .kick_channel_line input[type="text"] {
        grid-column: 1;
    }

    .kick_channel_block>.help_text {
        grid-column: 1;
        text-align: left;
        padding: 0;
    }

    .kick_channel_control .help_text {
        text-align: left;
        padding: 0;
        font-size: 0.76em;
        opacity: 0.85;
    }

    header {
        flex-direction: column;
    }

    header div {
        margin-top: 0;
    }

    #preview_container {
        height: 340px;
        flex: none;
    }

    .site_footer {
        margin-top: 30px;
        padding-bottom: 28px;
    }

    .footer_inner {
        width: min(100% - 24px, 760px);
        gap: 18px;
    }

    .footer_support {
        padding: 20px;
        gap: 16px;
    }

    #paypal {
        width: 100%;
    }

    .footer_meta p {
        font-size: 0.84em;
    }
}


/* Scrollbar */

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-thumb {
    background: rgb(43, 43, 43);
}

::-webkit-scrollbar-thumb:hover {
    background: rgb(77, 77, 77);
}

::-webkit-scrollbar-track {
    background: black;
}
