/* ========================================
   全局重置 & 基础样式
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --red: #DE2910;
    --red-dark: #B81C0A;
    --gold: #FFDE00;
    --gold-dark: #D4B800;
    --dark: #1a1a2e;
    --dark2: #16213e;
    --light: #f5f5f5;
    --white: #ffffff;
    --gray: #888;
    --gradient-red: linear-gradient(135deg, #DE2910, #FF6B35);
    --gradient-dark: linear-gradient(135deg, #1a1a2e, #16213e);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.25);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    background: var(--light);
    overflow-x: hidden;
    line-height: 1.8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 15px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient-red);
    margin: 15px auto 0;
    border-radius: 2px;
}

.section-desc {
    text-align: center;
    color: var(--gray);
    font-size: 1.1rem;
    margin-bottom: 60px;
}

/* ========================================
   导航栏
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(26, 26, 46, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 2px;
}

.logo .star {
    color: var(--red);
    margin-right: 5px;
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-links a {
    color: #ccc;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: block;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--gold);
    background: rgba(255, 222, 0, 0.1);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--gold);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ========================================
   首页横幅 Hero
   ======================================== */
.hero {
    height: 100vh;
    background: var(--gradient-dark);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(222, 41, 16, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 222, 0, 0.15) 0%, transparent 50%);
    animation: pulse-bg 8s ease-in-out infinite;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.02) 2px,
            rgba(255, 255, 255, 0.02) 4px
        );
}

@keyframes pulse-bg {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 20px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 40px rgba(255, 222, 0, 0.3);
    margin-bottom: 25px;
    letter-spacing: 5px;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #ddd;
    margin-bottom: 40px;
    line-height: 2;
    letter-spacing: 2px;
}

.btn-primary {
    display: inline-block;
    padding: 15px 40px;
    background: var(--gradient-red);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 5px 25px rgba(222, 41, 16, 0.4);
    letter-spacing: 2px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(222, 41, 16, 0.6);
}

/* 滚动指示器 */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    position: relative;
}

.mouse::before {
    content: '';
    width: 4px;
    height: 8px;
    background: var(--gold);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 2s ease-in-out infinite;
}

@keyframes scroll-wheel {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 22px; }
}

/* ========================================
   动画类
   ======================================== */
.animate-up {
    opacity: 0;
    transform: translateY(40px);
    animation: fadeUp 1s ease forwards;
}

.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   党的概况
   ======================================== */
.overview-section {
    background: var(--white);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.info-card {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 35px 25px;
    text-align: center;
    transition: all 0.4s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.info-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
    border-color: var(--red);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.info-card h3 {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 10px;
}

.info-card p {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 8px;
}

.info-card small {
    color: var(--gray);
    font-size: 0.85rem;
}

/* 行动指南 */
.guide-box {
    background: linear-gradient(135deg, #fff5f5, #fffbe6);
    border-left: 5px solid var(--red);
    border-radius: 12px;
    padding: 30px 40px;
}

.guide-box h3 {
    margin-bottom: 20px;
    color: var(--dark);
    font-size: 1.3rem;
}

.guide-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    padding: 8px 20px;
    background: rgba(222, 41, 16, 0.08);
    border: 1px solid rgba(222, 41, 16, 0.2);
    border-radius: 25px;
    font-size: 0.9rem;
    color: var(--red-dark);
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--red);
    color: white;
    transform: scale(1.05);
}

.tag.highlight {
    background: var(--gradient-red);
    color: white;
    border: none;
    font-weight: 700;
}

/* ========================================
   百年历程 Timeline
   ======================================== */
.history-section {
    background: var(--gradient-dark);
    color: white;
}

.history-section .section-title {
    color: var(--gold);
}

.history-section .section-desc {
    color: rgba(255, 255, 255, 0.6);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--gold), var(--red), var(--gold));
    border-radius: 3px;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 60px;
    position: relative;
}

.timeline-item.left {
    flex-direction: row;
}

.timeline-item.right {
    flex-direction: row-reverse;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--gold);
    border: 4px solid var(--dark2);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 15px rgba(255, 222, 0, 0.5);
}

.timeline-content {
    width: 45%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
}

.timeline-content:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.03);
}

.timeline-year {
    display: inline-block;
    background: var(--gradient-red);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--gold);
}

.timeline-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.8;
}

.timeline-content .red { color: var(--red); font-weight: 700; }
.timeline-content .gold { color: var(--gold); font-weight: 700; }

/* ========================================
   党章精要
   ======================================== */
.constitution-section {
    background: var(--white);
}

.constitution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.con-card {
    background: linear-gradient(135deg, #fff9f0, #fff5f5);
    border: 1px solid rgba(222, 41, 16, 0.1);
    border-radius: 16px;
    padding: 30px;
    transition: all 0.4s ease;
}

.con-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--red);
}

.con-card h3 {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 12px;
}

.con-card p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.9;
}

/* 十个坚持 */
.ten-persist {
    background: var(--gradient-dark);
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
}

.ten-persist h3 {
    color: var(--gold);
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.persist-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.persist-tags span {
    padding: 10px 24px;
    background: rgba(255, 222, 0, 0.1);
    border: 1px solid rgba(255, 222, 0, 0.3);
    color: var(--gold);
    border-radius: 30px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: default;
}

.persist-tags span:hover {
    background: var(--gold);
    color: var(--dark);
    transform: scale(1.08);
}

/* ========================================
   精神谱系
   ======================================== */
.spirit-section {
    background: linear-gradient(135deg, #fff5f5, #fffbe6);
}

.spirit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.spirit-card {
    background: var(--white);
    border-radius: 20px;
    padding: 35px 25px;
    text-align: center;
    transition: all 0.4s ease;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.06);
    border: 2px solid transparent;
}

.spirit-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--red);
    box-shadow: var(--shadow);
}

.spirit-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.spirit-card h3 {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 15px;
}

.spirit-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 2;
    white-space: pre-line;
}

/* ========================================
   入党誓词
   ======================================== */
.pledge-section {
    background: var(--gradient-dark);
    color: white;
    text-align: center;
}

.pledge-section .section-title {
    color: var(--gold);
}

.pledge-section .section-desc {
    color: rgba(255, 255, 255, 0.6);
}

.pledge-box {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 222, 0, 0.3);
    border-radius: 24px;
    padding: 50px 40px;
    backdrop-filter: blur(10px);
}

.pledge-text {
    font-size: 1.5rem;
    line-height: 2.2;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 35px;
    letter-spacing: 2px;
}

.highlight-red {
    color: var(--red);
    font-size: 1.8rem;
    font-weight: 900;
    text-shadow: 0 0 30px rgba(222, 41, 16, 0.5);
}

.btn-pledge {
    padding: 14px 40px;
    background: var(--gradient-red);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 25px rgba(222, 41, 16, 0.4);
}

.btn-pledge:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 40px rgba(222, 41, 16, 0.6);
}

/* ========================================
   页脚
   ======================================== */
.footer {
    background: var(--dark);
    color: #aaa;
    padding: 50px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-left h3 {
    color: var(--gold);
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.footer-right {
    text-align: right;
    font-size: 0.9rem;
}

.footer-right p {
    margin-bottom: 5px;
}

/* ========================================
   备案信息
   ======================================== */
.icp-info {
    background: #1a1a2e;
    color: #888;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}

.icp-info .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.icp-info p {
    margin: 0;
}

.icp-info a {
    color: #888;
    text-decoration: none;
    border-bottom: 1px dotted #666;
}

.icp-info a:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* ========================================
   回到顶部
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-red);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(222, 41, 16, 0.4);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(222, 41, 16, 0.6);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(26, 26, 46, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 5px;
    }

    .nav-links.open {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item.left,
    .timeline-item.right {
        flex-direction: row;
        padding-left: 50px;
    }

    .timeline-dot {
        left: 20px;
    }

    .timeline-content {
        width: 100%;
    }

    .footer-content {
        text-align: center;
        justify-content: center;
    }

    .footer-right {
        text-align: center;
    }

    .pledge-text {
        font-size: 1.1rem;
    }

    .highlight-red {
        font-size: 1.3rem;
    }
}
