* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    background-image: url('../img/background.png');
    background-size: 100% auto;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

/* 针对1:1比例的背景图进行优化 */
@media (max-aspect-ratio: 1/1) {
    body {
        background-size: contain;
        background-position: center center;
    }
}

@media (min-aspect-ratio: 1/1) {
    body {
        background-size: 100% auto;
        background-position: center bottom;
    }
}

/* ========== 首页样式 ========== */
.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 80px;
    width: 100%;
    max-width: 600px;
    text-align: center;
    transition: all 0.5s ease;
}

.container.fade-out {
    opacity: 0;
    transform: translateY(-50px);
}

.activity-section {
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
}

.activity-section.animate {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

.activity-title {
    color: white;
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

/* ========== 详情页样式 ========== */
.detail-page {
    display: none;
    opacity: 0;
    transform: translateY(50px);
    width: 100%;
    max-width: 800px;
    text-align: center;
    transition: all 0.5s ease;
}

.detail-page.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.detail-container {
    width: 100%;
    padding: 20px;
}

.detail-title {
    color: white;
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

/* 信息卡片样式 */
.info-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
}

/* 卡片箭头 */
.info-card::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid rgba(255, 255, 255, 0.95);
}

.info-card-header {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

.info-card-header h2 {
    color: #333;
    font-size: 24px;
    font-weight: bold;
}

.info-card-content {
    padding: 30px;
    text-align: left;
    color: #666;
    line-height: 1.6;
    height: 400px;
    overflow-y: auto;
    position: relative;
}

/* 自定义滚动条样式 */
.info-card-content::-webkit-scrollbar {
    width: 8px;
}

.info-card-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.info-card-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff9500, #ff7b00);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.info-card-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff7b00, #e66a00);
}

/* Firefox滚动条样式 */
.info-card-content {
    scrollbar-width: thin;
    scrollbar-color: #ff9500 #f1f1f1;
}

/* 调整detail-text样式，去掉原来针对第一个p标签的样式 */
.detail-text {
    padding-top: 0; /* 移除顶部padding */
}

.detail-text h3 {
    color: #333;
    font-size: 18px;
    margin: 20px 0 10px 0;
    font-weight: bold;
    position: sticky;
    top: 0; /* 调整sticky位置，因为没有了第一个p标签 */
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 0;
    border-left: 4px solid #ff9500;
    padding-left: 12px;
    margin-left: -12px;
    z-index: 2;
}

/* 第一个h3标题的特殊处理 */
.detail-text h3:first-child {
    margin-top: 0; /* 第一个标题顶部不需要margin */
}

.detail-text p {
    margin-bottom: 15px;
}

.detail-text ul {
    margin: 10px 0 20px 20px;
}

.detail-text li {
    margin-bottom: 8px;
}

/* 下载链接样式 */
.download-link {
    margin-bottom: 30px;
}

.download-link-btn {
    color: white;
    font-size: 18px;
    text-decoration: underline;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.download-link-btn:hover {
    color: #ffeb3b;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

/* 按钮组样式 - 水平并排排列 */
.button-group {
    display: flex;
    flex-direction: row;
    gap: 30px;
    align-items: center;
    justify-content: center;
}

/* ========== 按钮样式 ========== */
.apply-button {
    display: inline-block;
    position: relative;
    text-decoration: none;
    font-size: 28px;
    font-weight: bold;
    padding: 18px 65px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);

    /* 主要渐变背景 */
    background: linear-gradient(145deg, #ffb84d 0%, #ff9500 20%, #ff7b00 80%, #e66a00 100%);

    /* 立体阴影效果 */
    box-shadow:
            0 8px 16px rgba(0, 0, 0, 0.3),
            inset 0 2px 4px rgba(255, 255, 255, 0.3),
            inset 0 -2px 4px rgba(0, 0, 0, 0.1),
            0 0 20px rgba(255, 149, 0, 0.4);

    border: 2px solid transparent;
    background-clip: padding-box;
}

.apply-button::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
    border-radius: 50px;
    pointer-events: none;
}

.apply-button span {
    position: relative;
    z-index: 2;
    color: white;
    display: block;
}

.apply-button:hover {
    transform: translateY(-3px);
    background: linear-gradient(145deg, #ffc266 0%, #ffab1a 20%, #ff8c00 80%, #d45d00 100%);
    box-shadow:
            0 12px 24px rgba(0, 0, 0, 0.4),
            inset 0 2px 6px rgba(255, 255, 255, 0.4),
            inset 0 -2px 6px rgba(0, 0, 0, 0.15),
            0 0 30px rgba(255, 149, 0, 0.6);
}

.apply-button:active {
    transform: translateY(0px);
    background: linear-gradient(145deg, #ff9500 0%, #ff7b00 20%, #e66a00 80%, #cc5500 100%);
    box-shadow:
            0 4px 8px rgba(0, 0, 0, 0.4),
            inset 0 1px 3px rgba(255, 255, 255, 0.2),
            inset 0 -1px 3px rgba(0, 0, 0, 0.2),
            0 0 15px rgba(255, 149, 0, 0.3);
}

.apply-button:active::before {
    opacity: 0.6;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .container {
        gap: 60px;
        padding: 0 15px;
    }

    .activity-title, .detail-title {
        font-size: 36px;
        margin-bottom: 30px;
    }

    .apply-button {
        font-size: 24px;
        padding: 15px 55px;
    }

    .info-card-content {
        padding: 20px;
        height: 350px;
    }

    .info-card-header h2 {
        font-size: 20px;
    }

    .button-group {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        gap: 50px;
    }

    .activity-title, .detail-title {
        font-size: 28px;
        margin-bottom: 25px;
    }

    .apply-button {
        font-size: 20px;
        padding: 12px 45px;
    }

    .info-card-content {
        padding: 15px;
        height: 300px;
    }

    .info-card-content::-webkit-scrollbar {
        width: 6px;
    }

    .button-group {
        gap: 15px;
    }
}

@media (max-width: 360px) {
    /* 超小屏幕时改为垂直排列 */
    .button-group {
        flex-direction: column;
        gap: 15px;
    }

    .apply-button {
        font-size: 18px;
        padding: 10px 35px;
    }
}

@media (max-height: 600px) and (orientation: portrait) {
    body {
        justify-content: flex-start;
        padding-top: 40px;
    }

    .container {
        gap: 40px;
    }

    .info-card-content {
        height: 250px;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .container {
        gap: 30px;
        flex-direction: row;
        justify-content: space-around;
    }

    .activity-title, .detail-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .apply-button {
        font-size: 18px;
        padding: 10px 35px;
    }

    .info-card-content {
        height: 200px;
    }

    .button-group {
        flex-direction: row;
        gap: 20px;
    }
}

/* 高DPI屏幕背景图优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        background-image: url('../img/background.png');
    }
}