/* ================= ULTRA-MODERN GAME CARDS ================= */

/* FEATURED CARDS - MODERN UPGRADE */
.featured-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(25, 35, 55, 0.9) 100%);
    border: 1px solid rgba(0, 255, 204, 0.2);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: cardSlideIn 0.6s ease-out both;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.featured-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 24px 48px rgba(0, 255, 204, 0.2);
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(20, 30, 50, 0.98) 0%, rgba(30, 45, 65, 0.95) 100%);
}

.featured-card-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.featured-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.featured-card:hover .featured-card-image img {
    transform: scale(1.1) rotate(2deg);
    filter: brightness(1.1);
}

.featured-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.featured-card:hover .featured-overlay {
    opacity: 1;
}

.trending-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.15) 0%, rgba(56, 189, 248, 0.15) 100%);
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(0, 255, 204, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.badge:hover {
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.25) 0%, rgba(56, 189, 248, 0.25) 100%);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 255, 204, 0.2);
}

.platform-badge {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.3);
}

.genre-badge {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: #c4b5fd;
    border-color: rgba(168, 85, 247, 0.3);
}

.featured-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.card-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.card-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    flex-grow: 1;
}

.featured-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid rgba(0, 255, 204, 0.1);
    border-bottom: 1px solid rgba(0, 255, 204, 0.1);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.meta-value {
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #00e6b8 100%);
    color: #000;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 255, 204, 0.3);
    background: linear-gradient(135deg, #00e6b8 0%, #00ccb3 100%);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-icon {
    font-size: 16px;
}

.btn-text {
    font-size: 13px;
}

/* REGULAR GAME CARDS - ULTRA MODERN */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 18px;
    padding: 10px;
}

.game-card {
    background: linear-gradient(135deg, rgba(20, 30, 50, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(0, 255, 204, 0.15);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: cardFadeIn 0.5s ease-out both;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    height: 100%;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: var(--primary-color);
    box-shadow: 0 16px 40px rgba(0, 255, 204, 0.2);
    background: linear-gradient(135deg, rgba(25, 40, 60, 0.95) 0%, rgba(20, 30, 50, 0.95) 100%);
}

.card-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 140px;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-card:hover .card-image {
    transform: scale(1.12) rotate(-2deg);
    filter: brightness(1.15) saturate(1.2);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.1) 0%, rgba(56, 189, 248, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.card-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #000;
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 5;
    box-shadow: 0 8px 16px rgba(0, 255, 204, 0.4);
}

.game-card:hover .card-play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.play-icon {
    margin-left: 2px;
    font-size: 20px;
}

.trending-badge-small {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff6b6b;
    font-size: 18px;
    padding: 4px 6px;
    border-radius: 8px;
    z-index: 8;
    animation: pulse 2s ease-in-out infinite;
}

.game-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.card-badges {
    display: flex;
    gap: 8px;
    align-items: center;
}

.badge-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    transition: all 0.3s ease;
}

.game-card:hover .badge-small {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.3) 0%, rgba(168, 85, 247, 0.3) 100%);
    transform: scale(1.1);
}

.badge-rating {
    font-size: 12px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(255, 152, 0, 0.15) 100%);
    color: #ffc107;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 193, 7, 0.2);
    font-weight: 600;
    margin-left: auto;
}

.card-title-sm {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    font-size: 12px;
    color: var(--text-tertiary);
    margin: 0;
}

.btn-sm {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #0ea5e9 100%);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: auto;
}

.btn-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(56, 189, 248, 0.3);
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

.btn-sm:active {
    transform: translateY(0) scale(0.96);
}

/* EMPTY STATE */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state h3 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 700;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-tertiary);
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 14px;
    }

    .featured-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 16px;
    }

    .card-title {
        font-size: 18px;
    }

    .btn-primary {
        padding: 10px 20px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
        padding: 8px;
    }

    .featured-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card-image-wrapper {
        height: 120px;
    }

    .card-title-sm {
        font-size: 14px;
    }

    .btn-sm {
        padding: 8px 12px;
        font-size: 11px;
    }
}

/* ANIMATION DELAYS */
.game-card:nth-child(1) { animation-delay: 0s; }
.game-card:nth-child(2) { animation-delay: 0.06s; }
.game-card:nth-child(3) { animation-delay: 0.12s; }
.game-card:nth-child(4) { animation-delay: 0.18s; }
.game-card:nth-child(5) { animation-delay: 0.24s; }
.game-card:nth-child(6) { animation-delay: 0.3s; }
.game-card:nth-child(n+7) { animation-delay: 0.36s; }

.featured-card:nth-child(1) { animation-delay: 0s; }
.featured-card:nth-child(2) { animation-delay: 0.1s; }
.featured-card:nth-child(3) { animation-delay: 0.2s; }
.featured-card:nth-child(4) { animation-delay: 0.3s; }
.featured-card:nth-child(5) { animation-delay: 0.4s; }
.featured-card:nth-child(6) { animation-delay: 0.5s; }
