:root {
    --background: #000101;
    --panel: #040708;
    --panel-hover: #071014;

    --border: #6ecafd;
    --text: #f2f3f3;

    --link: #66c3f9;
    --visited: #49b1ed;

    --muted: #89979e;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    background: var(--background);
    color: var(--text);

    font-family:
        Inter,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-size: 15px;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:visited {
    color: var(--visited);
}


/* HEADER */

.top-header {
    min-height: 145px;

    padding: 20px 42px;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    border-bottom:
        1px solid rgba(110, 202, 253, 0.18);
}

.site-logo {
    width: 105px;
    height: 105px;

    object-fit: contain;

    display: block;
}


/* DISCORD PROFILE */

.user-area {
    display: flex;
    flex-direction: column;

    align-items: flex-end;

    gap: 9px;
}

.discord-user-card {
    min-width: 340px;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 11px 14px;

    background: var(--panel);

    border:
        1px solid rgba(110, 202, 253, 0.55);

    border-radius: 9px;
}

.discord-avatar {
    width: 50px;
    height: 50px;

    object-fit: cover;

    border-radius: 8px;
}

.discord-user-info {
    min-width: 0;
}

.discord-main-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.display-name {
    font-size: 15px;
    font-weight: 650;
}

.username {
    color: #a3adb2;

    font-size: 14px;
    font-weight: 400;
}

.discord-user-id {
    margin-top: 4px;

    color: var(--muted);

    font-size: 11px;
    letter-spacing: 0.15px;
}

.sign-out {
    font-size: 12px;
}


/* BUTTONS */

.discord-login-button,
.primary-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    border:
        1px solid var(--border);

    border-radius: 7px;

    padding: 10px 17px;

    background:
        rgba(110, 202, 253, 0.08);

    color: var(--text) !important;

    font-weight: 600;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.discord-login-button:hover,
.primary-button:hover {
    background:
        rgba(110, 202, 253, 0.17);
}

.discord-login-button.large {
    padding: 13px 25px;

    font-size: 15px;
}

.disabled-button {
    opacity: 0.45;
    cursor: default;
}


/* NAVIGATION */

.main-nav {
    height: 48px;

    border-bottom:
        1px solid rgba(110, 202, 253, 0.16);
}

.nav-inner {
    height: 100%;

    padding: 0 42px;

    display: flex;
    align-items: center;

    gap: 31px;
}

.nav-link {
    position: relative;

    height: 100%;

    display: flex;
    align-items: center;

    font-size: 14px;
}

.nav-link.active {
    color: var(--text);
}

.nav-link.active::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: -1px;

    height: 2px;

    background: var(--border);
}

.nav-link.disabled {
    color: #596267;

    cursor: default;
}


/* CONTENT */

.page-content {
    width:
        min(
            1100px,
            calc(100% - 48px)
        );

    margin: 56px auto;
}


/* LOGGED OUT */

.login-required {
    max-width: 600px;

    margin: 75px auto;

    text-align: center;
}

.large-logo {
    width: 135px;
    height: 135px;

    object-fit: contain;

    margin-bottom: 14px;
}

.login-required h1 {
    margin:
        0 0 10px;

    font-size: 31px;
}

.login-required p {
    max-width: 470px;

    margin:
        0 auto 27px;

    color: var(--muted);

    line-height: 1.6;
}


/* ACCOUNTS */

.accounts-section {
    padding: 29px;

    background: var(--panel);

    border:
        1px solid
        rgba(110, 202, 253, 0.32);

    border-radius: 11px;
}

.section-top {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 25px;

    margin-bottom: 28px;
}

.section-top h1 {
    margin: 0 0 7px;

    font-size: 25px;
}

.section-top p {
    margin: 0;

    color: var(--muted);
}


/* EMPTY STATE */

.empty-box {
    padding: 64px 25px;

    text-align: center;

    border:
        1px dashed
        rgba(110, 202, 253, 0.27);

    border-radius: 8px;
}

.empty-box h2 {
    margin-top: 0;

    font-size: 19px;
}

.empty-box p {
    color: var(--muted);

    margin-bottom: 22px;
}


/* TIKTOK LIST */

.accounts-list {
    display: flex;
    flex-direction: column;

    gap: 10px;
}

.account-row {
    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 17px 18px;

    border:
        1px solid
        rgba(110, 202, 253, 0.22);

    border-radius: 8px;

    background:
        rgba(255, 255, 255, 0.012);
}

.account-row:hover {
    background: var(--panel-hover);
}

.tiktok-username {
    font-size: 16px;
    font-weight: 650;
}

.tiktok-id,
.linked-date {
    margin-top: 4px;

    color: var(--muted);

    font-size: 11px;
}

.remove-button {
    padding: 8px 13px;

    background: transparent;
    color: var(--text);

    border:
        1px solid
        rgba(110, 202, 253, 0.55);

    border-radius: 6px;

    cursor: pointer;

    opacity: 1;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.remove-button:hover {
    background: rgba(110, 202, 253, 0.12);
    border-color: var(--border);
}

/* FOOTER */

.site-footer {
    padding: 35px;

    text-align: center;

    color: #596267;

    font-size: 11px;
}


/* MOBILE */

@media (max-width: 720px) {

    .top-header {
        padding: 20px;

        flex-direction: column;

        gap: 20px;
    }

    .user-area {
        width: 100%;

        align-items: stretch;
    }

    .discord-user-card {
        min-width: 0;
    }

    .nav-inner {
        padding: 0 20px;
    }

    .page-content {
        width:
            calc(100% - 30px);

        margin: 30px auto;
    }

    .section-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .accounts-section {
        padding: 20px;
    }
}

/* MAIN / ADMIN EXTENSIONS */
.nav-cta {
    color: var(--text) !important;
    font-weight: 650;
}

.home-add-section {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.home-add-button {
    min-width: 220px;
    padding: 14px 24px;
    font-size: 16px;
}

.server-name {
    font-size: 16px;
    font-weight: 650;
}

.subsection-title {
    margin: 8px 0 14px;
    font-size: 18px;
}

.subsection-title.second {
    margin-top: 34px;
}

.empty-box.compact {
    padding: 28px 20px;
}

.empty-box.compact p {
    margin: 0;
}

.notice {
    padding: 13px 16px;
    margin-bottom: 18px;
    border-radius: 7px;
    border: 1px solid rgba(110, 202, 253, 0.35);
    background: rgba(110, 202, 253, 0.07);
}

.notice.error {
    border-color: rgba(255, 108, 108, 0.5);
    background: rgba(255, 108, 108, 0.08);
}

.notice.success {
    border-color: rgba(116, 227, 157, 0.45);
    background: rgba(116, 227, 157, 0.07);
}

.admin-manage-page {
    width: min(1200px, calc(100% - 48px));
}

.admin-page-top {
    margin-bottom: 22px;
}

.admin-page-top h1 {
    margin: 8px 0 6px;
}

.back-link {
    font-size: 13px;
}

.admin-card {
    margin-bottom: 22px;
}

.admin-card h2 {
    margin-top: 0;
}

.settings-form {
    display: grid;
    gap: 10px;
}

.settings-form label {
    margin-top: 8px;
    font-weight: 650;
}

.settings-form input,
.settings-form textarea,
.settings-form select,
.search-form input,
.inline-form input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid rgba(110, 202, 253, 0.36);
    border-radius: 7px;
    background: #020405;
    color: var(--text);
    font: inherit;
}

.settings-form textarea {
    resize: vertical;
}

.field-help {
    color: var(--muted);
    font-size: 12px;
    margin-top: -3px;
}

.toggle-row {
    display: inline-flex !important;
    align-items: center;
    gap: 9px;
}

.toggle-row input {
    width: auto;
}

.form-actions,
.confirm-actions,
.row-actions,
.inline-form,
.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-actions {
    margin-top: 16px;
    justify-content: flex-end;
}

.secondary-button,
.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 7px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.secondary-button {
    color: var(--text) !important;
    background: transparent;
    border: 1px solid rgba(110, 202, 253, 0.45);
}

.danger-button {
    color: #ffd9d9 !important;
    background: rgba(255, 86, 86, 0.06);
    border: 1px solid rgba(255, 105, 105, 0.5);
}

.danger-button.strong {
    background: rgba(255, 86, 86, 0.16);
}

.member-admin-row {
    align-items: flex-start;
}

.row-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.search-form,
.inline-form {
    min-width: 320px;
}

.search-form input,
.inline-form input {
    min-width: 200px;
}

.danger-zone-page {
    max-width: 780px;
    margin: 0 auto;
}

.warning-text {
    color: #ffb6b6;
    line-height: 1.6;
}

.site-footer {
    margin-top: 70px;
    padding: 30px 42px;
    border-top: 1px solid rgba(110, 202, 253, 0.16);
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

@media (max-width: 760px) {
    .top-header {
        padding: 18px 20px;
        min-height: auto;
    }

    .discord-user-card {
        min-width: 0;
        max-width: 250px;
    }

    .nav-inner {
        padding: 0 20px;
        gap: 18px;
        overflow-x: auto;
    }

    .page-content,
    .admin-manage-page {
        width: min(100% - 28px, 1100px);
        margin: 34px auto;
    }

    .section-top,
    .account-row,
    .admin-page-top {
        align-items: stretch;
        flex-direction: column;
    }

    .row-actions,
    .form-actions,
    .search-form,
    .inline-form {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        min-width: 0;
    }
}
