/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
}

/* 应用容器 */
.app-container {
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #2b5876 0%, #4e4376 100%);
}

/* 导航栏 */
.nav-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* 调整导航项宽度以适应四个项目 */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 25%;
    height: 100%;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-item span {
    font-size: 12px;
}

.nav-item.active {
    color: #ffffff;
    font-weight: bold;
}

/* 内容区域 */
.content-container {
    flex: 1;
    padding: 0;
    padding-bottom: 60px; /* 只留出导航栏的高度 */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 60px); /* 减去导航栏高度 */
}

.section {
    display: none;
    animation: fadeIn 0.5s ease;
    height: 100%;
}

.section.active {
    display: block;
    height: 100%;
}

.music-section {
    height: 100%;
}


/* 视频模块样式已移至 video-player.css */

/* 工具模块样式 */
.tools-section, .game-section, .others-section, .my-section {
    padding: 20px;
}

.section-title {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 24px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tool-item {
    background-color: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 15px;
}

.tool-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    background-color: #f9f9f9;
}

.tool-icon {
    width: 60px;
    height: 60px;
    background-color: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.tool-icon i {
    font-size: 24px;
    color: #4e4376;
}

/* 工具图标中的图片样式 */
.tool-icon img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.tool-info {
    flex: 1;
}

.tool-info h3 {
    margin-bottom: 5px;
    color: #333;
    font-size: 18px;
}

.tool-info p {
    font-size: 14px;
    color: #888;
}

/* 测速工具iframe容器样式 */
.speedtest-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.speedtest-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #4e4376;
    color: white;
}

.close-speedtest-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

#speedtestFrame {
    flex: 1;
    width: 100%;
    height: calc(100% - 60px);
    border: none;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* 长屏手机适配 */
@media (min-height: 700px) {
    .content-container {
        min-height: calc(100vh - 60px);
    }
}

/* 留言板提示消息样式 */
.message-notice {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    text-align: center;
    pointer-events: none;
    animation: fadeInOut 3s ease forwards;
}

.message-notice-content {
    display: inline-block;
    padding: 15px 30px;
    background-color: rgba(78, 67, 118, 0.9);
    color: #ffffff;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
}

/* 欢迎消息样式 */
.welcome-message {
    position: fixed;
    top: 5px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 1000;
    pointer-events: none;
    overflow: hidden;
    height: 50px;
}

.welcome-message-content {
    display: inline-block;
    padding: 10px 25px;
    color: #e67e22;
    border-radius: 30px;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
    white-space: nowrap;
    animation: scrollMessage 20s linear forwards;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

@keyframes scrollMessage {
    0% {
        transform: translateX(100vw);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    95% {
        transform: translateX(-100%);
        opacity: 1;
    }
    100% {
        transform: translateX(-110%);
        opacity: 0;
    }
}

/* 开发中提示样式 */
.developing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px 20px;
    margin: 20px auto;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* 版权链接样式 */
.copyright-link {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
    padding: 10px;
}

.copyright-link a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.copyright-link a:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
}

.modal-content {
    background-color: rgba(30, 30, 40, 0.95);
    margin: 15% auto;
    padding: 0;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #ffffff;
    font-size: 18px;
    margin: 0;
    display: flex;
    align-items: center;
}

.modal-header h3 i {
    margin-right: 10px;
    color: rgba(255, 255, 255, 0.9);
}

.close-modal {
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #ffffff;
}

.modal-body {
    padding: 25px;
    color: #ffffff;
}

/* 版权声明部分样式 */
.copyright-section {
    margin-bottom: 20px;
}

.copyright-section h4 {
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.copyright-section h4 i {
    margin-right: 8px;
    color: #6c5ce7;
}

.copyright-section p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 12px;
    text-align: justify;
    letter-spacing: 0.3px;
}

.copyright-section strong {
    color: #ffffff;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(108, 92, 231, 0.5);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

/* 列表样式 */
.copyright-section ul {
    list-style-type: none;
    padding-left: 20px;
    margin: 10px 0 15px;
}

.copyright-section ul li {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 6px;
    position: relative;
}

.copyright-section ul li:before {
    content: "•";
    color: #6c5ce7;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* 分隔线样式 */
.copyright-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    margin: 20px 0;
}

/* 联系信息样式 */
.contact-info {
    font-style: italic;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    display: inline-block;
    margin-top: 5px;
}

.contact-info a {
    color: #74b9ff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-info a:hover {
    color: #0984e3;
    text-decoration: underline;
}

.developing-icon {
    width: 100px;
    height: 100px;
    background-color: rgba(78, 67, 118, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.developing-icon i {
    font-size: 40px;
    color: #ffffff;
}

.developing-container h3 {
    color: #ffffff;
    font-size: 24px;
    margin-bottom: 10px;
}

.developing-container p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(78, 67, 118, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(78, 67, 118, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(78, 67, 118, 0);
    }
}