/**
 * 用户预约表单样式
 */

 * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
    position: relative;
    -webkit-text-size-adjust: 100%; 
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 8px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #6366f1 100%);
    color: white;
    padding: 30px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.header h1 {
    font-size: 26px;
    margin-bottom: 12px;
    font-weight: 600;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 13px;
    line-height: 1.6;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

.subtitle .highlight-red {
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    background-color: rgba(255, 255, 255, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.appointment-form {
    padding: 25px 30px;
}

.form-group {
    margin-bottom: 18px;
}

.section-title {
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group label.required::after {
    content: ' *';
    color: #e74c3c;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 17px; 
    transition: all 0.3s ease;
    font-family: inherit;
    background-color: #fafafa;
}

.form-group input[type="text"]:hover,
.form-group input[type="tel"]:hover,
.form-group select:hover,
.form-group textarea:hover {
    background-color: #ffffff;
    border-color: #d1d5db;
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.radio-group label,
.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 6px;
    transition: background-color 0.2s;
    font-size: 14px;
    min-height: 36px;
}

.radio-group label:hover,
.checkbox-group label:hover {
    background-color: #f3f4f6;
    border-color: #e5e7eb;
}

.radio-group label input[type="radio"],
.checkbox-group label input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.radio-group label input[type="text"],
.checkbox-group label input[type="text"] {
    margin-left: 10px;
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.time-slot-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 10px;
    min-height: 36px;
}

.quota-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    background-color: #d4edda;
    color: #155724;
    margin-left: auto;
    white-space: nowrap;
}

.quota-badge.quota-low {
    background-color: #fff3cd;
    color: #856404;
}

.quota-badge.quota-full {
    background-color: #f8d7da;
    color: #721c24;
}

.loading {
    padding: 20px;
    text-align: center;
    color: #666;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px 14px;
    background-color: #f9fafb;
    border-radius: 8px;
    border: 1.5px solid #e5e7eb;
    margin-top: 4px;
    transition: all 0.2s ease;
}

.checkbox-label:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label span {
    flex: 1;
    line-height: 1.6;
}

.important-note {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    padding: 14px 16px;
    border-radius: 8px;
    color: #92400e;
    font-size: 13px;
    line-height: 1.6;
    margin-top: 4px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
}

.form-actions {
    margin-top: 20px;
    text-align: center;
}

.btn {
    padding: 12px 35px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35), 0 2px 8px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5), 0 4px 12px rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, #5b5ff0 0%, #7c3aed 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.message {
    margin: 20px 30px;
    padding: 15px;
    border-radius: 8px;
    display: none;
    text-align: center;
    font-weight: 500;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* 成功弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    padding: 30px 30px 20px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.modal-icon {
    display: inline-block;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    line-height: 60px;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
}

.success-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.modal-body {
    padding: 25px 30px;
    text-align: center;
}

.modal-body p {
    margin: 0;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

.modal-footer {
    padding: 20px 30px 30px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.modal-footer .btn {
    min-width: 120px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header {
        padding: 20px;
    }

    .header h1 {
        font-size: 22px;
    }

    .subtitle {
        font-size: 13px;
    }

    .appointment-form {
        padding: 20px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .radio-group label,
    .checkbox-group label {
        padding: 6px 8px;
        font-size: 13px;
        min-height: 32px;
    }
    
    .radio-group,
    .checkbox-group {
        gap: 4px;
    }

    .btn {
        width: 100%;
        padding: 12px;
    }

    .message {
        margin: 15px 20px;
    }
    
    .modal-content {
        width: 95%;
        max-width: 400px;
    }
    
    .modal-header {
        padding: 25px 20px 15px;
    }
    
    .modal-icon {
        width: 50px;
        height: 50px;
        line-height: 50px;
        font-size: 28px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-body p {
        font-size: 15px;
    }
    
    .modal-footer {
        padding: 15px 20px 25px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 20px;
    }

    .form-group input[type="text"],
    .form-group input[type="tel"],
    .form-group textarea {
        padding: 10px 12px;
        font-size: 14px;
    }

    .radio-group label input[type="text"],
    .checkbox-group label input[type="text"] {
        font-size: 14px;
        padding: 6px;
    }
}

