/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo a {
    font-size: 28px;
    font-weight: bold;
    color: #4A90E2;
    text-decoration: none;
    letter-spacing: -1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s;
    padding: 10px 0;
    display: block;
}

.nav-menu a:hover {
    color: #4A90E2;
}

/* 下拉菜单 */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    list-style: none;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    padding: 10px 0;
    margin-top: 10px;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    padding: 12px 20px;
    display: block;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
    color: #4A90E2;
}

/* 语言切换器 */
.language-switcher {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-right: 20px;
}

.lang-btn {
    padding: 8px 16px;
    border: 2px solid #4A90E2;
    background-color: transparent;
    color: #4A90E2;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border-radius: 5px;
    transition: all 0.3s;
}

.lang-btn:hover {
    background-color: #4A90E2;
    color: #fff;
}

.lang-btn.active {
    background-color: #4A90E2;
    color: #fff;
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #333;
    transition: all 0.3s;
}

/* 轮播横幅区域 */
.banner-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 60px;
}

.banner-container {
    position: relative;
    width: 100%;
    height: 600px;
}

.banner-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.banner-slide.active {
    opacity: 1;
}

.banner-slide {
    background-size: cover;
    background-position: center;
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 10;
    background: rgba(0,0,0,0.5);
    padding: 40px 60px;
    border-radius: 10px;
}

.banner-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.banner-content p {
    font-size: 24px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.btn-view-game {
    display: inline-block;
    padding: 15px 40px;
    background-color: #4A90E2;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-view-game:hover {
    background-color: #357ABD;
}

.banner-prev,
.banner-next {
    display: none; /* 只有一个幻灯片时隐藏导航按钮 */
}

.banner-dots {
    display: none; /* 只有一个幻灯片时隐藏指示点 */
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active,
.dot:hover {
    background-color: #fff;
}

/* 特色游戏区域 */
.featured-games {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.coming-soon {
    text-align: center;
    padding: 80px 20px;
}

.coming-soon-text {
    font-size: 48px;
    color: #4A90E2;
    font-weight: 600;
    letter-spacing: 4px;
    margin: 0;
}

.section-title {
    font-size: 36px;
    text-align: center;
    margin-bottom: 50px;
    color: #333;
    font-weight: 700;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.featured-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

.featured-card img,
.featured-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.featured-image {
    text-align: center;
    line-height: 400px;
}

.featured-content {
    padding: 25px;
}

.featured-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.featured-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

.btn-view {
    display: inline-block;
    padding: 12px 30px;
    background-color: #4A90E2;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-view:hover {
    background-color: #357ABD;
}

/* 所有游戏网格 */
.all-games {
    padding: 60px 0;
    background-color: #fff;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.game-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s;
    padding: 15px;
    border-radius: 10px;
}

.game-item:hover {
    transform: scale(1.05);
    background-color: #f8f9fa;
}

.game-icon {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.game-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
}

/* 关于 Mainstay Studios */
.about-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.mainstay-logo-large {
    font-size: 48px;
    font-weight: bold;
    color: #4A90E2;
    margin-bottom: 30px;
    letter-spacing: -2px;
}

.about-text {
    font-size: 16px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: left;
}

/* 页脚 */
.footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 50px 0 20px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fff;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: #fff;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    transition: background-color 0.3s;
}

.social-icon:hover {
    background-color: rgba(255,255,255,0.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #bdc3c7;
    font-size: 14px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: slideDown 0.3s;
    position: relative;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: #aaa;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close:hover,
.modal-close:focus {
    color: #333;
}

.modal-title {
    padding: 30px 30px 20px;
    margin: 0;
    font-size: 28px;
    color: #333;
    border-bottom: 2px solid #4A90E2;
}

.modal-body {
    padding: 30px;
    color: #666;
    line-height: 1.8;
    font-size: 16px;
}

.modal-body h3 {
    color: #333;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 20px;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.modal-body li {
    margin-bottom: 10px;
}

.modal-body a {
    color: #4A90E2;
    text-decoration: none;
}

.modal-body a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #fff;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 20px 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        padding: 15px 0;
    }

    .language-switcher {
        margin-right: 10px;
    }

    .lang-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .hamburger {
        display: flex;
    }

    .banner-content h2 {
        font-size: 32px;
    }

    .banner-content p {
        font-size: 18px;
    }

    .banner-content {
        padding: 20px 30px;
    }

    .banner-container {
        height: 400px;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }

    .section-title {
        font-size: 28px;
    }

    .coming-soon-text {
        font-size: 36px;
        letter-spacing: 2px;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .banner-container {
        height: 300px;
    }

    .banner-content h2 {
        font-size: 24px;
    }

    .banner-content p {
        font-size: 16px;
    }

    .banner-prev,
    .banner-next {
        padding: 10px;
        font-size: 18px;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .coming-soon-text {
        font-size: 28px;
        letter-spacing: 1px;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-title {
        padding: 20px 20px 15px;
        font-size: 24px;
    }

    .modal-body {
        padding: 20px;
        font-size: 14px;
    }

    .modal-close {
        right: 15px;
        top: 15px;
        font-size: 28px;
    }
}

