/**
 * 前端表单样式
 */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF6B9D;
    --primary-hover: #FF4D85;
    --secondary-color: #4A90E2;
    --success-color: #52C41A;
    --warning-color: #FAAD14;
    --error-color: #F5222D;
    --text-color: #333;
    --text-secondary: #666;
    --border-color: #E0E0E0;
    --bg-color: #F5F5F5;
    --white: #FFFFFF;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #FFE5F0 0%, #FFF5F8 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #FF8FB3 100%);
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    color: var(--white);
}

.title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 16px;
    opacity: 0.95;
}

/* 主内容区 */
.main-content {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

/* 表单区块 */
.form-section {
    margin-bottom: 40px;
}

.form-section:last-of-type {
    margin-bottom: 0;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

/* 表单组 */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form-group label.required::after {
    content: '*';
    color: var(--error-color);
    margin-left: 4px;
}

/* 输入框样式 */
input[type="text"],
input[type="tel"],
input[type="datetime-local"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
    position: relative;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

input:disabled,
select:disabled,
textarea:disabled {
    background-color: #F5F5F5;
    cursor: not-allowed;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* 区域选择器 */
.area-selector {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
}

.city-selector input {
    background-color: #F5F5F5;
    font-weight: 500;
}

/* 套餐选项 */
.package-options,
.theme-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.radio-card {
    position: relative;
    display: block;
    cursor: pointer;
}

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-card-content {
    display: block;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s;
    background: var(--white);
}

.radio-card:hover .radio-card-content {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.radio-card input[type="radio"]:checked + .radio-card-content {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #FFE5F0 0%, #FFF5F8 100%);
    box-shadow: var(--shadow);
}

.package-name,
.theme-name {
    display: block;
    font-weight: 500;
    font-size: 15px;
    color: var(--text-color);
}

/* 字符计数 */
.char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 联系信息 */
.contact-info {
    background: linear-gradient(135deg, #FFF5F8 0%, #FFFFFF 100%);
    padding: 24px;
    border-radius: 12px;
    border: 2px solid var(--primary-color);
}

.contact-details p {
    margin-bottom: 8px;
    font-size: 15px;
}

.contact-details strong {
    color: var(--primary-color);
    margin-right: 8px;
}

/* 错误提示 */
.error-message {
    display: block;
    color: var(--error-color);
    font-size: 12px;
    margin-top: 4px;
    min-height: 18px;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--error-color);
}

/* 按钮样式 */
.form-actions {
    text-align: center;
    margin-top: 40px;
}

.btn {
    padding: 14px 48px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #FF8FB3 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 157, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
}

.modal-icon.success {
    background: var(--success-color);
    color: var(--white);
}

.modal-content h3 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--text-color);
}

.modal-content p {
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.modal-content strong {
    color: var(--primary-color);
    font-size: 18px;
}

.modal-content .btn {
    margin-top: 20px;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 13px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 30px 20px;
    }

    .title {
        font-size: 24px;
    }

    .subtitle {
        font-size: 14px;
    }

    .main-content {
        padding: 24px;
    }

    .area-selector {
        grid-template-columns: 1fr;
    }

    .package-options,
    .theme-options {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 20px;
    }

    .section-title {
        font-size: 18px;
    }

    .btn {
        width: 100%;
    }
}
