.selector-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    justify-content: center;
}

.select-wrapper {
    flex: 1 1 300px;
    min-width: 260px;
    position: relative;
}

.styled-select {
    width: 100%;
    height: 2rem;
    line-height: 2rem;
    padding: 0 0.75rem;
    font-size: 0.7rem;
    border-radius: 6px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: 0.2s;
    color: #1a263b;
    font-weight: 500;
    border: 1px solid #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: "Twemoji Country Flags", "Helvetica", "Arial", sans-serif;
}

.night .styled-select{
    border: 1px solid #444;
    background-color: #181a1b;
    color: #eee;
}

.swap-button {
    background: #fff;
    border: none;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
    color: #2a3f64;
    border: 1px solid #eee;
    margin-bottom: 0;
    position: relative;
}

.night .swap-button{
    border: 1px solid #444;
    background-color: #181a1b;
    color: #eee;
}

.swap-button::before{
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(/zb_users/plugin/xc_toolbox/style/img/zhuanhuan.svg);
    background-size: 50% 50%;
    background-repeat: no-repeat;
    background-position: center;
}

.time-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.time-card {
    border-radius: 6px;
    padding:1rem;
    border: 1px solid #eee;
    transition: 0.2s;
}

.night .time-card{
    border: 1px solid #444;
    background-color: #181a1b;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card-header .flag {
    font-size: 2.1rem;
    height: 2.1rem;
    line-height: 2.1rem;
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.1));
    font-family: "Twemoji Country Flags", "Helvetica", "Arial", sans-serif;
    display: block;
}

.location-name {
    font-weight: 650;
    font-size: 0.8rem;
    height: 1rem;
    line-height: 1rem;
    color: #15263f;
    letter-spacing: -0.01em;
}

.night .location-name{
    color: #eee;
}

.city-detail {
    font-size: 0.6rem;
    height: 1rem;
    line-height: 1rem;
    color: #475c7a;
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.night .city-detail{
    color: #aaa;
}

.clock-display {
    font-size: 2rem;
    font-weight: 600;
    font-feature-settings: "tnum";
    letter-spacing: 2px;
    color: #0b1c38;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 1rem;
    border: 1px solid #eee;
}

.night .clock-display{
    color: #eee;
    border: 1px solid #444;
    background-color: #222;
}

.date-display {
    font-size: 1rem;
    color: #3a5270;
    text-align: center;
    font-weight: 450;
}

.night .date-display {
    color: #aaa;
}

.diff-panel {
    background: linear-gradient(125deg, #1f2d4a, #25395b);
    border-radius: 6px;
    padding: 0.75rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 0.75rem;
}

.diff-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.diff-value {
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    font-feature-settings: "tnum";
    background: rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 针对 optgroup 样式加强 */
optgroup {
    font-weight: 600;
    color: #2d3f62;
    background: #f5f8ff;
}

option {
    padding: 6px 10px;
    font-weight: normal;
    font-family: "Twemoji Country Flags", "Helvetica", "Arial", sans-serif;
}

/* 自定义滚动条 */
select::-webkit-scrollbar {
    width: 8px;
}
select::-webkit-scrollbar-track {
    background: #e9ecf5;
    border-radius: 8px;
}
select::-webkit-scrollbar-thumb {
    background: #a1b3d1;
    border-radius: 8px;
}


@media (max-width: 600px) {
    .time-cards {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 390px) {
    .selector-panel {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    .select-wrapper {
        flex: 1 1 100%;
    }
    .swap-button {
        width: 100%;
    }
    .swap-button::before {
        transform: rotate(90deg);
    }
}