:root {
    --logo-color-pri: #4f4e50;
    --logo-color-sec: rgb(160, 159, 161);
    --input-bg: #f5f5f5;
    --input-hover-bg: white;
    --text-color: black;
    --border-color: #ddd;
    --btn-color: #ffffff;
    --btn-bg: #7158e0;
    --btn-bg-hover: #886dff;
    --btn-bg-border: rgb(71, 49, 180);
}

@media (prefers-color-scheme: light) {
    body {
        background: #f5f5f5;
    }

    .container,
    .options-list {
        background: white;
    }

    footer p {
        color: black;
        background-color: white;
    }

    .option,
    .option.selected,
    .option:hover,
    .option.selected:hover {
        border: unset !important;
    }

    input,
    .product-info-inner,
    .option:hover {
        background: #f5f5f5;
        color: black;
        border: 1px solid #ddd;
    }

    input:hover,
    .product-info-inner:has(.select-wrapper:hover),
    .product-info-inner:hover {
        background: white;
    }

    .status.error p {
        color: black;
        opacity: 0.65;
    }

    hr {
        background: black;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background: #1B1C1E;
        color: #ffffff;
    }

    .container,
    .options-list {
        background: #2a2a2d;
    }

    footer p {
        color: white;
        background-color: #2c2e31;
    }

    .option,
    .option.selected,
    .option:hover,
    .option.selected:hover {
        border: unset !important;
    }

    input,
    .product-info-inner,
    .option:hover {
        background: #323235;
        color: white;
        border: 1px solid #3a3c41;
    }

    input:hover,
    .product-info-inner:has(.select-wrapper:hover),
    .product-info-inner:hover {
        background: #2a2a2d;
    }

    :root {
        --logo-color-pri: #605f61;
        --logo-color-sec: #3e3d41;
        --btn-color: #e6e0ff;
        --btn-bg: #3f3d49;
        --btn-bg-hover: #37363d;
        --btn-bg-border: #2d2a36;
        --input-bg: #2C2D31;
        --input-hover-bg: #393a3b;
        --text-color: white;
        --border-color: #3a3b3d;
    }

    .status.error p {
        color: white;
        opacity: 0.65;
    }

    hr {
        background: white;
    }
}

body {
    font-family: 'Inter', 'MiSans Chinese', 'MiSans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: 350;
    font-feature-settings: "cv01", "cv03", "cv04", "cv09", "cv10", "cv05", "ss07";
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
    transition: all 0.2s ease-in-out;
}

.container {
    width: 328px;
    height: 396px;
    opacity: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 18px;
    border-radius: 24px;
    gap: 0px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.06), 0px 6px 24px rgba(0, 0, 0, 0.12);
}

.dot-loader {
    height: 8px;
    width: 8px;
    border-radius: 50%;
    background-color: var(--btn-color);
    position: relative;
    -webkit-animation: 1.2s grow ease-in-out infinite;
    animation: 1.2s grow ease-in-out infinite;
}

.dot-loader--2 {
    -webkit-animation: 1.2s grow ease-in-out infinite 0.15555s;
    animation: 1.2s grow ease-in-out infinite 0.15555s;
    margin: 0 8px;
}

.dot-loader--3 {
    -webkit-animation: 1.2s grow ease-in-out infinite 0.3s;
    animation: 1.2s grow ease-in-out infinite 0.3s;
}

@-webkit-keyframes grow {

    0%,
    40%,
    100% {
        -webkit-transform: scale(0);
        transform: scale(0);
    }

    40% {
        -webkit-transform: scale(1);
        transform: scale(1);
    }
}

@keyframes grow {

    0%,
    40%,
    100% {
        -webkit-transform: scale(0);
        transform: scale(0);
    }

    40% {
        -webkit-transform: scale(1);
        transform: scale(1);
    }
}

.loader-container {
    display: flex;
    flex-direction: row;
    align-items: center;
}

span.logoContainer {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    justify-content: center;
    width: 100%;
    margin-top: 14px;
}

.input-group label,
.input-group #status {
    padding: 2px 8px;
}

input {
    width: 100%;
    margin-top: 1px;
    padding: 10px;
    border-radius: 10px;
    font-size: 15px;
    box-sizing: border-box;
    outline: none;
    transition: all 0.2s ease-in-out;
    font-family: 'Inter', 'MiSans Chinese', 'MiSans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-feature-settings: "cv01" 1, "cv03" 1, "cv04" 1, "cv09" 1, "cv10" 1, "cv05" 1, "ss07" 1, "tnum" 1;
}

input#orderId:disabled {
    opacity: 0.8;
    pointer-events: none;
}

header {
    margin: 6px 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

button {
    width: 100%;
    height: 40px;
    padding: 1px;
    padding-top: 0;
    color: var(--btn-color);
    background-color: var(--btn-bg);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

button:hover {
    background-color: var(--btn-bg-hover);
}

footer {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    margin-top: 32px;
    gap: 8px;
}

.status {
    margin-top: 20px;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.2s ease-in-out;
}

.error {
    background: #ffe6e6;
    color: #d63031;
}

.success {
    background: #e6ffe6;
    color: #27ae60;
}

h1 {
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0px;
    line-height: 32px;
    margin: 0;
}

p {
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0px;
    line-height: 20px;
    margin: 0;
}

footer p {
    position: relative;
    z-index: 10;
    padding: 0 8px;
}

a {
    color: #7158e0;
    text-decoration: none;
}

hr {
    margin: 0 6px;
    width: calc(100% - 12px);
    border: 0;
    height: 1px;
    opacity: 0.5;
    transform: translateY(-10px);
}

hr.divider::after {
    content: '';
    display: block;
    height: 1px;
    width: 100%;
    transform: translateY(-10px);
    background: white;
}

hr.divider::before {
    width: fit-content;
    display: block;
    text-align: center;
    padding: 0 12px;
    z-index: 10;
    position: relative;
    min-width: 82px;
}

hr.divider.need-buy::before {
    content: "还没购买吗?";
    transform: translateX(112px);
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
        font-weight: 500;
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        font-weight: 600;
        transform: translateX(-2px);
    }

    20%,
    40%,
    60%,
    80% {
        font-weight: 600;
        transform: translateX(2px);
    }
}

.status {
    margin-top: 8px;
    display: none;
    font-size: 14px;
    padding: 8px;
    border-radius: 4px;
}

.status.error {
    background-color: transparent;
    color: #ff4943;
    margin-top: 0;
    padding: unset;
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 4px;
    flex-wrap: wrap;
}

.status.shake {
    animation: shake 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: fit-content;
    margin: 0;
    padding: 2px 6px 2px 10px;
    /* padding-right: 22px; */
    font-size: 15px;
    font-family: 'Inter', 'MiSans Chinese', 'MiSans', system-ui;
    background: transparent;
    color: var(--text-color);
    border: unset;
    outline: none;
    transition: all 0.2s ease-in-out;
    display: none;
    border-radius: 0;
    text-align: end;
    font-feature-settings: "cv01" 1, "cv03" 1, "cv04" 1, "cv09" 1, "cv10" 1, "cv05" 1, "ss07" 1, "tnum" 1;
}

.custom-select {
    display: flex;
    gap: 2px;
    opacity: 0.75;
    align-items: center;
    flex-direction: row;
    max-height: 24px;
    font-size: 15px;
    font-feature-settings: "cv01" 1, "cv03" 1, "cv04" 1, "cv09" 1, "cv10" 1, "cv05" 1, "ss07" 1, "tnum" 1;
}

.custom-select::after {
    content: '';
    width: 13px;
    height: 23px;
    background-color: var(--text-color);
    -webkit-mask-image: url(./sources/select-icon.svg);
    -webkit-mask-position: center;
    -webkit-mask-size: 13px 23px;
    mask-image: url(./sources/select-icon.svg);
    mask-position: center;
    mask-size: 13px 23px;
    pointer-events: none;
    /* margin-left: -17px; */
}

select option {
    background: var(--input-bg);
    color: var(--text-color);
    padding: 8px;
}

.product-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.product-info h3 {
    margin: 4px 8px;
    font-size: 14px;
    font-weight: normal;
    font-weight: 300;
    opacity: 0.6;
}

p.plan-title {
    font-size: 15px;
    font-weight: 400;
    line-height: 22px;
    margin: 0;
}

.product-info-inner {
    display: flex;
    flex-direction: row;
    padding: 10px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    gap: 8px;
}

.tag-container span {
    font-size: 14px;
    /* padding: 3px 6px; */
    /* background: var(--btn-bg); */
    /* border-radius: 6px; */
    opacity: 0.5;
}

.tag-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
}

.product-info-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.options-container {
    position: absolute;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.2s ease;
}

.options-container.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.options-list {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
    max-height: 240px;
    overflow-y: auto;
    min-width: 196px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding: 4px;
    gap: 2px;
}

.option {
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    color: var(--text-color);
    box-sizing: border-box;
    width: 100%;
    border-radius: 8px;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-feature-settings: "cv01" 1, "cv03" 1, "cv04" 1, "cv09" 1, "cv10" 1, "cv05" 1, "ss07" 1, "tnum" 1;
}

.option.selected {
    color: var(--btn-color);
    background-color: var(--btn-bg);
    font-weight: 500;
}

.option.selected:hover {
    background-color: var(--btn-bg-hover);
}


.option.selected::after {
    content: '';
    height: 14px;
    width: 14px;
    display: block;
    background-color: var(--btn-color);
    -webkit-mask-image: url(./sources/right-icon.svg);
    -webkit-mask-position: center;
    -webkit-mask-size: 14px 14px;
    mask-image: url(./sources/right-icon.svg);
    mask-position: center;
    mask-size: 14px 14px;
    position: absolute;
    right: 18px;
}

.option .date {
    opacity: 0.8;
    font-size: 15px;
    font-feature-settings: "cv01" 1, "cv03" 1, "cv04" 1, "cv09" 1, "cv10" 1, "cv05" 1, "ss07" 1, "tnum" 1;
    font-weight: 300;
}