:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #ffffff;
    --accent-color: #00d2ff;
    --accent-hover: #3a7bd5;
    --footer-bg: #0a0a0a;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --card-hover-shadow: 0 8px 12px rgba(0, 0, 0, 0.5);
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    padding: 20px 40px;
    background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-color);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

#search-input {
    width: 100%;
    padding: 12px 20px;
    border-radius: 25px;
    border: 2px solid transparent;
    background-color: #2d2d2d;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

#search-input:focus {
    background-color: #3d3d3d;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(0, 210, 255, 0.1);
}

main {
    flex: 1;
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.game-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    box-shadow: var(--card-shadow);
}

.game-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--card-hover-shadow);
    z-index: 1;
}

.game-thumbnail {
    flex: 1;
    background: linear-gradient(45deg, #2c3e50, #3498db);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    text-transform: uppercase;
    color: rgba(255,255,255,0.2);
}

.game-info {
    padding: 15px;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    position: absolute;
    bottom: 0;
    width: 100%;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.game-card:hover .game-info {
    transform: translateY(0);
}

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

footer {
    background-color: var(--footer-bg);
    padding: 30px 20px;
    margin-top: auto;
    border-top: 1px solid #333;
}

.beian-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    color: #888;
    font-size: 0.9rem;
}

.beian-item {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #888;
    transition: color 0.2s ease;
}

.beian-item:hover {
    color: var(--accent-color);
}

.beian-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    main {
        padding: 20px;
    }
}
