/**
 * 通用页面样式 - 用于 contact.php, about.php, user-guide.php, agreement.php, privacy.php
 * 包含页面头部、表单、内容区域等通用样式
 */

/* ==================== 页面头部 ==================== */
.page-header {
    position: relative;
    background-image: url('/public/images/contact-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 120px 0 60px;
    text-align: center;
    margin-top: 70px;
    overflow: hidden;
}

/* 半透明渐变遮罩 */
.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.85) 0%, rgba(37, 117, 252, 0.85) 100%);
    z-index: 1;
}

/* 确保内容在遮罩层之上 */
.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 15px;
    color: #ffffff !important;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.page-header p {
    font-size: 18px;
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

/* ==================== 内容区域 ==================== */
.content-section {
    padding: 80px 0;
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.content-wrapper h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.content-wrapper h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.content-wrapper p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 15px;
}

.content-wrapper ul,
.content-wrapper ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.content-wrapper li {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 10px;
}

.content-wrapper a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.content-wrapper a:hover {
    color: var(--secondary-color);
}

/* ==================== 联系页面 ==================== */
.contact-section {
    padding: 80px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    max-width: 1100px;
    margin: 0 auto;
}

/* 联系信息 */
.contact-info {
    background: var(--bg-light);
    padding: 40px;
    border-radius: 16px;
}

.contact-info h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
}

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

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.contact-item p {
    font-size: 14px;
    color: var(--text-gray);
    margin: 0;
}

/* 联系表单 */
.contact-form-wrapper {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.contact-form-wrapper h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 30px;
}

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

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
}

.form-control textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
    padding: 14px 24px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(106, 17, 203, 0.3);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* 表单输入框样式 */
.contact-form-wrapper input[type="text"],
.contact-form-wrapper input[type="email"],
.contact-form-wrapper input[type="tel"],
.contact-form-wrapper select,
.contact-form-wrapper textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: white;
}

.contact-form-wrapper input:focus,
.contact-form-wrapper select:focus,
.contact-form-wrapper textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
}

.contact-form-wrapper textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form-wrapper select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

/* 验证码样式 */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.captcha-container input {
    width: 120px;
    flex-shrink: 0;
}

.captcha-image {
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #e0e0e0;
}

.captcha-refresh {
    color: var(--primary-color);
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.captcha-refresh:hover {
    text-decoration: underline;
}

/* ==================== 关于我们页面 ==================== */
.about-hero {
    padding: 60px 0;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 60px 0;
}

.about-stat-item {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.about-stat-number {
    font-size: 42px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.about-stat-label {
    font-size: 14px;
    color: var(--text-gray);
}

.about-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 60px 0;
}

.about-value-card {
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.about-value-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.about-value-card h4 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.about-value-card p {
    color: var(--text-gray);
    line-height: 1.6;
}

/* ==================== 使用文档页面 ==================== */
.guide-section {
    padding: 60px 0;
    border-bottom: 1px solid #e0e0e0;
}

.guide-section:last-child {
    border-bottom: none;
}

.guide-section h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.guide-section h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.guide-nav {
    position: sticky;
    top: 100px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.guide-nav h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.guide-nav ul {
    list-style: none;
    padding: 0;
}

.guide-nav li {
    margin-bottom: 8px;
}

.guide-nav a {
    display: block;
    padding: 8px 12px;
    color: var(--text-gray);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
}

.guide-nav a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.guide-nav a.active {
    background: var(--gradient);
    color: white;
}

/* ==================== 协议文档页面 ==================== */
.legal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.legal-content h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.legal-content h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
    margin-top: 30px;
}

.legal-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
    margin-top: 20px;
}

.legal-content p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 15px;
}

.legal-content ul {
    margin-bottom: 15px;
    padding-left: 25px;
}

.legal-content li {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.legal-date {
    text-align: right;
    color: var(--text-light);
    font-size: 12px;
    margin-top: 40px;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .page-header {
        padding: 80px 0 40px;
    }

    .page-header h1 {
        font-size: 32px;
    }

    .page-header p {
        font-size: 16px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .content-section {
        padding: 50px 0;
    }

    .content-wrapper h2 {
        font-size: 24px;
    }

    .content-wrapper h3 {
        font-size: 18px;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-values {
        grid-template-columns: 1fr;
    }

    .guide-nav {
        position: static;
    }
}