/* Game Card Design - Based on Example Template */
:root {
    --card-bg: #1a1a1a;
    --card-hover-bg: #242424;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --badge-free: #2ecc71;
    --badge-vip: #f39c12;
    --badge-hot: #e74c3c;
    --platform-pc: #27ae60;
    --platform-android: #3498db;
    --tag-rpg: #9b59b6;
    --tag-visual-novel: #e67e22;
    --border-radius: 8px;
}

/* Game Card Container */
.game-card-modern {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
    text-decoration: none;
    height: 100%;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.game-card-modern:hover {
    background: var(--card-hover-bg);
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(155, 44, 136, 0.25);
}

/* Game Image Container */
.game-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background: #000;
}

.game-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fill the container while maintaining aspect ratio */
    object-position: center; /* Center the image */
    transition: none; /* Remove transform transition to prevent any scaling */
}

/* Image hover effects removed - no scaling */
.game-card-modern:hover .game-image-wrapper img {
    transform: none;
}

/* Status Badge (Free/VIP/Hot) */
.game-status-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 2;
    letter-spacing: 0.5px;
}

.badge-free {
    background: var(--badge-free);
    color: white;
}

.badge-vip {
    background: var(--badge-vip);
    color: white;
}

.badge-hot {
    background: var(--badge-hot);
    color: white;
    animation: pulse 2s infinite;
}

/* Platform Badge */
.game-platform-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 2;
}

/* When there are multiple badges, stack them vertically */
.game-image-wrapper .game-platform-badge:nth-of-type(2) {
    top: 32px; /* Position below the first badge */
}

.platform-pc {
    background: var(--platform-pc);
    color: white;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.platform-android {
    background: var(--platform-android);
    color: white;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* Game Info Section */
.game-card-info {
    padding: 15px;
}

/* Game Title */
.game-card-title {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 36px;
}

/* Game Tags */
.game-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.game-tag {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    background: #2d2d2d;
    color: #808080;
    border: 1px solid #3d3d3d;
}

.tag-rpg {
    background: rgba(155, 89, 182, 0.2);
    color: #9b59b6;
    border-color: #9b59b6;
}

.tag-visual-novel {
    background: rgba(230, 126, 34, 0.2);
    color: #e67e22;
    border-color: #e67e22;
}

.tag-action {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border-color: #e74c3c;
}

.tag-horror {
    background: rgba(155, 44, 136, 0.2);
    color: #9b2c88;
    border-color: #9b2c88;
}

/* Game Stats */
.game-card-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
    padding-top: 8px;
    border-top: 1px solid #2d2d2d;
}

.game-stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.game-stat-item i {
    font-size: 10px;
}

.stat-views {
    color: #3498db;
}

.stat-rating {
    color: #f39c12;
}

.stat-size {
    color: #95a5a6;
}

.stat-date {
    color: #9b59b6;
}

/* Responsive Grid - Tighter spacing for focus on games */
.games-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    padding: 10px 0;
}

/* Mobile Responsive - Moved to mobile-optimizations.css */

/* Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

/* Loading State */
.game-card-loading {
    background: linear-gradient(90deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

