/* ============================================
   Clown Game Center - 统一样式表 v2.0
   橙金渐变主题 (#ff6b35 → #f7c948)
   ============================================ */
:root {
    --cg-primary: #ff6b35;
    --cg-secondary: #f7c948;
    --cg-bg: linear-gradient(135deg, #ff6b35 0%, #f7c948 100%);
    --cg-bg-hover: linear-gradient(135deg, #ff8555 0%, #f8d46a 100%);
    --cg-glass: rgba(255, 255, 255, 0.1);
    --cg-glass-border: rgba(255, 255, 255, 0.2);
    --cg-shadow: 0 8px 32px rgba(255, 107, 53, 0.3);
    --cg-radius: 16px;
    --cg-radius-lg: 24px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: #0f0f1a;
    color: #fff;
    min-height: 100vh;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--cg-primary); }

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--cg-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-logo img { height: 45px; width: auto; }
.navbar-logo span { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: 1px; }

.navbar-menu { display: flex; align-items: center; gap: 8px; }
.navbar-menu a {
    padding: 10px 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    font-weight: 500;
    border-radius: 25px;
    transition: all 0.3s ease;
}
.navbar-menu a:hover, .navbar-menu a.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* 移动端菜单按钮（默认隐藏） */
.navbar-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: auto;
}
.navbar-menu-btn:hover { background: rgba(255, 255, 255, 0.15); }
.navbar-menu-btn.active {
    background: var(--cgc-primary, #e94560);
    border-color: var(--cgc-primary, #e94560);
}
.navbar-menu-btn .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 20px;
}
.navbar-menu-btn .hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    transition: all 0.3s ease;
}
.navbar-menu-btn.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.navbar-menu-btn.active .hamburger span:nth-child(2) { opacity: 0; }
.navbar-menu-btn.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.navbar-search { display: flex; align-items: center; gap: 10px; }
.search-input {
    width: 280px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
}
.search-input::placeholder { color: rgba(255, 255, 255, 0.6); }
.search-input:focus { outline: none; background: rgba(255, 255, 255, 0.25); border-color: rgba(255, 255, 255, 0.4); }

.search-btn {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.search-btn:hover { background: rgba(255, 255, 255, 0.3); transform: scale(1.05); }

.navbar-avatar img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    cursor: pointer;
    transition: all 0.3s ease;
}
.navbar-avatar img:hover { border-color: #fff; transform: scale(1.1); }

.btn-auth {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-auth:hover { background: #fff; color: var(--cg-primary); }

/* 主内容 */
.main-content { padding-top: 70px; min-height: calc(100vh - 70px); }

/* 轮播图 */
.banner { position: relative; height: 450px; overflow: hidden; }
.banner-slider { display: flex; height: 100%; transition: transform 0.5s ease; }
.banner-slide { min-width: 100%; height: 100%; position: relative; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 80px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}
.banner-title { font-size: 48px; font-weight: 700; margin-bottom: 15px; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); }
.banner-desc { font-size: 18px; color: rgba(255, 255, 255, 0.9); max-width: 600px; }

/* 内容区域 */
.content-section { padding: 60px 40px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}
.section-title::before {
    content: '';
    width: 5px;
    height: 30px;
    background: var(--cg-bg);
    border-radius: 3px;
}
.section-more {
    color: var(--cg-primary);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}
.section-more:hover { color: #fff; gap: 10px; }

/* 游戏卡片 */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; }
.game-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.game-card:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); }
.game-cover { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.game-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.game-card:hover .game-cover img { transform: scale(1.1); }
.game-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.game-card:hover .game-play-overlay { opacity: 1; }
.game-play-btn {
    padding: 12px 30px;
    background: var(--cg-primary);
    border-radius: 25px;
    font-weight: 600;
    color: #fff;
}
.game-info { padding: 16px; }
.game-title { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 6px; }
.game-category { font-size: 13px; color: rgba(255, 255, 255, 0.6); }

/* 博客卡片 */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }
.blog-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.blog-card:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-5px); }
.blog-cover { aspect-ratio: 16/9; overflow: hidden; }
.blog-cover img { width: 100%; height: 100%; object-fit: cover; }
.blog-info { padding: 20px; }
.blog-date { font-size: 12px; color: rgba(255, 255, 255, 0.5); }
.blog-title { font-size: 16px; font-weight: 600; color: #fff; margin: 10px 0; }
.blog-excerpt { font-size: 13px; color: rgba(255, 255, 255, 0.6); }

/* 社区 */
.community-list { background: rgba(255, 255, 255, 0.03); border-radius: 16px; overflow: hidden; }
.community-item {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease;
}
.community-item:hover { background: rgba(255, 255, 255, 0.05); }
.community-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.community-content { flex: 1; }
.community-content h4 { font-size: 15px; font-weight: 600; margin-bottom: 5px; }
.community-content p { font-size: 14px; color: rgba(255, 255, 255, 0.7); }
.community-time { font-size: 12px; color: rgba(255, 255, 255, 0.5); }

/* 底部 */
.footer {
    background: rgba(0, 0, 0, 0.3);
    padding: 40px;
    text-align: center;
    margin-top: 60px;
}
.footer-content { max-width: 1200px; margin: 0 auto; }
.footer-logo { height: 50px; margin-bottom: 20px; }
.footer-links { display: flex; justify-content: center; gap: 30px; margin-bottom: 20px; }
.footer-links a { color: rgba(255, 255, 255, 0.7); font-size: 14px; transition: color 0.3s ease; }
.footer-links a:hover { color: var(--cg-primary); }
.footer-copyright { font-size: 13px; color: rgba(255, 255, 255, 0.5); }

/* 登录页面 */
.login-wrapper {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.login-form {
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--cg-glass-border);
    border-radius: var(--cg-radius-lg);
    padding: 50px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--cg-shadow);
}
.login-header { text-align: center; margin-bottom: 40px; }
.login-header h2 { font-size: 28px; font-weight: 700; margin-bottom: 8px; background: var(--cg-bg); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.login-header p { color: rgba(255, 255, 255, 0.6); font-size: 14px; }
.login-form .form-group { margin-bottom: 20px; }
.login-form .form-group label { display: block; margin-bottom: 8px; font-size: 14px; color: rgba(255, 255, 255, 0.8); }
.login-form .form-group input[type="text"],
.login-form .form-group input[type="password"],
.login-form .form-group input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--cg-radius);
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
}
.login-form .form-group input:focus { outline: none; border-color: var(--cg-primary); background: rgba(255, 107, 53, 0.1); }
.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--cg-bg);
    border: none;
    border-radius: var(--cg-radius);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-primary:hover { background: var(--cg-bg-hover); transform: translateY(-2px); box-shadow: var(--cg-shadow); }
.checkbox-label { display: flex; align-items: center; gap: 10px; font-size: 14px; color: rgba(255, 255, 255, 0.7); cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--cg-primary); }
.checkbox-label a { color: var(--cg-primary); }
.login-footer { margin-top: 25px; text-align: center; }
.login-footer p { color: rgba(255, 255, 255, 0.6); font-size: 14px; margin-bottom: 8px; }
.login-footer a { color: var(--cg-primary); font-weight: 600; }

/* ============================================
   响应式适配 - 多设备屏幕
   ============================================ */

/* 平板 (1200px 以下) */
@media (max-width: 1200px) {
    .content-section { padding: 50px 30px; }
    .game-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 平板竖屏 / 大手机 (1024px) */
@media (max-width: 1024px) {
    .navbar { padding: 0 20px; }
    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(20, 20, 25, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 15px;
        gap: 5px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }
    .navbar-menu.show { display: flex; }
    .navbar-menu a {
        padding: 12px 16px;
        border-radius: 8px;
        text-align: center;
    }
    .navbar-menu-btn { display: flex; }
    .search-input { width: 200px; }
    .banner { height: 350px; }
    .banner-title { font-size: 36px; }
    .game-grid { grid-template-columns: repeat(2, 1fr); }
    .content-section { padding: 40px 25px; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 15px; }
}

/* 手机 (768px 以下) */
@media (max-width: 768px) {
    .navbar { height: 60px; padding: 0 15px; }
    .navbar-logo img { height: 35px; }
    .navbar-logo span { font-size: 16px; }
    .navbar-search { display: none; }
    .btn-auth { padding: 8px 16px; font-size: 13px; }
    .navbar-avatar img { width: 32px; height: 32px; }
    
    .banner { height: 280px; }
    .banner-overlay { padding: 30px 20px; }
    .banner-title { font-size: 24px; margin-bottom: 10px; }
    .banner-desc { font-size: 14px; max-width: 100%; }
    
    .content-section { padding: 30px 15px; }
    .section-title { font-size: 18px; }
    .section-title::before { height: 20px; }
    .section-more { font-size: 13px; }
    
    .game-grid { grid-template-columns: 1fr; gap: 15px; }
    .game-card { border-radius: 12px; }
    .game-info { padding: 12px; }
    .game-title { font-size: 15px; }
    
    .blog-grid { grid-template-columns: 1fr; gap: 15px; }
    .blog-card { border-radius: 12px; }
    .blog-info { padding: 15px; }
    
    .community-item { padding: 15px; }
    .community-avatar { width: 40px; height: 40px; }
    .community-content h4 { font-size: 14px; }
    .community-content p { font-size: 13px; }
    
    .login-wrapper { padding: 20px 15px; }
    .login-form { padding: 30px 20px; border-radius: 16px; }
    .login-header { margin-bottom: 30px; }
    .login-header h2 { font-size: 24px; }
    .login-form .form-group { margin-bottom: 15px; }
    .login-form .form-group input { padding: 12px 14px; }
    
    .footer { padding: 30px 20px; }
    .footer-links { flex-wrap: wrap; gap: 15px; }
}

/* 小手机 (480px 以下) */
@media (max-width: 480px) {
    .navbar { padding: 0 12px; }
    .navbar-logo span { display: none; }
    .btn-auth { padding: 6px 12px; font-size: 12px; }
    
    .banner { height: 220px; }
    .banner-overlay { padding: 20px 15px; }
    .banner-title { font-size: 20px; }
    .banner-desc { font-size: 13px; }
    
    .content-section { padding: 25px 12px; }
    .section-title { font-size: 16px; gap: 8px; }
    
    .game-grid { grid-template-columns: 1fr; gap: 12px; }
    .game-cover { aspect-ratio: 16/10; }
    
    .blog-grid { grid-template-columns: 1fr; gap: 12px; }
    .blog-cover { aspect-ratio: 16/10; }
    
    .community-item { flex-direction: column; text-align: center; padding: 15px; }
    .community-avatar { margin: 0 auto; }
    .community-time { display: none; }
    
    .login-wrapper { padding: 15px 10px; }
    .login-form { padding: 25px 15px; }
    .login-header h2 { font-size: 22px; }
    .btn-primary { padding: 14px; font-size: 15px; }
    
    .footer { padding: 25px 15px; }
    .footer-links { gap: 12px; }
    .footer-links a { font-size: 13px; }
    .footer-copyright { font-size: 12px; }
}

/* 超小手机 (320px) */
@media (max-width: 320px) {
    .banner { height: 180px; }
    .banner-title { font-size: 18px; }
    .banner-overlay { padding: 15px; }
    .game-card { border-radius: 8px; }
    .login-form { padding: 20px 12px; }
}

/* 横屏适配 */
@media (max-height: 500px) and (orientation: landscape) {
    .banner { height: 200px; }
    .banner-overlay { padding: 15px 40px; }
    .game-grid { grid-template-columns: repeat(4, 1fr); }
}

/* 高分辨率屏幕 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .navbar-logo img, .footer-logo { image-rendering: -webkit-optimize-contrast; }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .game-card:hover { transform: none; }
    .game-card:active { transform: scale(0.98); }
    .blog-card:hover { transform: none; }
    .blog-card:active { transform: scale(0.98); }
    .community-item:hover { background: transparent; }
}
