/* 自定义Select样式 */
.custom-select {
    position: relative;
    display: inline-block;
    min-width: 100px;
}

.custom-select select {
    display: none; /* 隐藏原生select */
}

.select-selected {
    background-color: #f7f0e6;
    border: 1px solid #d1b78e;
    border-radius: 4px;
    padding: 8px 35px 8px 12px;
    cursor: pointer;
    user-select: none;
    position: relative;
    color: #333;
    font-size: 14px;
    transition: all 0.3s ease;
}

.select-selected:hover {
    border-color: #a86c4c;
}

/* 下拉箭头 */
.select-selected::after {
    content: '▼';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #8c543a;
    transition: transform 0.3s ease;
}

/* 展开时旋转箭头 */
.select-selected.select-arrow-active::after {
    transform: translateY(-50%) rotate(180deg);
}

/* 下拉菜单容器 */
.select-items {
    position: absolute;
    background-color: #f7f0e6;
    border: 1px solid #d1b78e;
    border-top: none;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
    max-height: 200px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* 显示下拉菜单 */
.select-items.select-show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 选项样式 */
.select-items div {
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
    color: #333;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

/* 选项悬停和选中样式 */
.select-items div:hover,
.select-items .same-as-selected {
    background-color: #e9d9c5;
    color: #8c543a;
}

/* 滚动条样式 */
.select-items::-webkit-scrollbar {
    width: 8px;
}

.select-items::-webkit-scrollbar-track {
    background: rgba(215, 183, 142, 0.1);
}

.select-items::-webkit-scrollbar-thumb {
    background-color: #d1b78e;
    border-radius: 4px;
}

.select-items::-webkit-scrollbar-thumb:hover {
    background-color: #a86c4c;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .custom-select {
        max-width: 150px !important;
    }
}
/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .select-selected {
        background-color: #2c2c2c;
        border-color: #555;
        color: #f0f0f0;
    }

    .select-selected:hover {
        border-color: #a0a0a0;
    }

    .select-selected::after {
        color: #f0f0f0;
    }

    .select-items {
        background-color: #2c2c2c;
        border-color: #555;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }

    .select-items div {
        color: #f0f0f0;
    }

    .select-items div:hover,
    .select-items .same-as-selected {
        background-color: #444;
        color: #fff;
    }

    .select-items::-webkit-scrollbar-track {
        background: rgba(85, 85, 85, 0.1);
    }

    .select-items::-webkit-scrollbar-thumb {
        background-color: #555;
    }

    .select-items::-webkit-scrollbar-thumb:hover {
        background-color: #a0a0a0;
    }
}
