/* style.css - Gun Mayhem 网站样式 */

/* --- 全局和基础样式 --- */

/* 引入 Google 字体 */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&family=Press+Start+2P&display=swap');

* {
    /* 基本重置：移除默认边距和内边距，设置盒子模型 */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* 平滑滚动效果 */
    scroll-behavior: smooth;
}

body {
    /* 主字体 */
    font-family: 'Nunito', sans-serif;
    /* 基本文字颜色 */
    color: #333;
    /* 背景颜色 */
    background-color: #f0fdf4; /* 淡绿色背景 */
    /* 行高 */
    line-height: 1.6;
}

/* 容器限制主要内容宽度 */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 0;
}

h1, h2, h3 {
    /* 标题字体 */
    font-family: 'Press Start 2P', cursive;
    /* 标题颜色 */
    color: #15803d; /* 深绿色 */
    /* 标题下边距 */
    margin-bottom: 15px;
}

h2 {
    /* H2 字体大小 */
    font-size: 1.8rem;
}

h3 {
     /* H3 字体大小 */
    font-size: 1.3rem;
    color: #16a34a; /* 稍浅的绿色 */
}

p {
    /* 段落下边距 */
    margin-bottom: 15px;
}

a {
    /* 链接颜色 */
    color: #16a34a;
    /* 移除下划线 */
    text-decoration: none;
}

a:hover {
    /* 鼠标悬停时添加下划线 */
    text-decoration: underline;
}

button {
    /* 按钮字体继承 */
    font-family: inherit;
    /* 鼠标指针样式 */
    cursor: pointer;
    /* 边框 */
    border: none;
    /* 内边距 */
    padding: 10px 15px;
    /* 圆角 */
    border-radius: 5px;
    /* 背景色 */
    background-color: #22c55e; /* 亮绿色 */
    /* 文字颜色 */
    color: #ffffff;
    /* 过渡效果 */
    transition: background-color 0.3s ease;
}

button:hover {
    /* 鼠标悬停时按钮背景变深 */
    background-color: #16a34a;
}

/* --- Header 样式 --- */
.site-header {
    /* 背景色 */
    background-color: #ffffff; /* 白色背景 */
    /* 内边距 */
    padding: 15px 5%; /* 上下 15px，左右 5% */
    /* 弹性布局，两端对齐 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* 底部阴影 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* 固定在顶部 */
    position: sticky;
    top: 0;
    z-index: 1000; /* 确保在最上层 */
    flex-wrap: wrap; /* 允许在小屏幕上换行 */
}

.logo h1 {
    /* Logo 字体 */
    font-family: 'Press Start 2P', cursive;
    /* Logo 字体大小 */
    font-size: 1.8rem;
    /* Logo 颜色 */
    color: #15803d; /* 深绿色 */
    /* 移除 H1 默认边距 */
    margin: 0;
    /* 文字阴影增加酷炫感 */
    text-shadow: 2px 2px 0px #a7f3d0; /* 淡绿色阴影 */
}

/* 主导航样式 */
.main-nav {
    flex-grow: 1;
    margin: 0 20px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.main-nav li {
    margin: 0 10px;
}

.main-nav a {
    color: #15803d;
    text-decoration: none;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.main-nav a:hover, .main-nav a.active {
    background-color: #dcfce7;
    color: #166534;
}

/* 面包屑导航 */
.breadcrumb {
    background-color: #f0fdf4;
    padding: 10px 5%;
    border-bottom: 1px solid #d1fae5;
}

.breadcrumb ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: ">";
    margin: 0 10px;
    color: #15803d;
}

.breadcrumb a {
    color: #15803d;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.language-switcher button {
    /* 语言按钮边距 */
    margin-left: 8px;
    /* 减小内边距 */
    padding: 6px 10px;
    /* 默认背景透明 */
    background-color: transparent;
    /* 默认文字颜色 */
    color: #16a34a;
    /* 边框 */
    border: 1px solid #16a34a;
}

.language-switcher button.active {
    /* 激活状态按钮背景 */
    background-color: #16a34a;
    /* 激活状态文字颜色 */
    color: #ffffff;
}

/* --- Main Content 样式 --- */
main {
    /* 主内容区域内边距 */
    padding: 20px 5%;
}

/* --- 游戏区域 --- */
.game-container {
    /* 相对定位，用于绝对定位全屏按钮 */
    position: relative;
    /* 下边距 */
    margin-bottom: 30px;
    /* 添加一点圆角和阴影，增加"可爱"感 */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* 隐藏内部溢出 */
}

.iframe-wrapper {
    /* 宽高比容器技巧，保持 16:9 (可调整) */
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    width: 100%;
}

.iframe-wrapper iframe {
    /* 让 iframe 填满容器 */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none; /* 移除 iframe 边框 */
}

.fullscreen-button {
    /* 绝对定位到右下角 */
    position: absolute;
    bottom: 15px;
    right: 15px;
    /* 按钮样式 */
    background-color: rgba(0, 0, 0, 0.6); /* 半透明背景 */
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    z-index: 10; /* 确保在 iframe 之上 */
}

.fullscreen-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* --- 内容区域 --- */
.content-section {
    /* 内容块上下边距 */
    margin-bottom: 40px;
    /* 内边距 */
    padding: 30px;
    /* 背景色 */
    background-color: #ffffff; /* 白色背景 */
    /* 圆角 */
    border-radius: 8px;
    /* 阴影 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

/* 绿白交替背景 (可选) */
.content-section:nth-child(odd) {
    /* 奇数内容块使用淡绿色背景 */
   /* background-color: #ecfdf5; */ /* 更淡的绿色，如果需要交替 */
}

/* 用户评论样式 */
.comment {
    /* 评论区背景 */
    background-color: #f0fdf4; /* 淡绿色背景 */
    /* 内边距 */
    padding: 15px;
    /* 下边距 */
    margin-bottom: 15px;
    /* 圆角 */
    border-radius: 5px;
    /* 左边框增加视觉区分 */
    border-left: 4px solid #22c55e; /* 亮绿色边框 */
}

.comment p {
    /* 移除评论段落的默认下边距 */
    margin-bottom: 0;
}

/* --- Footer 样式 --- */
.site-footer {
    /* 页脚背景 */
    background-color: #14532d; /* 更深的绿色 */
    /* 页脚文字颜色 */
    color: #d1fae5; /* 淡绿色文字 */
    /* 内边距 */
    padding: 25px 5%;
    /* 文字居中 */
    text-align: center;
    /* 上边框 */
    border-top: 3px solid #22c55e; /* 亮绿色上边框 */
}

.site-footer p {
    /* 页脚段落边距 */
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.site-footer a {
    /* 页脚链接颜色 */
    color: #a7f3d0; /* 更亮的淡绿色 */
}

.site-footer a:hover {
    color: #ffffff;
}

/* --- 响应式设计 --- */

/* 中等屏幕 (平板) */
@media (max-width: 768px) {
    .logo h1 {
        /* 减小 Logo 字体大小 */
        font-size: 1.5rem;
    }

    h2 {
        /* 减小 H2 字体大小 */
        font-size: 1.6rem;
    }

    h3 {
        /* 减小 H3 字体大小 */
        font-size: 1.2rem;
    }

    .site-header {
        /* 允许 Header 内容换行 */
        flex-direction: column;
        align-items: flex-start;
    }

    .language-switcher {
        /* 语言切换器增加上边距 */
        margin-top: 10px;
    }

    .language-switcher button {
        /* 减小语言按钮边距 */
        margin-left: 5px;
        margin-right: 5px;
    }
}

/* 小型屏幕 (手机) */
@media (max-width: 480px) {
    body {
        /* 减小基础字体大小 */
        font-size: 14px;
    }

    .logo h1 {
        /* 进一步减小 Logo 字体大小 */
        font-size: 1.3rem;
        text-shadow: 1px 1px 0px #a7f3d0; /* 调整阴影 */
    }

    h2 {
        /* 进一步减小 H2 字体大小 */
        font-size: 1.4rem;
    }

    h3 {
        /* 进一步减小 H3 字体大小 */
        font-size: 1.1rem;
    }

    .site-header {
        padding: 10px 3%;
    }

    main {
        padding: 15px 3%;
    }

    .content-section {
        padding: 20px;
    }

    .fullscreen-button {
        /* 调整全屏按钮大小和位置 */
        font-size: 0.8rem;
        padding: 5px 8px;
        bottom: 10px;
        right: 10px;
    }

    .language-switcher button {
        padding: 5px 8px;
    }

    .site-footer {
        padding: 20px 3%;
    }
}

/* 响应式导航 */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-nav {
        width: 100%;
        margin: 15px 0;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
    }
    
    .main-nav li {
        margin: 5px;
    }
    
    .language-switcher {
        align-self: flex-end;
    }
}

/* Tournament page styles */
.tournament-card {
    background-color: #f0fdf4;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #15803d;
}

.tournament-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.tournament-header h4 {
    margin: 0;
    color: #166534;
    font-size: 1.2rem;
}

.tournament-date {
    background-color: #dcfce7;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #15803d;
}

.tournament-details {
    display: flex;
    flex-wrap: wrap;
    margin: 15px 0;
    background-color: #ffffff;
    border-radius: 4px;
    padding: 10px;
}

.detail-item {
    margin-right: 20px;
    margin-bottom: 5px;
}

.detail-label {
    font-weight: 700;
    color: #166534;
    margin-right: 5px;
}

.tournament-button, .support-button {
    display: inline-block;
    background-color: #15803d;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s;
}

.tournament-button:hover, .support-button:hover {
    background-color: #166534;
}

.event-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.event-item {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.event-item h4 {
    color: #166534;
    margin-top: 0;
}

.guidelines-list li {
    margin-bottom: 15px;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.resource-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.resource-card h4 {
    color: #166534;
    margin-top: 0;
}

.resource-link {
    margin-top: auto;
    color: #15803d;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    margin-top: 10px;
}

.resource-link:hover {
    text-decoration: underline;
}

.contact-support {
    background-color: #dcfce7;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    text-align: center;
}

.champions-table {
    width: 100%;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.champions-header {
    display: flex;
    background-color: #15803d;
    color: white;
    font-weight: 700;
    padding: 12px 15px;
}

.champion-row {
    display: flex;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.champion-row:nth-child(even) {
    background-color: #f0fdf4;
}

.champion-row:last-child {
    border-bottom: none;
}

.champion-col {
    flex: 1;
    padding: 12px 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tournament-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tournament-date {
        margin-top: 5px;
    }
    
    .tournament-details {
        flex-direction: column;
    }
    
    .detail-item {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .champions-header, .champion-row {
        font-size: 0.9rem;
    }
    
    .champion-col {
        padding: 10px;
    }
}
