/* ========== Toast组件 ========== */
.toast-message {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    max-width: 80vw;
    text-align: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

/* ========== ActionSheet组件 ========== */
.actionsheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.actionsheet-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 8px 0;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 201;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    0% { transform: translateY(100%); }
    100% { transform: translateY(0); }
}

.actionsheet-item {
    padding: 16px 20px;
    text-align: center;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.2s ease;
}

.actionsheet-item:active {
    background: #f5f5f5;
}

.actionsheet-item:last-child {
    border-bottom: none;
}

.actionsheet-cancel {
    margin-top: 8px;
    background: #f5f5f5;
    border-radius: 8px;
    font-weight: 500;
    color: #666;
}

.actionsheet-cancel:active {
    background: #e8e8e8;
}

/* ========== 日期时间选择器 ========== */
.datetime-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
}

.datetime-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.datetime-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 16px 0;
    padding-bottom: env(safe-area-inset-bottom);
    transform: translateY(100%);
    animation: slideUp 0.3s ease forwards;
}

.datetime-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.datetime-cancel {
    color: #999;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
}

.datetime-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.datetime-ok {
    color: #1677ff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
}

.datetime-body {
    display: flex;
    height: 200px;
    overflow: hidden;
}

.picker-column {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: y mandatory;
    padding: 70px 0;
    text-align: center;
}

.picker-column::-webkit-scrollbar {
    display: none;
}

.picker-item {
    height: 40px;
    line-height: 40px;
    font-size: 16px;
    color: #999;
    scroll-snap-align: center;
    transition: all 0.2s ease;
}

.picker-item.active {
    color: #333;
    font-weight: 500;
    font-size: 18px;
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
    .actionsheet-panel {
        background: #1a1a2e;
    }
    
    .actionsheet-item {
        color: #e0e0e0;
        border-bottom-color: #2a2a3e;
    }
    
    .actionsheet-item:active {
        background: #2a2a3e;
    }
    
    .actionsheet-cancel {
        background: #2a2a3e;
        color: #aaa;
    }
    
    .actionsheet-cancel:active {
        background: #3a3a4e;
    }
    
    .datetime-panel {
        background: #1a1a2e;
    }
    
    .datetime-title {
        color: #e0e0e0;
    }
    
    .datetime-header {
        border-color: #2a2a3e;
    }
    
    .picker-item {
        color: #666;
    }
    
    .picker-item.active {
        color: #e0e0e0;
    }
}

.actionsheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.actionsheet-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 8px 0;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 201;
    animation: slideUp 0.3s ease;
    max-height: 60vh;
    overflow-y: auto;
}

@keyframes slideUp {
    0% { transform: translateY(100%); }
    100% { transform: translateY(0); }
}

.actionsheet-item {
    padding: 16px 20px;
    text-align: center;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.2s ease;
}

.actionsheet-item:active {
    background: #f5f5f5;
}

.actionsheet-item:last-child {
    border-bottom: none;
}

.actionsheet-cancel {
    margin-top: 8px;
    background: #f5f5f5;
    border-radius: 8px;
    font-weight: 500;
    color: #666;
}

.actionsheet-cancel:active {
    background: #e8e8e8;
}

@media (prefers-color-scheme: dark) {
    .actionsheet-panel {
        background: #1a1a2e;
    }
    .actionsheet-item {
        color: #e0e0e0;
        border-bottom-color: #2a2a3e;
    }
    .actionsheet-item:active {
        background: #2a2a3e;
    }
    .actionsheet-cancel {
        background: #2a2a3e;
        color: #aaa;
    }
    .actionsheet-cancel:active {
        background: #3a3a4e;
    }
}