@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    color-scheme: dark;
    --bg-page: #161616;
    --font-sans: 'Poppins', sans-serif;
    --weao-green: #3bea57;
    --weao-red: #ec3b47;
    --card-bg: rgba(28, 30, 32, 0.75);
    --card-border: rgba(255, 255, 255, 0.08);
}

html {
    background: #161616;
    min-height: 100%;
    font-family: var(--font-sans);
    color: #d4d4d4;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

html::-webkit-scrollbar {
    width: 6px;
}

html::-webkit-scrollbar-track {
    background: transparent;
}

html::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 99px;
}

html::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.18);
}


body {
    margin: 0;
    padding: 40px 16px;
    box-sizing: border-box;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: -50%;
    width: 200%;
    height: 200%;
    background-image: radial-gradient(circle, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 22px 22px;
    transform: rotate(15deg);
    pointer-events: none;
    z-index: 1;
}


a:link,
a:visited {
    color: #2ba2f1;
    font-weight: 500;
    text-decoration: none;
}

a:hover {
    opacity: 0.8;
}

output {
    white-space: pre-wrap;
}

button {
    font-weight: normal;
}

.exps {
    color: var(--weao-red);
    font-weight: 400;
}

.online {
    color: var(--weao-green);
    font-weight: 400;
}

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notice {
    margin: 4px 0 0;
    padding: 0;
    animation: fade 0.4s ease both;
}

.notice p {
    margin: 0;
    font-size: 0.83rem;
    line-height: 1.75;
    color: #888;
}

.notice-icon {
    width: 13px;
    height: 13px;
    color: #888;
    display: inline;
    vertical-align: middle;
    margin-right: 5px;
    position: relative;
    top: -1px;
}

.notice a,
.notice a:link,
.notice a:visited {
    color: var(--weao-green);
    font-weight: 400;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.notice a:hover {
    opacity: 0.7;
}

.brand,
.notice .brand,
.notice .brand:link,
.notice .brand:visited {
    color: #ffffff;
    font-weight: 400;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    max-width: 760px;
}

.no-select {
    user-select: none;
}

form {
    background:
        linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
        linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 100%) border-box;
    border: 1px solid transparent;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 8px;
    padding: 16px;
}

.fgrid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    align-items: center;
}

.fgrid label {
    font-size: 0.78rem;
    color: #909090;
    white-space: nowrap;
    position: relative;
}

.fgrid label[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #ffffff;
    color: #111111;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 99px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 202;
}

.fgrid label[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    border-width: 7px 7px 0 7px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 202;
}

.fgrid label[data-tooltip]:hover::before,
.fgrid label[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.sep {
    height: 1px;
    background: var(--card-border);
    margin: 2px 0;
}

.frow {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.frow input[type="text"],
.frow input[type="range"] {
    flex: 1;
    min-width: 0;
}

.hint {
    font-size: 0.68rem;
    color: #555;
    white-space: normal;
    flex-shrink: 1;
}

form input[type="text"],
form input[type="number"],
form select {
    background: #161616;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 6px;
    color: #e0e0e0;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 400;
    padding: 7px 12px;
    outline: none;
    width: fit-content;
    max-width: 180px;
    min-width: 0;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

form input[type="text"]:hover,
form input[type="number"]:hover,
form select:hover {
    background: #161616;
    border-color: rgba(255,255,255,0.2);
}

form input[type="number"] {
    width: 52px;
    max-width: 52px;
}

form input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 99px;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease;
}

form input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--weao-green);
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease;
}

form input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

form input[type="range"]::-moz-range-thumb {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--weao-green);
    border: none;
    cursor: pointer;
}

form input[type="text"]::placeholder {
    color: #555;
    font-weight: 400;
}

form input[type="text"]:focus,
form input[type="number"]:focus,
form select:focus {
    border-color: rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.03);
    box-shadow: none;
}

form select option {
    background: #1e1e1e;
}

.drop {
    position: relative;
    width: fit-content;
}

.drop-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #161616;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 6px;
    color: #d4d4d4;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    min-width: 140px;
    justify-content: space-between;
}

.drop-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.18);
}

.drop-arrow {
    color: #555;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.drop.open .drop-arrow {
    transform: rotate(180deg);
}

.drop-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    background: #1c1c1c;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 4px;
    z-index: 100;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.drop.open .drop-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.drop-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 0.78rem;
    color: #aaa;
    cursor: pointer;
    transition: background 0.1s ease, color 0.1s ease;
}

.drop-item:hover {
    background: rgba(255,255,255,0.06);
    color: #e0e0e0;
}

.drop-item.selected {
    color: #e0e0e0;
}

form input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    background: rgba(255,255,255,0.04);
    cursor: pointer;
    position: relative;
    transition: background 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
}

form input[type="checkbox"]:checked {
    background: var(--weao-green);
    border-color: var(--weao-green);
}

form input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 3px;
    height: 7px;
    border: 1.5px solid #111;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.fbtns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.fbtns button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #d4d4d4;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}


.fbtns button:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.18);
    color: #fff;
}

.redownload-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px auto 0;
    background: var(--card-bg);
    color: #d4d4d4;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s ease;
}

.redownload-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.18);
    color: #fff;
}

.hdr {
    background:
        linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
        linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 100%) border-box;
    border: 1px solid transparent;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 8px;
    padding: 16px 18px 12px;
}

.hdr > p {
    margin: 0 0 2px;
    font-size: 0.88rem;
    line-height: 1.6;
}

.hdr .notice {
    margin: 6px 0 0;
}

#logBox {
    display: none;
    flex-direction: column;
    width: 100%;
    max-width: 760px;
    max-height: 480px;
    margin-top: 10px;
    background:
        linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
        linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 100%) border-box;
    border: 1px solid transparent;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

#logBox::-webkit-scrollbar {
    width: 4px;
}

#logBox::-webkit-scrollbar-track {
    background: transparent;
}

#logBox::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 99px;
}

#logBox::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.18);
}

@keyframes logIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.entry {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border-bottom: 1px solid var(--card-border);
    font-size: 0.8rem;
    animation: logIn 0.15s ease both;
    user-select: none;
}

.entry:last-child { border-bottom: none; }

.badge {
    font-size: 0.63rem;
    font-family: monospace;
    padding: 2px 7px;
    border-radius: 99px;
    background: rgba(255,255,255,0.05);
    color: #555;
    flex-shrink: 0;
    white-space: nowrap;
}

.l-info  .badge { background: rgba(43,162,241,0.12);  color: #4fa8d5; }
.l-ok    .badge { background: rgba(59,234,87,0.1);    color: #3bba57; }
.l-err   .badge { background: rgba(236,59,71,0.12);   color: #d06070; }
.l-link  .badge { background: rgba(43,162,241,0.12);  color: #4fa8d5; }

.msg {
    color: #888;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.4;
}

.l-ok   .msg { color: #c0c0c0; }
.l-err  .msg { color: #d08080; }
.l-info .msg { color: #90b8d0; }
.l-link a    { color: #2ba2f1; text-decoration: none; }
.l-link a:hover { text-decoration: underline; }
.l-err .msg a  { color: #f1a1a1; text-decoration: underline; }
.l-err .msg a:hover { color: #fff; }

#progWrap {
    display: none;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    max-width: 760px;
    margin-top: 10px;
}

.phdr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #666;
}

.pright {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

#progPct {
    color: #aaa;
    font-weight: 500;
}

#progEta {
    color: #555;
    font-family: monospace;
    font-size: 0.68rem;
}

.ptrack {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 99px;
    overflow: hidden;
}

#progFill {
    height: 100%;
    width: 0%;
    background: var(--weao-green);
    border-radius: 99px;
    transition: width 0.35s ease;
}

.usage {
    background:
        linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
        linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 100%) border-box;
    border: 1px solid transparent;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 8px;
    padding: 16px 18px;
    font-size: 0.83rem;
    line-height: 1.7;
    color: #aaa;
}

.u-title {
    margin: 0 0 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #aaa;
}

.usage ul {
    margin: 0 0 10px;
    padding-left: 18px;
}

.usage li {
    margin-bottom: 4px;
}

.usage strong {
    color: #d4d4d4;
    font-weight: 500;
}

.usage code {
    background: rgba(255,255,255,0.07);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.8rem;
    font-family: monospace;
    color: #d4d4d4;
}

.u-note {
    margin: 0;
    font-size: 0.78rem;
    color: #666;
}

.ex-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: flex-start;
}

.ex-hint {
    font-size: 0.72rem;
    color: #555;
}

.ex-more {
    display: inline-flex;
    align-items: center;
    background: none;
    border: 1px dashed rgba(255,255,255,0.12);
    border-radius: 99px;
    color: #555;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    padding: 3px 9px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.ex-more:hover {
    border-color: rgba(255,255,255,0.25);
    color: #888;
}

.ex-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 99px;
    padding: 3px 10px 3px 6px;
    cursor: pointer;
    font-size: 0.72rem;
    font-family: var(--font-sans);
    color: #c0c0c0;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.ex-pill.plat-hide,
.ex-pill.collapsed { display: none; }

.ex-pill:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.18);
    color: #fff;
}

.ex-pill--stale {
    background: rgba(251,176,59,0.07);
    border-color: rgba(251,176,59,0.3);
    color: #d4b870;
}

.ex-pill--stale:hover {
    background: rgba(251,176,59,0.14);
    border-color: rgba(251,176,59,0.5);
    color: #f0d080;
}

.ex-pill--old {
    background: rgba(236,59,71,0.07);
    border-color: rgba(236,59,71,0.3);
    color: #c07070;
}

.ex-pill--old:hover {
    background: rgba(236,59,71,0.13);
    border-color: rgba(236,59,71,0.5);
    color: #e08888;
}

.ex-logo {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ex-chosen {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ex-pick {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(59,234,87,0.07);
    border: 1px solid rgba(59,234,87,0.22);
    border-radius: 99px;
    padding: 3px 4px 3px 8px;
    font-size: 0.72rem;
    color: #d4d4d4;
}

.ex-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid transparent;
    border-radius: 50%;
    width: 17px;
    height: 17px;
    color: #666;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
    padding: 0;
}

.ex-clear:hover {
    background: rgba(255,255,255,0.12);
    color: #d4d4d4;
}

@keyframes modalIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes modalOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes cardIn {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);   }
}

@keyframes cardOut {
    from { opacity: 1; transform: scale(1)    translateY(0);   }
    to   { opacity: 0; transform: scale(0.95) translateY(8px); }
}

.ex-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 16px;
    box-sizing: border-box;
    animation: modalIn 0.2s ease both;
}

.ex-modal.closing {
    animation: modalOut 0.18s ease both;
}

.ex-modal-card {
    background:
        linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
        linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 100%) border-box;
    border: 1px solid transparent;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 10px;
    padding: 20px 22px;
    max-width: 380px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: cardIn 0.22s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}

.ex-modal.closing .ex-modal-card {
    animation: cardOut 0.18s ease both;
}

.ex-modal-title {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: #d4d4d4;
}

.ex-modal-msg {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.65;
    color: #888;
}

.ex-modal-ok {
    align-self: flex-end;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #d4d4d4;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 5px 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: 4px;
}

.ex-modal-ok:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
    color: #fff;
}

@media (hover: none) and (pointer: coarse) {
    .fgrid label[data-tooltip]::before,
    .fgrid label[data-tooltip]::after {
        display: none;
    }
}

@media (max-width: 600px) {
    body {
        padding: 16px 12px;
    }

    .hdr {
        padding: 14px 14px 12px;
    }

    .hdr > p {
        font-size: 0.8rem;
        line-height: 1.6;
    }

    .notice p {
        font-size: 0.78rem;
        line-height: 1.7;
    }

    form {
        padding: 14px 12px;
    }

    .fgrid {
        grid-template-columns: 1fr;
        gap: 2px 0;
    }

    .fgrid label {
        margin-top: 12px;
        font-size: 0.75rem;
        white-space: normal;
    }

    .sep {
        display: none;
    }

    form input[type="text"],
    form input[type="number"],
    form select {
        width: 100%;
        max-width: none;
        min-height: 40px;
        font-size: 14px;
        padding: 8px 12px;
    }

    .drop,
    .drop-btn {
        width: 100%;
    }

    .drop-btn {
        min-height: 40px;
        font-size: 14px;
    }

    .drop-menu {
        font-size: 0.85rem;
    }

    .drop-item {
        padding: 10px 12px;
        font-size: 0.82rem;
    }

    form input[type="range"] {
        width: 100%;
    }

    form input[type="checkbox"] {
        width: 18px;
        height: 18px;
        border-radius: 5px;
        flex-shrink: 0;
    }

    form input[type="checkbox"]:checked::after {
        left: 5px;
        top: 2px;
        width: 4px;
        height: 8px;
    }

    .fbtns {
        flex-direction: column;
        gap: 8px;
        margin-top: 16px;
    }

    .fbtns button {
        width: 100%;
        justify-content: center;
        min-height: 42px;
        font-size: 14px;
    }

    .hint {
        font-size: 0.72rem;
    }

    .usage {
        font-size: 0.8rem;
        padding: 14px;
    }

    .usage ul {
        padding-left: 16px;
    }

    .u-note {
        font-size: 0.74rem;
        word-break: break-all;
    }

    .usage code {
        word-break: break-all;
    }

    #logBox,
    #progWrap {
        width: 100%;
        box-sizing: border-box;
    }

    #logBox {
        max-height: 320px;
    }
}
