/* 排盘表单样式 */
#form-container {
    max-width: 650px;
    margin: 0 auto 30px;
}

.palace-form {
    background-color: rgba(255, 253, 248, 0.95);
    border: 2px solid #8b5a2b;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 6px 12px rgba(107, 79, 65, 0.2);
}

.form-title {
    font-size: 1.5rem;
    color: #6b4f41;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #d4c8b8;
    text-align: center;
    font-weight: bold;
}

.form-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.form-row-5col {
    grid-template-columns: repeat(5, 1fr);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 0.95rem;
    color: #6b4f41;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.label-icon {
    width: 18px;
    height: 18px;
    color: #8b5a2b;
    flex-shrink: 0;
}

.form-input,
.form-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #d4c8b8;
    border-radius: 6px;
    background-color: rgba(255, 253, 248, 0.9);
    color: #332b20;
    font-size: 0.95rem;
    font-family: "楷体", "宋体", "Microsoft YaHei", sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #8b5a2b;
    box-shadow: 0 0 0 2px rgba(139, 90, 43, 0.1);
}

.form-input::placeholder {
    color: #a08c78;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 10px;
}

.form-submit-btn,
.form-reset-btn {
    padding: 14px 40px;
    border: 2px solid #8b5a2b;
    border-radius: 6px;
    font-size: 1.1rem;
    font-family: "楷体", "宋体", "Microsoft YaHei", sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.form-submit-btn {
    background-color: #8b5a2b;
    color: #fff;
    width: 100%;
    max-width: 400px;
}

.form-submit-btn:hover {
    background-color: #6b4f41;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(107, 79, 65, 0.3);
}

.form-reset-btn {
    background-color: transparent;
    color: #8b5a2b;
}

.form-reset-btn:hover {
    background-color: rgba(139, 90, 43, 0.1);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-row-5col {
        grid-template-columns: repeat(2, 1fr);
    }

    .palace-form {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-submit-btn,
    .form-reset-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .form-row-5col {
        grid-template-columns: 1fr;
    }
}

/* 日期时间选择器样式 */
.date-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.date-input-wrapper .form-input {
    width: 100%;
    padding-right: 40px;
    cursor: pointer;
    box-sizing: border-box;
}

.calendar-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    cursor: pointer;
    color: #8b5a2b;
    transition: color 0.3s;
    pointer-events: none;
}

.calendar-icon:hover {
    color: #6b4f41;
}

/* 模态框基础样式 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
    backdrop-filter: blur(2px);
}

.modal-backdrop.active {
    display: block;
}

.picker-modal {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.picker-modal.active {
    transform: translateY(0);
}

/* 选择器头部 */
.picker-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.picker-title {
    font-size: 18px;
    font-weight: 600;
    color: #6b4f41;
}

.picker-actions {
    display: flex;
    gap: 10px;
}

.picker-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.picker-cancel {
    background: #f5f5f5;
    color: #666;
}

.picker-cancel:hover {
    background: #e0e0e0;
}

.picker-confirm {
    background: #8b5a2b;
    color: white;
    font-weight: 600;
}

.picker-confirm:hover {
    background: #6b4f41;
}

/* 日历信息栏 */
.calendar-info {
    padding: 15px 20px;
    text-align: center;
    font-size: 16px;
    color: #333;
    font-weight: 500;
    border-bottom: 1px solid #eee;
}

/* 滚轮容器 */
.wheel-wrapper {
    display: flex;
    height: 240px;
    position: relative;
    overflow: hidden;
}

.wheel-column {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.wheel-scroll {
    list-style: none;
    position: absolute;
    width: 100%;
    top: 100px;
    transition: transform 0.1s ease-out;
    padding: 0;
    z-index: 5;
}

.wheel-item {
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 17px;
    font-weight: 500;
    color: #888;
    line-height: 40px;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 10;
}

.wheel-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to bottom, 
        rgba(255,255,255,0.9) 0%, 
        rgba(255,255,255,0) 25%, 
        rgba(255,255,255,0) 75%, 
        rgba(255,255,255,0.9) 100%);
    z-index: 10;
}

.wheel-highlight {
    position: absolute;
    top: 100px;
    left: 0;
    right: 0;
    height: 40px;
    border-radius: 8px;
    z-index: 1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    pointer-events: none;
    background: rgba(139, 90, 43, 0.15);
    border: 1px solid rgba(139, 90, 43, 0.3);
}

.wheel-item.active {
    color: #6b4f41 !important;
    font-weight: 600;
    z-index: 20;
    position: relative;
}

@media (max-width: 600px) {
    .picker-modal {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
    }
    
    .wheel-column {
        min-width: 0;
        flex: 1;
    }
    
    .wheel-item {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0 5px;
    }
}

/* 表单验证错误样式 */
.form-input.error,
.form-select.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.error-message {
    display: none;
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 4px;
    padding-left: 4px;
}

.error-message:before {
    content: "⚠ ";
    margin-right: 2px;
}

