/* 基础变量 */
:root {
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --accent-color: #ffd700;
}

/* 烟花容器 */
.firework-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    background-color: transparent;
    overflow: hidden;
}

/* 烟花弹（上升阶段） */
.firework-shell {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 0 10px #fff, 0 0 20px #fff;
    animation: rocket-rise 2s cubic-bezier(0.17, 0.89, 0.32, 1.28) forwards;
}

/* 上升动画 */
@keyframes rocket-rise {
    0% {
        opacity: 1;
        transform: translateY(100vh) scale(1);
    }
    100% {
        opacity: 1;
        transform: translateY(var(--target-y)) scale(1);
    }
}

/* 烟花粒子（爆炸阶段） */
.firework-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--particle-color);
    box-shadow: 0 0 12px var(--particle-color), 0 0 24px var(--particle-color), 0 0 36px var(--particle-color);
    animation: particle-explode 2s ease-out forwards;
}

/* 爆炸动画 */
@keyframes particle-explode {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    30% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(var(--end-x), var(--end-y)) scale(0.2);
    }
}

/* 祝福语样式 */
#greeting {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5em;
    font-weight: 900;
    color: var(--accent-color);
    text-shadow: 
        0 0 10px var(--accent-color),
        0 0 20px var(--accent-color),
        0 0 40px var(--accent-color),
        0 0 80px var(--accent-color);
    z-index: 10000;
    animation: glow 2s ease-in-out infinite alternate, float 3s ease-in-out infinite;
    opacity: 0;
    transition: opacity 1s ease-in-out, top 5s ease-in-out;
    letter-spacing: 0.1em;
}

@keyframes glow {
    from {
        text-shadow: 
            0 0 10px var(--accent-color),
            0 0 20px var(--accent-color),
            0 0 40px var(--accent-color);
    }
    to {
        text-shadow: 
            0 0 20px var(--accent-color),
            0 0 40px var(--accent-color),
            0 0 60px var(--accent-color),
            0 0 80px var(--accent-color),
            0 0 100px var(--accent-color);
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(-50%, -50%);
    }
    50% {
        transform: translate(-50%, -52%);
    }
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* 动态渐变背景 */
body {
    background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e, #0f0c29);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    position: relative;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 添加粒子背景 */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particleFloat 15s infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* 主内容容器 */
.main-content {
    max-width: 900px;
    margin: 60px auto;
    padding: 60px;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* 微信图片样式 */
.wechat-container {
    position: absolute;
    top: 40px;
    right: 40px;
    text-align: center;
    z-index: 10;
}

.wechat-img {
    width: 120px;
    height: auto;
    border-radius: 16px;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.wechat-img:hover {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.wechat-caption {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 排版样式 */
h1,
h2,
h3 {
    text-align: left;
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.5em;
    margin-top: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 1.75em;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h3 {
    font-size: 1.35em;
    color: var(--text-primary);
}

p {
    margin-top: 0;
    text-align: left;
    color: var(--text-secondary);
    font-size: 1.05em;
}

/* 列表样式 */
.rule-list {
    list-style: none;
    padding: 0;
    margin-top: 2em;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.rule-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* 不同规则项的颜色主题 */
.rule-item:nth-child(1) {
    border-color: rgba(102, 126, 234, 0.3);
}
.rule-item:nth-child(1):hover {
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.rule-item:nth-child(2) {
    border-color: rgba(79, 172, 254, 0.3);
}
.rule-item:nth-child(2):hover {
    border-color: rgba(79, 172, 254, 0.5);
    box-shadow: 0 8px 24px rgba(79, 172, 254, 0.3);
}

.rule-item:nth-child(3) {
    border-color: rgba(0, 230, 118, 0.3);
}
.rule-item:nth-child(3):hover {
    border-color: rgba(0, 230, 118, 0.5);
    box-shadow: 0 8px 24px rgba(0, 230, 118, 0.3);
}

.rule-item:nth-child(4) {
    border-color: rgba(255, 167, 38, 0.3);
}
.rule-item:nth-child(4):hover {
    border-color: rgba(255, 167, 38, 0.5);
    box-shadow: 0 8px 24px rgba(255, 167, 38, 0.3);
}

.rule-item:nth-child(5) {
    border-color: rgba(236, 64, 122, 0.3);
}
.rule-item:nth-child(5):hover {
    border-color: rgba(236, 64, 122, 0.5);
    box-shadow: 0 8px 24px rgba(236, 64, 122, 0.3);
}

.rule-icon {
    min-width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 20px;
    color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rule-item:hover .rule-icon {
    transform: rotate(10deg) scale(1.1);
}

/* 不同规则项的图标颜色 */
.rule-item:nth-child(1) .rule-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}
.rule-item:nth-child(1):hover .rule-icon {
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
}

.rule-item:nth-child(2) .rule-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}
.rule-item:nth-child(2):hover .rule-icon {
    box-shadow: 0 6px 16px rgba(79, 172, 254, 0.6);
}

.rule-item:nth-child(3) .rule-icon {
    background: linear-gradient(135deg, #00e676 0%, #69f0ae 100%);
    box-shadow: 0 4px 12px rgba(0, 230, 118, 0.4);
}
.rule-item:nth-child(3):hover .rule-icon {
    box-shadow: 0 6px 16px rgba(0, 230, 118, 0.6);
}

.rule-item:nth-child(4) .rule-icon {
    background: linear-gradient(135deg, #ffa726 0%, #ffca28 100%);
    box-shadow: 0 4px 12px rgba(255, 167, 38, 0.4);
}
.rule-item:nth-child(4):hover .rule-icon {
    box-shadow: 0 6px 16px rgba(255, 167, 38, 0.6);
}

.rule-item:nth-child(5) .rule-icon {
    background: linear-gradient(135deg, #ec407a 0%, #f48fb1 100%);
    box-shadow: 0 4px 12px rgba(236, 64, 122, 0.4);
}
.rule-item:nth-child(5):hover .rule-icon {
    box-shadow: 0 6px 16px rgba(236, 64, 122, 0.6);
}

.rule-content {
    flex: 1;
}

.rule-title {
    font-size: 1.15em;
    color: var(--text-primary);
    margin-bottom: 0.5em;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.rule-item p {
    color: var(--text-secondary);
    font-size: 0.95em;
    line-height: 1.7;
}

/* 页脚样式 */
.footer {
    margin-top: 3em;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9em;
    padding-top: 2em;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 标题特殊样式 */
#用户公约 {
    text-align: center;
    margin-bottom: 1.5em;
}

/* 响应式调整 */
@media only screen and (max-width: 768px) {
    .main-content {
        margin: 30px auto;
        padding: 30px 24px;
        font-size: 0.9rem;
    }

    .wechat-container {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 30px;
        text-align: center;
    }

    .wechat-img {
        width: 80px;
    }

    .rule-item {
        padding: 16px;
        margin-bottom: 12px;
    }

    .rule-icon {
        min-width: 40px;
        height: 40px;
        font-size: 16px;
        margin-right: 16px;
    }

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.5em;
        margin-top: 24px;
    }

    #greeting {
        font-size: 3em;
    }
}

/* 添加滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
/* 弹出框样式 */
.popup-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
}

.popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.popup-content {
    background: rgba(36, 36, 62, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    color: var(--text-primary);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #667eea;
}

.resource-links {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.resource-links li {
    margin-bottom: 12px;
}

.resource-links a {
    color: #667eea;
    text-decoration: none;
    font-size: 1.1em;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
}

.resource-links a:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: #764ba2;
    transform: translateX(5px);
}

.resource-links a::before {
    content: "\f08e"; /* Font Awesome link icon */
    font-family: FontAwesome;
    margin-right: 8px;
}
