/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 隐藏页面滚动条但保留滚动功能 */
html, body {
    /* 隐藏垂直滚动条 - Firefox */
    scrollbar-width: none;
    /* 隐藏垂直滚动条 - IE/Edge */
    -ms-overflow-style: none;
}

/* Chrome、Safari等WebKit浏览器隐藏所有滚动条 */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.voice-list::-webkit-scrollbar,
.modal::-webkit-scrollbar {
    display: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #0f172a;
    color: #e2e8f0;
    line-height: 1.6;
    background-image: url('static/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    padding: 1.5rem 1rem; /* 减小内边距，降低整体高度 */
    margin-bottom: 20px;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* 确保header内容在最上层 */
    z-index: 10;
    min-height: 150px; /* 减小最小高度，使与下方内容更匹配 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* header:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 
                0 0 30px rgba(171, 54, 221, 0.3);
} */

/* header的基础样式 */

/* 渐变叠加层，增强视觉层次感 */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('static/banner.jpg');
    background-size: 140% 140%; /* 使用百分比而不是cover，确保有足够空间移动 */
    background-position: var(--bg-position-x, 50%) var(--bg-position-y, 50%);
    background-blend-mode: overlay;
    background-repeat: no-repeat;
    filter: blur(6px) brightness(1.1);
    z-index: 0;
    transition: background-position 0.15s ease-out; /* 增加过渡时间使效果更平滑 */
}

/* header:hover::before {
    transform: scale(1.15);
} */

/* 鼠标视差效果 */
.parallax-bg {
    transition: background-position 0.1s ease-out;
}

header > * {
    position: relative;
    z-index: 1;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.lol-logo {
    width: 120px; /* 减小logo尺寸，与调整后的header高度匹配 */
    height: auto;
    transition: transform 0.3s ease;
}

.lol-logo:hover {
    transform: scale(1.05);
}

.container header p {
    font-size: 12px;
    opacity: 0.9;
    margin: 10px 0 10px 0;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 页面加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 英雄头像网格样式 */
.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    justify-items: center;
    animation: fadeInUp 0.6s ease-out;
}

/* 动态背景效果 */
@keyframes subtleMove {
    0% { transform: scale(1) translateX(0); }
    50% { transform: scale(1.03) translateX(-1%); }
    100% { transform: scale(1) translateX(0); }
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('static/background.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: -1;
    animation: subtleMove 20s ease-in-out infinite;
}

.hero-avatar {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 2px solid #333;
    background-color: #1e293b;
    /* 为移动端优化的触摸反馈 */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    animation: fadeInUp 0.5s ease-out backwards;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
    transition: filter 0.3s ease;
}

/* 骨架屏样式 */
.skeleton-loading {
    background-color: #1e293b;
    border-color: #334155;
    position: relative;
    overflow: hidden;
}

.skeleton-animation {
    width: 100%;
    height: 85%;
    background: linear-gradient(
        90deg,
        #1e293b 25%,
        #334155 50%,
        #1e293b 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-text {
    width: 70%;
    height: 14px;
    background: linear-gradient(
        90deg,
        #334155 25%,
        #475569 50%,
        #334155 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin: 0 auto;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 图片懒加载过渡效果 */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img.loaded {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

/* 英雄头像边框根据英雄颜色变化 */
.hero-avatar:nth-child(1) { border-color: #a78bfa; } /* 佐伊 */
.hero-avatar:nth-child(2) { border-color: #60a5fa; } /* 库奇 */
.hero-avatar:nth-child(3) { border-color: #10b981; } /* 提莫 */
.hero-avatar:nth-child(4) { border-color: #f97316; } /* 纳尔 */
.hero-avatar:nth-child(5) { border-color: #dc2626; } /* 德莱厄斯 */
.hero-avatar:nth-child(6) { border-color: #3b82f6; } /* 慎 */

/* 英雄头像通用悬停效果（保留但简化） */
.hero-avatar:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

/* 移动端触摸反馈 */
.hero-avatar:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}



.hero-avatar:hover .hero-image {
    filter: brightness(1.2);
}

.hero-name-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 10px 5px;
    text-align: center;
    transition: opacity 0.3s ease;
}

.hero-name-overlay h3 {
    font-size: 0.9rem;
    margin: 0;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: transparent;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 0;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: modalFadeIn 0.2s ease-out;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 模态框打开动画增强 */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 模态框关闭动画 */
@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

/* 关闭动画类 */
.modal-content.closing {
    animation: modalFadeOut 0.2s ease-out;
}



.modal-header {
    padding: 40px 20px;
    min-height: 150px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
    position: relative;
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.close-btn:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 20px;
    max-height: calc(90vh - 70px);
    position: relative;
    background-color: transparent;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
    border-radius: 0 0 16px 16px;
}

.voice-list {
    max-height: calc(60vh - 70px);
    overflow-y: auto;
    /* 增加内边距以防止边缘元素放大时被遮挡 */
    padding: 10px;
    /* margin: -10px; */
    margin-left: -10px;
    margin-right: -10px;
    margin-top: 5px;
}

/* 隐藏模态框中语音列表的滚动条 */
/* 确保模态框容器也隐藏滚动条 */
.modal {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.voice-list::-webkit-scrollbar {
    display: none;
}

/* 滚动按钮样式 */
.scroll-btn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0);
    color: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s, background-color 0.3s;
    z-index: 10;
    pointer-events: none;
}

.scroll-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-btn:hover {
        color: rgba(255, 255, 255, 0.9);
}

.scroll-top {
    top: 0px;
}

.scroll-bottom {
    bottom: 0px;
}

.modal-body::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

/* 语音列表样式 */
#modalVoiceList {
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* 确保有足够空间显示放大的元素 */
    position: relative;
    z-index: 1;
}

.voice-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    margin-bottom: 8px;
    background-color: rgba(30, 30, 30, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    min-height: 60px;
    flex-direction: column;
    overflow: hidden;
}

/* 波纹效果样式 */
.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
    z-index: 100;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.voice-item:hover {
    background-color: rgba(40, 40, 40, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    transform: translateY(-1px) scale(1.01);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.voice-item:active {
    transform: scale(0.98);
    background-color: rgba(16, 185, 129, 0.1);
    transition: transform 0.1s ease, background-color 0.1s ease;
}

.voice-item.playing {
    border-color: rgba(255, 255, 255, 0.8);
    background-color: rgba(194, 194, 194, 0.15);
    animation: pulse-ring 1.5s infinite;
    transform: scale(1.02);
    border-width: 2px;
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    }
    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    }
}

.voice-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transition: left 0s;
}

.voice-item:active::before {
    left: 100%;
    transition: left 0.3s ease-out;
}

.voice-text {
    color: white;
    text-align: center;
    font-size: 16px;
    line-height: 1.6;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin: 0;
}

.voice-item.playing {
    background-color: rgba(45, 45, 45, 0.7);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.45), 
                0 0 0 1px rgba(255, 255, 255, 0.1) inset,
                0 0 15px rgba(139, 92, 246, 0.2);
}

/* 音频播放时的频谱动画 */
@keyframes spectrum-pulse {
    0%, 100% { transform: scaleY(0.5); opacity: 0.7; }
    50% { transform: scaleY(1.5); opacity: 1; }
}

.voice-item.playing::after {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 3px;
    width: 20px;
    height: 30px;
    align-items: center;
    justify-content: center;
}

.voice-item.playing::after::before,
.voice-item.playing::after::after,
.voice-item.playing::after span {
    content: '';
    width: 3px;
    background-color: #8b5cf6;
    border-radius: 3px;
    animation: spectrum-pulse 1s ease-in-out infinite;
}

.voice-item.playing::after::before { animation-delay: 0s; }
.voice-item.playing::after span { animation-delay: 0.2s; }
.voice-item.playing::after::after { animation-delay: 0.4s; }

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.play-button {
    display: none;
}

/* 响应式网格布局 */
@media (min-width: 768px) {
    .hero-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 20px;
    }
    
    .hero-name-overlay h3 {
        font-size: 1rem;
    }
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

.footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-top: auto;
}

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

.divider {
    height: 1px;
    width: 30px;
    background:  rgb(255, 255, 255);
}

.author-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid transparent;
}

.author-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.design-text {
    font-size: 13px;
    opacity: 0.8;
    letter-spacing: 0.5px;
}

.author-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .hero-list {
        grid-template-columns: 1fr;
    }
    
    .hero-header {
        padding: 12px 15px;
    }
    
    .hero-header h3 {
        font-size: 1.1rem;
    }
    
    .voice-item {
        padding: 20px 15px;
        flex-direction: column;
        align-items: center;
        min-height: 70px;
    }
    
    .voice-text {
        text-align: center;
        font-size: 15px;
        margin: 0;
    }
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #94a3b8;
    font-size: 0.9rem;
}
