:root {
    --primary-color: #dc2626;
    --primary-dark: #a81a32;
    --light-red: #ffebee;
    --white-color: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --error-color: #dc143c;
    --border-radius: 8px;
    --transition-speed: 0.3s;
    --font-family: 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 125%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ===== Hero ===== */
.hero {
    background: var(--primary-color);
    color: var(--white-color);
    padding: 1rem 0;
    min-height: 180px;
    position: relative;
    border-radius: 0 0 90px 90px;
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.hero-title-wrapper {
    width: 100%;
    padding-left: 10%;
}

.hero-title-wrapper h1,
.hero-title-wrapper h2 {
    font-size: 1.5rem;
    margin: 0;
    text-align: left;
    font-weight: bold;
    letter-spacing: 0.2rem;
}

.hero-title-wrapper h2 {
    margin-left: 4rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin: 1.5rem 2.5rem 0 0;
    text-align: center;
    font-weight: 200;
}

.hero-img {
    width: auto;
    object-fit: contain;
}

.hero-img-1 {
    position: absolute;
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
    z-index: 1;
    max-height: 200px;
    opacity: 0.3;
}

.hero-img-2 {
    max-height: 230px;
    position: absolute;
    right: 3%;
    top: 1%;
    z-index: 10;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--white-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: var(--light-red);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.required {
    color: var(--error-color);
}

/* ===== 通用区块 ===== */
.section {
    padding: 0.5rem 0 1rem;
}

.section-title {
    text-align: left;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5em;
    left: 0;
    width: 2em;
    height: 5px;
    background-color: var(--primary-color);
    border-radius: 2.5px;
}

/* ===== Grid ===== */
.grid-fixed-3,
.grid-fixed-4 {
    display: grid;
    gap: 1.5rem;
}

.grid-fixed-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-fixed-4 {
    grid-template-columns: repeat(4, 1fr);
    column-gap: 3rem;
    padding: 1rem 3rem 0;
}

/* ===== 卡片 ===== */
.card {
    background-color: var(--primary-color);
    border-radius: var(--border-radius);
    padding: 2rem 0.4rem;
    text-align: center;
    color: var(--white-color);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.4);
    background-color: var(--primary-dark);
}

.card-title {
    font-size: 0.8rem;
    color: var(--white-color);
}

.card-featured {
    min-height: 50px;
    display: flex;
    flex-direction: column;
    padding: 0.7rem 0.4rem 0.5rem;
    background-color: var(--primary-color);
    border-radius: 16px;
}

.card-icon {
    width: 50px;
    margin: 0 auto;
    object-fit: contain;
}

.card-desc {
    font-size: 0.4rem;
    opacity: 0.9;
    margin-top: 0.3rem;
    line-height: 1.4;
}

.card-light {
    background-color: var(--light-red);
    color: var(--primary-color);
    border: 2px solid rgba(255, 150, 170, 0.8);
    border-radius: 12px;
}

.card-light .card-title {
    color: var(--primary-color);
}

.card-light:hover {
    background-color: var(--white-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card-with-icon {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.5rem 0 1rem;
}

.card-icon2 {
    height: 60px;
    margin: 0 auto;
    object-fit: contain;
}

/* ===== 互动专区 ===== */
.interaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 800;
    background-color: var(--light-red);
    border-radius: 20px;
    padding: 1rem 2rem;
    width: 100%;
    height: 3rem;
    transition: background-color var(--transition-speed);
    border: 2px solid rgba(255, 150, 170, 0.8);
}

.interaction-item:hover {
    background-color: var(--white-color);
}

.interaction-item:hover .interaction-arrow {
    transform: translateX(5px);
    transition: transform var(--transition-speed);
}

/* ===== 页面头部 ===== */
.page-header {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 1rem 0;
}

.page-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-btn {
    color: var(--white-color);
    text-decoration: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-btn::before {
    content: '←';
}

.page-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
}

/* ===== 信息卡片 ===== */
.info-card {
    background-color: #D1D5DB;
    border: 30px solid #E5E7EB;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.info-card p {
    margin: 0 0 1rem;
    color: var(--text-color);
    line-height: 1.8;
    text-indent: 2em;
}

.info-card p:last-child {
    margin-bottom: 0;
}

/* ===== 故事卡片 ===== */
.story-card {
    background-color: #ffcccc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.story-card p {
    margin: 0 0 1rem;
    color: var(--text-color);
    line-height: 1.8;
    text-indent: 2em;
}

.story-card p:last-child {
    margin-bottom: 0;
}

.story-image {
    margin: 1rem 0;
    text-align: center;
}

.story-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.story-image3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.story-image3 img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.image-caption {
    margin: 0.5rem 0 0 !important;
    text-indent: 0 !important;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

/* ===== 图片展示 ===== */
.image-featured {
    margin-top: 1rem;
    overflow: hidden;
}

.featured-grid-img {
    width: 100%;
    height: auto;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.grid-img {
    width: 100%;
    height: auto;
}

/* ===== 精神谱系卡片 ===== */
.spirit-card {
    background-color: #fff0f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.spirit-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1rem;
}

.spirit-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0.4rem;
    height: 0.8rem;
    background-color: var(--primary-color);
}

.spirit-card p {
    margin: 0;
    color: var(--text-color);
    line-height: 1.8;
    text-indent: 2em;
}

/* ===== 时间线 ===== */
.timeline {
    margin-top: 1rem;
    position: relative;
    padding-left: 26px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--primary-color);
}

.timeline-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-color: var(--primary-color);
    border-radius: 50%;
    z-index: 2;
}

.timeline-content {
    flex: 1;
    background-color: #fff0f0;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1rem;
}

.timeline-content h3 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.timeline-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 0.8rem;
}

/* ===== 留言墙 ===== */
.guestbook-layout {
    display: flex;
    align-items: stretch;
}

.guestbook-left {
    flex: 0 0 25%; 
    display: flex;
    flex-direction: column;
    justify-content: center;   
    align-items: center;       
    text-align: center;
}

.guestbook-right {
    flex: 1;                   
}

.scroll-img {
    width: 100%;               
    max-width: 240px;          
    object-fit: contain;
    display: block;
}

.guestbook-welcome {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
    margin: 0;
    text-align: center;
}

.guestbook-right {
    flex: 1;
}

.guestbook-card {
    background-color: #fff0f0;
    border: 2px solid #e8b0b0;
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
}

.guestbook-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.tab-btn {
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-bottom: 2px solid transparent;
    transition: color var(--transition-speed), border-color var(--transition-speed);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: bold;
}

.view-more-btn {
    background: none;
    border: none;
    font-size: 0.9rem;
    color: var(--primary-color);
    cursor: pointer;
}

.message-list {
    margin-bottom: 1.5rem;
}

.message-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ffcccc;
}

.message-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.message-name {
    font-weight: bold;
    color: var(--primary-color);
}

.message-time {
    font-size: 0.85rem;
    color: var(--text-light);
}

.message-content {
    margin: 0;
    color: var(--text-color);
    line-height: 1.6;
    font-size: 0.95rem;
}

.leave-message-btn {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background-color: var(--white-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.leave-message-btn:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

/* ===== 表单 ===== */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--white-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: var(--font-family);
    transition: border-color var(--transition-speed);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-dark);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.error-message {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

.error-message.show {
    display: block;
}

.form-group.error input,
.form-group.error textarea {
    border-color: var(--error-color);
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: none;
    text-align: center;
}

.success-message.show {
    display: block;
}

/* ===== 页脚 ===== */
footer {
    background-color: var(--primary-color);
    color: var(--white-color);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

footer p {
    margin-bottom: 0.5rem;
}

/* ===== 响应式 ===== */
@media screen and (max-width: 680px) {
    .grid-fixed-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 360px) {
    .hero-subtitle {
        font-size: 1rem;
    }
    .grid-fixed-3,
    .grid-fixed-4 {
        grid-template-columns: 1fr;
    }
    .contact-form {
        padding: 1.5rem;
    }
}