/* common.css - 全站视觉基调 */
:root {
    --bg-dark: #0f172a;        /* 深蓝黑背景 */
    --panel-bg: #1e293b;     /* 面板背景 */
    --accent: #22c55e;        /* 亮绿色（游戏感） */
    --text-main: #f1f5f9;     /* 主文字色 */
    --text-dim: #94a3b8;      /* 辅助文字色 */
    --nav-height: 70px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
}



/* 全局导航容器 */
.site-nav {
    display: flex;
    justify-content: space-between; /* 左右分布 */
    align-items: center;
    padding: 0 5%;
    height: 70px;
    background: #111827;
    border-bottom: 1px solid #374151;
}

/* 左侧 Logo */
.nav-left { display: flex; align-items: center; }
.nav-logo {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff;
    white-space: nowrap;
}
.logo-icon { margin-right: 10px; font-size: 1.5rem; }

/* 右侧组合区域 */
.nav-right {
    display: flex;
    align-items: center;
    gap: 30px; /* 搜索框与链接之间的间距 */
}

/* 搜索框美化 */
.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 20px; /* 圆角 */
    padding: 4px 15px;
    transition: all 0.3s ease;
}
.search-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
    background: #2d3748;
}
#game-search {
    background: transparent;
    border: none;
    color: #fff;
    padding: 6px;
    outline: none;
    width: 180px;
    font-size: 0.9rem;
	transition: width 0.4s ease;
}
#game-search:focus {
    width: 280px; /* 聚焦时变长，更有动感 */
}
.search-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 5px;
    transition: transform 0.2s;
}
.search-btn:hover { transform: scale(1.2); }

/* 搜索结果为空时 */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px 20px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 20px;
    border: 2px dashed #334155;
    font-size: 2.2rem;
    color: var(--text-dim);
}
.no-results::before {
    content: "🔎";
    display: block;
    font-size: 8rem;
    margin-bottom: 20px;
    filter: grayscale(1);
}



/* 分类链接醒目处理 */
.nav-links { display: flex; gap: 15px; }
.cat-link {
    color: #9ca3af;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.cat-link:hover {
    color: #fff;
    background: rgba(34, 197, 94, 0.15); /* 淡淡的底色 */
    box-shadow: inset 0 0 0 1px var(--accent); /* 内边框线 */
}





/* 默认隐藏汉堡菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    margin-left: 15px;
    padding: 0;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #fff;
    border-radius: 3px;
    transition: 0.3s;
}

/* 移动端适配 */
@media (max-width: 768px) {
    /* 1. 强制防止左右滚动 */
    body { overflow-x: hidden; }

	.nav-logo .logo-text {
        display: none !important;
    }

    /* 2. 调整导航栏布局，允许元素紧凑排列 */
    .site-nav {
        padding: 0 15px;
        position: relative; /* 为下拉菜单提供定位基准 */
    }

    /* 3. 缩减搜索框在移动端的宽度，防止挤压 */
    #game-search {
        width: 130px !important; /* 手机端初始变短 */
    }
    #game-search:focus {
        width: 160px !important; /* 聚焦时也别太长 */
    }
    
    .nav-right {
        gap: 10px; /* 缩小元素间距 */
    }

    /* 4. 显示汉堡菜单按钮 */
    .menu-toggle {
        display: flex !important;
        z-index: 1001;
    }

    /* 5. 修复下拉列表样式 */
    .nav-links {
        display: none; /* 必须先彻底隐藏 */
        flex-direction: column;
        position: absolute;
        top: 70px; /* 匹配 var(--nav-height) */
        left: 0;
        width: 100%;
        background: #111827; /* 匹配导航栏颜色 */
        padding: 10px 0;
        box-shadow: 0 15px 25px rgba(0,0,0,0.6);
        z-index: 1000;
        gap: 0; /* 垂直排列时取消间距 */
        border-top: 1px solid #374151;
    }

    /* 6. 激活状态 */
    .nav-links.active {
        display: flex !important;
    }

    /* 7. 移动端链接点击区域变大 */
    .nav-links a {
        display: block;
        padding: 15px 25px;
        width: 100%;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
}

	
	
	



/* 广告位正规化标注 */
.ad-container {
    position: relative;
    flex-direction: column; /* 让标注在广告上方 */
    padding-top: 20px !important;
	display: flex;
    justify-content: center;
    align-items: center;
    margin: 25px auto;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03); /* 给一个极淡的占位底色 */
    border-radius: 8px;
    min-height: 90px; /* 通栏广告预留高度 */
}

/* 侧边栏广告特有尺寸 */
.play-sidebar .ad-container {
    min-height: 250px;
    width: 100%;
}

.ad-label {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.6;
}

/* 屏蔽后的替代样式 */
.ad-fallback {
    width: 100%;
    height: 90px;
    background: #1e293b;
    border: 1px solid #334155;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    color: var(--accent);
}

.ad-fallback p { margin: 0; font-size: 12px; }

.container {
    max-width: 1200px;
    margin: auto;
}



/* 回到顶部小火箭样式 */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    font-size: 24px;
    width: 50px;
    height: 50px;
    background-color: var(--panel-bg);
    color: white;
    border: 2px solid var(--accent);
    border-radius: 50%;
    cursor: pointer;
    display: none; /* 默认隐藏 */
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    align-items: center;
    justify-content: center;
}

#back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    background-color: var(--accent);
    box-shadow: 0 0 20px var(--accent);
}

/* 火箭发射动画 */
.rocket-launch {
    transform: translateY(-100vh) !important;
    transition: transform 0.5s ease-in !important;
}
