/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

/* 基础body样式 - 没有背景图片 */
body {
    min-height: 100vh;
    color: #e0f0ff;
    overflow-x: hidden;
    position: relative;
    transition: background 0.5s ease;
}

/* 科技感背景效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 100, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(120, 0, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 40% 80%, rgba(0, 200, 255, 0.1) 0%, transparent 40%);
    pointer-events: none;
    z-index: 1;
}

/* ========== 背景切换器样式 ========== */
.bg-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.bg-switch-btn {
    background: rgba(20, 25, 50, 0.8);
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4cc9f0;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 10, 30, 0.4);
}

.bg-switch-btn:hover {
    transform: rotate(90deg);
    background: rgba(30, 35, 60, 0.9);
    border-color: rgba(76, 201, 240, 0.6);
    box-shadow: 0 8px 20px rgba(76, 201, 240, 0.3);
}

.bg-options {
    position: absolute;
    top: 60px;
    right: 0;
    background: rgba(20, 25, 50, 0.9);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(100, 150, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 10, 30, 0.5);
    display: none;
    min-width: 200px;
    animation: fadeInDown 0.3s ease-out;
}

.bg-options.show {
    display: block;
}

.bg-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.bg-option:hover {
    background: rgba(76, 201, 240, 0.15);
}

.bg-option.active {
    background: rgba(76, 201, 240, 0.25);
    border-left: 3px solid #4cc9f0;
}

.bg-preview {
    width: 50px;
    height: 32px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.bg-name {
    color: #e0f0ff;
    font-size: 0.9rem;
    font-weight: 500;
}

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

/* 背景类 - 修正路径 */
.bg-default {
    background: 
        linear-gradient(rgba(50, 70, 100, 0.2), rgba(50, 70, 100, 0.3)),
        url('../image/background1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.bg-alternate1 {
    background: 
        linear-gradient(rgba(50, 70, 100, 0.2), rgba(50, 70, 100, 0.3)),
        url('../image/background2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.bg-alternate2 {
    background: 
        linear-gradient(rgba(50, 70, 100, 0.2), rgba(50, 70, 100, 0.3)),
        url('../image/background3.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* 默认添加一个背景类 */
body {
    background: 
        linear-gradient(rgba(50, 70, 100, 0.2), rgba(50, 70, 100, 0.3)),
        url('./image/background1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* 头部样式 */
header {
    text-align: center;
    padding: 60px 0 40px;
    position: relative;
}

.header-title {
    font-size: 3.2rem;
    font-weight: 700;
    background: linear-gradient(90deg, #8ae2ff, #2153f8, #a633ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
    text-shadow: 0 0 25px rgba(138, 226, 255, 0.6);
    letter-spacing: 1px;
    filter: brightness(1.2);
}

.header-subtitle {
    font-size: 1.2rem;
    color: #a0c8ff;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* 栏目容器 */
.sections-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-bottom: 60px;
}

/* 单个栏目样式 */
.section {
    flex: 1;
    min-width: 300px;
    max-width: 380px;
    background: rgba(20, 25, 50, 0.6);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 10, 30, 0.4);
    border: 1px solid rgba(100, 150, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: transform 0.4s, box-shadow 0.4s;
}

.section:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 20, 60, 0.5);
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid;
    display: flex;
    align-items: center;
    gap: 12px;
}

.games .section-title {
    color: #4cc9f0;
    border-bottom-color: rgba(76, 201, 240, 0.5);
}

.projects .section-title {
    color: #a855f7;
    border-bottom-color: rgba(168, 85, 247, 0.5);
}

.articles .section-title {
    color: #10b981;
    border-bottom-color: rgba(16, 185, 129, 0.5);
}

.section-title i {
    font-size: 1.6rem;
}

/* 小方块网格 */
.blocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 18px;
}

/* 小方块样式 */
.block {
    background: rgba(30, 35, 60, 0.7);
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(100, 150, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.block::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s;
}

.block:hover::before {
    left: 100%;
}

.games .block:hover {
    background: rgba(76, 201, 240, 0.15);
    border-color: rgba(76, 201, 240, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(76, 201, 240, 0.3);
}

.projects .block:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.3);
}

.articles .block:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.block-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
    display: block;
}

.games .block-icon {
    color: #4cc9f0;
}

.projects .block-icon {
    color: #a855f7;
}

.articles .block-icon {
    color: #10b981;
}

.block-title {
    font-size: 1rem;
    font-weight: 600;
    color: #e0f0ff;
}

.block-desc {
    font-size: 0.8rem;
    color: #a0c8ff;
    margin-top: 5px;
    opacity: 0.8;
}

.block.disable {
    pointer-events: none;
    cursor: default;
    opacity: 0.6;
    filter: grayscale(40%);
}

/* 底部样式 */
footer {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid rgba(100, 150, 255, 0.2);
    margin-top: 20px;
}

.contact-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.email {
    font-size: 1.1rem;
    color: #a0c8ff;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(20, 25, 50, 0.6);
    border-radius: 50px;
    border: 1px solid rgba(100, 150, 255, 0.2);
    transition: all 0.3s;
}

.email:hover {
    background: rgba(30, 35, 60, 0.8);
    border-color: rgba(100, 150, 255, 0.4);
    transform: translateY(-3px);
}

.email i {
    color: #4cc9f0;
}

.copyright {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #7890c0;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .sections-container {
        gap: 30px;
    }
    
    .section {
        min-width: 100%;
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .header-title {
        font-size: 2.5rem;
    }
    
    .blocks-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-info {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .header-title {
        font-size: 2rem;
    }
    
    .section {
        padding: 20px;
    }
    
    .blocks-grid {
        grid-template-columns: 1fr;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeInUp 0.6s ease-out;
}

.games { animation-delay: 0.1s; }
.projects { animation-delay: 0.2s; }
.articles { animation-delay: 0.3s; }