/* 龙虾游戏网 - 样式表 */

:root {
    --primary: #ff6b35;
    --primary-dark: #e55a2b;
    --secondary: #1a1a2e;
    --secondary-light: #25253d;
    --accent: #ffd700;
    --text: #ffffff;
    --text-muted: #a0a0a0;
    --bg-dark: #0f0f1a;
    --card-bg: #1e1e32;
    --card-hover: #2a2a45;
    --border: #333355;
    --success: #4ade80;
    --shadow: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px var(--shadow);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--text);
    background: var(--card-bg);
}

.nav-link.active {
    color: var(--text);
    background: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.lang-toggle:hover {
    background: var(--card-hover);
    border-color: var(--primary);
}

/* Hero 区域 */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--bg-dark) 50%, var(--secondary-light) 100%);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* 搜索区域 */
.search-section {
    padding: 2rem;
    background: var(--secondary);
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    padding: 1rem 1.5rem;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* 游戏区域 */
.featured-section,
.all-games-section {
    padding: 3rem 2rem;
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 游戏网格 */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

/* 游戏卡片 */
.game-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--shadow);
    background: var(--card-hover);
}

.game-card:hover .game-thumbnail img {
    transform: scale(1.1);
}

.game-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 比例 */
    overflow: hidden;
    background: var(--secondary);
}

.game-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-thumbnail .play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .play-overlay {
    opacity: 1;
}

.play-btn {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.game-card:hover .play-btn {
    transform: scale(1);
}

.game-info {
    padding: 1rem;
}

.game-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.game-category {
    background: var(--secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.game-rating {
    color: var(--accent);
}

/* 关于区域 */
.about-section {
    padding: 4rem 2rem;
    background: var(--secondary);
}

.about-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.about-section p {
    color: var(--text-muted);
    max-width: 800px;
    font-size: 1.1rem;
}

/* 页脚 */
.footer {
    padding: 2rem;
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 游戏弹窗 */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.game-modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text);
}

.modal-body {
    flex: 1;
    min-height: 0;
}

.game-frame-container {
    width: 100%;
    height: 100%;
    min-height: 500px;
    position: relative;
}

.game-frame-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
}

.play-fullscreen-btn {
    background: var(--primary);
    color: var(--text);
    padding: 0.8rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.play-fullscreen-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        padding: 0.6rem 0;
    }
    
    .nav-container {
        flex-wrap: wrap;
        padding: 0 1rem;
        gap: 0.8rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
    
    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 0.3rem;
        padding-top: 0.5rem;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .hero p {
        font-size: 0.95rem;
    }
    
    .search-section {
        padding: 1rem;
    }
    
    .search-input {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }
    
    .search-btn {
        padding: 0.8rem 1rem;
    }
    
    .featured-section,
    .all-games-section {
        padding: 2rem 1rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .section-title {
        font-size: 1.3rem;
        margin-bottom: 1.2rem;
    }
    
    .game-info {
        padding: 0.6rem;
    }
    
    .game-title {
        font-size: 0.85rem;
    }
    
    .game-meta {
        font-size: 0.75rem;
    }
    
    .modal-content {
        max-height: 100vh;
        border-radius: 0;
        max-width: 100%;
    }
    
    .game-frame-container {
        min-height: 60vh;
    }
    
    .about-section {
        padding: 2rem 1rem;
    }
    
    .about-section h2 {
        font-size: 1.4rem;
    }
    
    .about-section p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.5rem 0;
    }
    
    .nav-container {
        padding: 0 0.8rem;
    }
    
    .logo-text {
        display: none;
    }
    
    .hero {
        padding: 1.5rem 0.8rem;
    }
    
    .hero h1 {
        font-size: 1.4rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
    
    .game-card:hover {
        transform: none;
    }
    
    .game-card:active {
        transform: scale(0.98);
    }
    
    .game-info {
        padding: 0.5rem;
    }
    
    .game-title {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }
    
    .game-meta {
        font-size: 0.7rem;
    }
    
    .modal-header {
        padding: 0.8rem 1rem;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
    
    .modal-close {
        font-size: 1.6rem;
    }
    
    .game-frame-container {
        min-height: 55vh;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .game-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .game-card:active {
        transform: scale(0.98);
    }
    
    .game-thumbnail .play-overlay {
        opacity: 1;
        background: rgba(0, 0, 0, 0.4);
    }
    
    .play-btn {
        transform: scale(0.7);
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .nav-link:hover {
        background: transparent;
    }
    
    .nav-link:active {
        background: var(--card-bg);
    }
}

/* 小屏幕手机 */
@media (max-width: 360px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .game-info {
        padding: 0.4rem;
    }
    
    .game-title {
        font-size: 0.75rem;
    }
    
    .game-category {
        font-size: 0.65rem;
        padding: 0.2rem 0.3rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card {
    animation: fadeIn 0.3s ease forwards;
}

.game-card:nth-child(1) { animation-delay: 0.05s; }
.game-card:nth-child(2) { animation-delay: 0.1s; }
.game-card:nth-child(3) { animation-delay: 0.15s; }
.game-card:nth-child(4) { animation-delay: 0.2s; }
.game-card:nth-child(5) { animation-delay: 0.25s; }
.game-card:nth-child(6) { animation-delay: 0.3s; }
.game-card:nth-child(7) { animation-delay: 0.35s; }
.game-card:nth-child(8) { animation-delay: 0.4s; }