/* 基础样式 */
:root {
    --primary: #2a6ebb;
    --primary-light: #4a9cff;
    --dark: #0a1a3a;
    --dark-light: #1a3a7a;
    --text: #e0e0e0;
    --text-light: #ffffff;
    --accent: #ff6b6b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: var(--dark);
    background-image: linear-gradient(to bottom, rgba(10, 26, 58, 0.9), rgba(10, 26, 58, 0.7)),
    var(--background-image, url('/static/img/1.png'));
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

.user-menu-container {
    position: relative;
    display: inline-block;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.dropdown-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background-color: rgba(21, 38, 158, 0.5);
    border: 1px solid white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgb(255, 255, 255);
    width: 200px;
    overflow: hidden;
    transform-origin: top right;
    transform: scale(0);
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 1000;
}

.dropdown-menu.active {
    transform: scale(1);
    opacity: 1;
}

.user-info {
    padding: 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
}

.user-name {
    font-weight: bold;
    margin-bottom: 4px;
}

.user-email {
    font-size: 12px;
}

.menu-item {
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.menu-item:hover {
    background-color: #f5f5f5;
}

.menu-item i {
    margin-right: 10px;
    color: #555;
    width: 20px;
    text-align: center;
}

.menu-divider {
    height: 1px;
    background-color: #eee;
    margin: 4px 0;
}


/* 导航栏 */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
}

.logo {
    height: 100px;
    filter: drop-shadow(0 0 10px rgba(42, 110, 187, 0.7));
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 18px;
    transition: all 0.3s;
    padding: 5px 10px;
    border-radius: 5px;
}

.nav-links a:hover {
    color: var(--text-light);
    background: rgba(42, 110, 187, 0.3);
}

/* 主要内容区 */
.hero {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
    align-items: center;
}

.hero-content {
    flex: 1;
    min-width: 300px;
}

.hero-title {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--text-light);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 18px;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 5px 15px rgba(42, 110, 187, 0.4);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(42, 110, 187, 0.6);
}

.btn-secondary {
    border: 2px solid var(--primary);
    color: var(--primary-light);
}

.btn-secondary:hover {
    background: rgba(42, 110, 187, 0.1);
    color: var(--text-light);
}

/* 游戏特色卡片 */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.feature-card {
    background: rgba(26, 58, 140, 0.3);
    border-radius: 10px;
    padding: 30px;
    transition: all 0.3s;
    border: 1px solid rgba(42, 110, 187, 0.3);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-light);
}

.feature-icon {
    font-size: 40px;
    color: var(--primary-light);
    margin-bottom: 20px;
}

.feature-title {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--text-light);
}

/* 修复后的截图展示区 */
.screenshots-section {
    margin: 80px 0;
    position: relative;
}

.section-title {
    font-size: 32px;
    margin-bottom: 40px;
    color: var(--text-light);
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--primary-light);
    margin: 15px auto 0;
}

.screenshots-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.screenshots-wrapper {
    display: flex;
    transition: transform 0.5s ease;
    height: 500px; /* 固定高度 */
}

.screenshot {
    min-width: 100%;
    height: 100%;
    flex-shrink: 0;
    position: relative;
}

.screenshot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
}

.screenshot-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 26, 58, 0.8);
    padding: 15px;
    text-align: center;
    font-size: 18px;
}

/* 缩略图导航 - 隐藏滚动条 */
.thumbnail-nav {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding: 10px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.thumbnail-nav::-webkit-scrollbar {
    display: none;
}

.thumbnail {
    width: 120px;
    height: 70px;
    cursor: pointer;
    border: 2px solid #2a6ebb;
    border-radius: 4px;
    object-fit: cover;
    opacity: 0.7;
    transition: all 0.3s;
    flex-shrink: 0;
}

.thumbnail:hover, .thumbnail.active {
    opacity: 1;
    border-color: #4a9cff;
    transform: translateY(-3px);
}

/* 导航按钮 */
.screenshot-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(10, 26, 58, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.screenshot-nav-btn:hover {
    background: rgba(42, 110, 187, 0.9);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* 舰娘展示 */
.ships-section {
    margin: 80px 0;
}

.ships-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.ship-card {
    background: rgba(26, 58, 140, 0.3);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid rgba(42, 110, 187, 0.3);
}

.ship-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.ship-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.ship-info {
    padding: 15px;
    text-align: center;
}

.ship-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--text-light);
}

.ship-type {
    font-size: 14px;
    color: var(--primary-light);
}

/* 页脚 */
footer {
    background: rgba(10, 26, 58, 0.8);
    padding: 30px 0;
    text-align: center;
    margin-top: 80px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.copyright {
    color: rgba(224, 224, 224, 0.6);
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
    }

    .hero-image {
        order: -1;
        margin-bottom: 30px;
    }

    .screenshots-wrapper {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }

    .nav-links {
        display: none;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .ships-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .screenshots-wrapper {
        height: 300px;
    }

    .thumbnail {
        width: 100px;
        height: 60px;
    }
}