:root {
    --primary-color: #2c3e50;  /* 深邃的蓝色 */
    --secondary-color: #3498db; /* 明亮的蓝色 */
    --accent-color: #f1c40f;   /* 金色 */
    --bg-light: #ecf0f1;
    --text-light: #ffffff;
    --text-dark: #2c3e50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    margin: 0;
    background: linear-gradient(135deg, #f6f8fa 0%, #e9ecef 100%);
}

/* 头部样式 */
header {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    padding: 1rem 0;
    text-align: center;
    font-size: 2.2em;
    font-weight: bold;
}

/* 导航菜单样式 */
.nav-menu {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 4rem;
    padding: 1rem 0;
    margin: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(44,62,80,0.95);
    backdrop-filter: blur(10px);
}

.nav-item a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1em;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-item a:hover {
    background: var(--accent-color);
    color: var(--text-dark);
    transform: translateY(-2px);
}

/* 英雄区域样式 
.hero {
    background: linear-gradient(rgba(44,62,80,0.9), rgba(52,152,219,0.9)),
                url('comp2025.png');
    background-size: cover;
    background-position: center;
    color: var(--text-light);
    text-align: center;
    padding: 120px 20px;
    position: relative;
}
    */

.hero h2 {
    font-size: 3.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-weight: bold;
    opacity: 0;  /* 初始隐藏 */
}

/* 添加文字显示动画类 */
.hero h2.animate-text {
    opacity: 1;
}

.hero h2 span {
    display: inline-block;
    opacity: 0;
    animation: fadeInChar 0.3s ease forwards;  /* 增加动画时长 */
}

/* 确保空格有正确的宽度 */
.hero h2 span.space {
    width: 0.5em;  /* 设置空格宽度 */
}

@keyframes fadeInChar {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hero h2 span.break-point {
    display: block;
    height: 0.5em;  /* 设置行间距 */
}

.hero p {
    font-size: 1.5em;
    margin-bottom: 40px;
    color: rgba(255,255,255,0.9);
}

/* 打字动画 */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

/* 光标闪烁动画 */
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--accent-color) }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2em;
        line-height: 1.3;
        padding: 0 1rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* 移动端的文字分组 */
    .hero h2 .text-group {
        display: block;
        width: 100%;
    }

    /* 移动端强制换行，但保持横排显示 */
    .hero h2 span.break-point {
        display: block;
        height: 0.5em;  /* 设置行间距 */
    }

    /* 移动端淡入动画 */
    @keyframes fade-in {
        from { 
            opacity: 0;
            transform: translateY(-20px);
        }
        to { 
            opacity: 1;
            transform: translateY(0);
        }
    }

    .hero h2 .text-group span {
        opacity: 0;
        animation: fadeInChar 0.3s ease forwards;
    }
}

/* 内容区块样式 */
.content-section {
    padding: 2rem 0.5rem;
    position: relative;
    background: linear-gradient(to bottom, #fff, #f8f9fa);
}

.content-section h2 {
    font-size: 2.2em;
    color: var(--primary-color);
    margin-bottom: 2rem;
    position: relative;

}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

.card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    margin: 1.5rem auto;  /* 使用auto实现水平居中 */
    max-width: 1200px;     /* 限制最大宽度 */
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.rules-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    margin: 1.5rem auto;  /* 使用auto实现水平居中 */
    max-width: 800px;     /* 限制最大宽度 */
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow-x: auto;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover::after {
    transform: scaleX(1);
}


/* 按钮样式 */
.cta-button {
    display: inline-block;
    background: var(--accent-color);
    color: var(--text-dark);
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(241,196,15,0.3);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0;  /* 初始隐藏 */
    transform: translateY(20px);  /* 初始位置略低 */
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(241,196,15,0.4);
    background: transparent;
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.cta-button.show {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
    animation: buttonBounce 2s ease-in-out infinite;  /* 添加持续抖动动画 */
}

@keyframes buttonBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 表单容器样式 */
.form-container {
    width: 100%;
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* 表单组样式 */
.form-group {
    position: relative;
    /*margin-bottom: 0.5rem;*/
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
    text-align: left;
}

/* 必填标记样式 */
.required {
    color: #e74c3c;
    margin-left: 4px;
}

/* 输入框样式 */
.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52,152,219,0.2);
}

/* 错误状态 */


/* 错误消息样式 */
.error-message {
    display: none;
    position: absolute;
    right: 0;
    top: 0;
    color: #e74c3c;
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    white-space: nowrap;
}

/* 显示错误信息的条件 */
.form-group.error .error-message {
    display: block;
}

.form-group.error input {
    border-color: #e74c3c;
}

/* 输入框占位符样式 */
.form-group input::placeholder {
    color: #999;
    font-size: 0.9em;
}

/* 单选框组样式 */
.radio-group {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* 复选框样式 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* 提交按钮样式 */
.submit-button {
    width: 100%;
    padding: 1rem;
    background: var(--accent-color);
    color: var(--text-dark);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(241,196,15,0.3);
}

/* 链接样式 */
.link-primary {
    color: #007EFF;
    text-decoration: none;
}

.link-primary:hover {
    text-decoration: underline;
}

/* 响应式调整 */
@media (max-width: 768px) {
    /* 头部和导航样式 */
    header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: var(--primary-color);
    }

    header h1 {
        font-size: 1.5em;   /*减小标题大小 */
        padding: 0.5rem 0;
    }

    .nav-menu {
        gap: 0;
        justify-content: space-between;
        padding: 0.5rem;
        width: 100%;
        overflow-x: visible;
    }

    .nav-item {
        flex: 1;
        text-align: center;
        min-width: auto;  /* 移除最小宽度限制 */
    }

    .nav-item a {
        font-size: 0.85em;
        padding: 0.3rem;
        white-space: nowrap;
        display: block;
    }

    /* Hero区域调整 */
    .hero {
        min-height: 100vh;  /* 确保至少占满一屏 */
        padding: 4rem 1rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin-top: -44px;  /* 补偿header的高度 */
        position: relative;  /* 用于定位按钮 */
    }

    .hero h2 {
        font-size: 2em;  /* 移动端减小字号 */
        line-height: 1.3;  /* 调整行高 */
        padding: 0 1rem;  /* 添加两侧内边距 */
    }

    .hero p {
        font-size: 1.1em;
        margin-bottom: 2rem;
    }

    /* 首屏按钮样式 */
    .hero .cta-button {
        position: relative;  /* 在hero区域内相对定位 */
        display: inline-block;
        width: auto;
        min-width: 160px;
        margin-top: 2rem;
        padding: 0.8rem 2rem;
        font-size: 1.1em;
        background: var(--accent-color);
        color: var(--text-dark);
        text-align: center;
        border-radius: 50px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        opacity: 1;
    }

    /* 浮动按钮 */
    .cta-button.floating {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        bottom: 20px;
    }

    .cta-button.floating.visible {
        opacity: 1;
        visibility: visible;
    }

    /* 当显示回到顶部按钮时，调整浮动按钮位置 */
    .cta-button.floating.with-back-to-top {
        bottom: 70px;
    }

    /* 回到顶部按钮在移动端的位置调整 */
    .back-to-top {
        right: 10px;  /* 调整位置，确保在视口内 */
        bottom: 10px;
        width: 35px;  /* 稍微减小尺寸 */
        height: 35px;
    }

    /* 内容区域样式调整 */
    .content-section {
        padding-top: 5rem;  /* 增加顶部内边距，防止标题被导航栏遮挡 */
    }

    .content-section h2 {
        font-size: 1.8em;
        margin-bottom: 1.5rem;
    }

    /* 卡片样式调整 */
    .card {
        padding: 1.5rem;
        margin: 1rem;
    }

    .form-container {
        padding: 1rem;
        margin: 1rem auto;
    }

    /* 表单组件间距调整 */
    .form-group {
        margin-bottom: 0.5rem;
    }

    .radio-group {
        gap: 1.5rem;
    }
}

/* PC端浮动按钮样式 */
@media (min-width: 769px) {
    .cta-button.floating {
        display: block;
        right: 20px;
        left: auto;
        transform: none;
    }

    .cta-button.floating.with-back-to-top {
        bottom: 70px;
    }
}

/* 优化section间距 */
.content-section + .content-section {
    margin-top: 1rem;  /* 减小相邻section间的间距 */
}

/* 添加回到顶部按钮样式 */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.back-to-top::before {
    content: '';
    width: 12px;
    height: 12px;
    border-top: 3px solid var(--text-dark);
    border-left: 3px solid var(--text-dark);
    transform: rotate(45deg) translate(2px, 2px);
}

/* 添加装饰元素 */
.content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.1), transparent);
}

/* 添加背景图案 */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" fill="rgba(255,255,255,0.05)"/></svg>');
    opacity: 0.1;
}

/* 移除浏览器默认的表单验证样式 */
input:invalid {
    box-shadow: none;
}

input:-moz-ui-invalid {
    box-shadow: none;
}

/* 确保浮动按钮只在移动端显示 */
.cta-button.floating {
    display: none;  /* 默认隐藏 */
}

@media (max-width: 768px) {
    .cta-button.floating {
        display: block;  /* 移动端显示 */
    }
}

/* 浮动按钮基础样式 */
.cta-button.floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 0.8rem 2rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cta-button.floating.visible {
    opacity: 1;
    visibility: visible;
}

.cta-button.floating.with-back-to-top {
    bottom: 70px;
}

/* 移动端标题样式 */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 3em;
        line-height: 1.3;
        padding: 0 1rem;
    }

    /* 在移动端给空格添加换行效果 */
    .hero h2 {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero h2::after {
        display: none;  /* 移除之前的换行效果 */
    }

    .content-section {
        padding-top: 2rem;  /* 增加顶部内边距 */
    }

    .section-title {
        scroll-margin-top: 120px;  /* 增加滚动边距 */
    }

    /* 移动端浮动按钮位置 */
    .cta-button.floating {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* PC端浮动按钮显示 */
@media (min-width: 769px) {
    .cta-button.floating {
        display: block;
        right: 20px;
        left: auto;
        transform: none;
    }
}

/* Hero区域按钮样式 */
.hero .cta-button {
    position: relative;
    z-index: 2;  /* 确保按钮在其他元素之上 */
}

/* 保持大赛简介部分的原有样式 */
.prize-table {
    width: 100%;
}

.prize-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.prize-list p {
    margin: 0.8rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.excellence-criteria {
    list-style: none;
    padding: 0;
}

.excellence-criteria li {
    margin: 0.8rem 0;
    padding-left: 1.5rem;
    position: relative;
}

/* 响应式调整 */
@media (max-width: 768px) {

    .prize-row {
        flex-direction: column;
        gap: 0.5rem;
    }

}

/* 修改标题样式 */
.section-title {
    text-align: center;
    font-size: 2.2em;
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    position: relative;
    display: block;  /* 改为块级元素确保居中 */
    scroll-margin-top: 100px;  /* 增加滚动边距 */
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

/* 图标样式 */
.card i {
    font-size: 2em;
    color: var(--accent-color);
    margin-bottom: 1rem;
    display: block;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.8em;
        margin-bottom: 2rem;
    }

    .card {
        padding: 1.5rem;
        margin: 1rem;
    }
}

/* 表格样式 */
.rule-table {
 
    overflow-x: auto;
    position: relative;
    background-color: #fff;
    margin: 0px auto;
    padding: 0px;
    max-width: 900px;
   
}

.rule-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    min-width: 800px; /* 确保表格在小屏幕上可以横向滚动 */
}

.rule-table th,
.rule-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.rule-table th {
    background: rgba(0,0,0,0.05);
    font-weight: bold;
    color: var(--primary-color);
    white-space: nowrap; /* 防止表头换行 */
}

/* 规则表格样式优化 */
.group-table {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.group-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr 1.5fr;
    padding: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    align-items: center;
}

/* 指标计算样式 */
.indicator-list {
    margin: 1rem 0;
}

.indicator-item {
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255,255,255,0.5);
    border-radius: 8px;
}

.indicator-item h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.1em;
}

.calculation-details {
    list-style: none;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

.calculation-details li {
    margin: 0.5rem 0;
    position: relative;
}

.calculation-details li::before {
    content: '•';
    position: absolute;
    left: -1rem;
    color: var(--accent-color);
}

/* 评级表格样式 */
.rating-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.rating-table th,
.rating-table td {
    padding: 1rem;
    text-align: left;
    border: 1px solid rgba(0,0,0,0.1);
}

.rating-table .header {
    background: var(--primary-color);
    color: var(--text-light);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .group-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .rating-table {
        font-size: 0.9em;
    }

    .rating-table th,
    .rating-table td {
        padding: 0.8rem;
    }
}

/* 联系信息样式 */
.contact-info {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
}

.contact-info p {
    font-size: 1.1em;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .prize-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .contact-info {
        margin-top: 1rem;
    }
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 20px auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-content h3 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
}

.modal-content h4 {
    color: var(--secondary-color);
    margin: 1.5rem 0 1rem;
}

.modal-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    text-indent: 2em;
}


.modal-body {
    max-height: 70vh;
    overflow-y: auto;
    padding: 0 1rem;
}

.modal-body ol {
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.modal-agree-btn {
    display: block;
    width: 200px;
    margin: 2rem auto 1rem;
    padding: 1rem 2rem;
    background: var(--accent-color);
    color: var(--text-dark);
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-agree-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(241,196,15,0.3);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
        padding: 15px;
    }

    .modal-body {
        padding: 0 0.5rem;
        max-height: 60vh;
    }

    .modal-agree-btn {
        width: 100%;
        margin: 1.5rem 0 0.5rem;
    }
} 