/* ==================== 欢迎加入模块样式 ====================
   使用赤壁流金 v2.0 CSS 变量（定义在 base.html 的 :root）
   ========================================================= */

/* ==================== 页面容器 ==================== */
.contact-page {
    min-height: 100vh;
    padding: 80px 20px 200px;
    position: relative;
    z-index: 1;
    /* 微妙的径向渐变营造焦点感 */
    background: radial-gradient(
        ellipse at 50% 30%,
        rgba(212, 175, 55, 0.03) 0%,
        transparent 70%
    );
}

.contact-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ==================== 页面标题 ==================== */
.page-title {
    color: var(--color-gold);
    font-family: var(--font-brush);
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    margin-bottom: 50px;
    letter-spacing: 8px;
    text-shadow:
        0 0 12px rgba(212, 175, 55, 0.4),
        2px 2px 8px rgba(0, 0, 0, 0.6);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.page-title::before,
.page-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg,
            transparent,
            var(--color-gold),
            transparent);
}

.page-title::before {
    right: calc(100% + 20px);
}

.page-title::after {
    left: calc(100% + 20px);
}

/* ==================== 左右分栏布局 ==================== */
.contact-wrapper {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.left-section,
.right-section {
    flex: 1;
    min-width: 400px;
}

/* ==================== 表单卡片 ==================== */
.form-card,
.info-card {
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
    border: 3px solid var(--color-gold);
    background: linear-gradient(145deg,
            rgba(53, 46, 38, 0.85) 0%,
            rgba(42, 36, 32, 0.85) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(.22, 1, .36, 1),
                transform 0.8s cubic-bezier(.22, 1, .36, 1);
}

.form-card.in-view,
.info-card.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* 第二个信息卡片延迟入场 */
.info-card:nth-of-type(2) {
    transition-delay: 0.15s;
}

.form-title {
    color: var(--color-gold);
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
    font-weight: bold;
    letter-spacing: 4px;
    border-bottom: 2px solid var(--color-gold);
    padding-bottom: 15px;
    font-family: var(--font-kai);
}

/* ==================== 表单字段 ==================== */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-gold);
    font-size: 17px;
    margin-bottom: 10px;
    font-weight: 600;
}

.field-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

.form-input,
.form-textarea,
.form-file {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(201, 169, 98, 0.5);
    border-radius: 10px;
    font-size: 16px;
    background: var(--bg-deep);
    color: var(--text-body);
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.7;
}

.form-file {
    padding: 10px;
    cursor: pointer;
}

/* 文件上传预览区 */
.file-upload-wrapper {
    position: relative;
}

.file-preview {
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px dashed var(--border-gold);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
}

.file-preview img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

/* 错误状态 */
.field-error {
    border-color: #e53935 !important;
    box-shadow: 0 0 8px rgba(229, 57, 53, 0.4) !important;
}

.form-error {
    display: block;
    color: #e53935;
    font-size: 14px;
    margin-top: 6px;
}

/* 字数统计 */
.char-counter {
    text-align: right;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
    transition: color 0.2s;
}

.char-counter.over-limit {
    color: #e53935;
}

/* ==================== 提交按钮 ==================== */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--color-gold) 0%, #B8941F 100%);
    color: var(--bg-deep);
    border: none;
    border-radius: 10px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 4px;
    font-family: var(--font-body);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

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

.submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none !important;
}

/* ==================== 右侧信息区 ==================== */
.right-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 信息卡片独有样式覆盖（基础样式已与 .form-card 合并） */
.info-card {
    padding: 35px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    background: linear-gradient(145deg,
            rgba(45, 32, 21, 0.85) 0%,
            rgba(31, 24, 16, 0.85) 100%);
}

.info-title {
    color: var(--color-gold);
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: bold;
    letter-spacing: 3px;
    border-bottom: 2px solid var(--color-gold);
    padding-bottom: 10px;
    font-family: var(--font-kai);
}

.info-text {
    color: var(--text-body);
    font-size: 17px;
    line-height: 2;
}

.info-item {
    margin-bottom: 15px;
    padding-left: 14px;
    border-left: 3px solid var(--color-gold);
    transition: padding-left 0.25s ease, color 0.25s ease;
}

.info-item:hover {
    padding-left: 20px;
    color: var(--color-gold);
}

.info-item:last-child {
    margin-bottom: 0;
}

/* ==================== 竖排错落装饰文字 ==================== */
/* .contact-page 已在上方声明 position:relative，此处无需重复 */

.vertical-decor {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 1.2em;
    z-index: 10;
    pointer-events: none;
    user-select: none;
}

.vertical-decor .v-col {
    writing-mode: vertical-rl;
    font-family: var(--font-brush);
    font-size: clamp(18px, 2.2vw, 28px);
    color: var(--color-gold);
    letter-spacing: 0.35em;
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
    opacity: 0.85;
    line-height: 1.6;
}

/* 错落排列：奇数列上偏，偶数列下偏 */
.vertical-decor .v-col:nth-child(odd) {
    transform: translateY(-20px);
}

.vertical-decor .v-col:nth-child(even) {
    transform: translateY(20px);
}

/* 第三句之后加大错落幅度 */
.vertical-decor .v-col:nth-child(3n) {
    transform: translateY(36px);
}

/* 响应式：窄屏隐藏或缩小 */
@media (max-width: 1200px) {
    .vertical-decor {
        right: 12px;
        gap: 0.8em;
    }

    .vertical-decor .v-col {
        font-size: clamp(15px, 1.8vw, 22px);
    }
}

@media (max-width: 900px) {
    .vertical-decor {
        display: none;
    }
}

/* ==================== 消息提示 ==================== */
.messages {
    max-width: 1400px;
    margin: 0 auto 30px auto;
}

.message {
    padding: 15px 25px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

.message.success {
    background: rgba(76, 175, 80, 0.9);
    color: #fff;
    border: 2px solid #4caf50;
}

.message.error {
    background: rgba(229, 57, 53, 0.9);
    color: #fff;
    border: 2px solid #e53935;
}

/* ==================== 响应式 ==================== */
@media (max-width: 900px) {
    .contact-wrapper {
        flex-direction: column;
    }

    .left-section,
    .right-section {
        min-width: 100%;
    }

    .form-card,
    .info-card {
        padding: 25px;
    }

    .page-title::before,
    .page-title::after {
        width: 30px;
    }

    .page-title::before {
        right: calc(100% + 10px);
    }

    .page-title::after {
        left: calc(100% + 10px);
    }
}

@media (max-width: 640px) {
    .contact-page {
        padding: 50px 16px 150px;
    }

    .form-card,
    .info-card {
        padding: 20px;
        border-width: 2px;
    }

    .form-label {
        font-size: 15px;
    }

    .form-input,
    .form-textarea {
        font-size: 15px;
        padding: 12px 14px;
    }

    .submit-btn {
        font-size: 18px;
        padding: 14px;
    }
}
