/* RTema Style Game Cards & Category Cards */

/* Section Enhancements - Premium Style */
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color, #6366f1), transparent);
    border-radius: 2px;
}

.section-heading h2 {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color, #111827);
    margin: 0;
    letter-spacing: -0.5px;
}

.section-heading h2 i {
    font-size: 26px;
    color: var(--primary-color, #6366f1);
    transition: transform 0.3s ease;
}

.section-heading:hover h2 i {
    transform: scale(1.1) rotate(-5deg);
}

.section-heading a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color, #6366f1);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 10px 18px;
    border-radius: 10px;
    background: var(--primary-light, rgba(99, 102, 241, 0.1));
    border: 1px solid transparent;
}

.section-heading a:hover {
    gap: 12px;
    background: var(--primary-color, #6366f1);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    border-color: var(--primary-color, #6366f1);
}

.section-heading a i {
    font-size: 13px;
    transition: transform 0.3s ease;
}

.section-heading a:hover i {
    transform: translateX(3px);
}

@media (max-width: 768px) {
    .section-heading {
        margin-bottom: 30px;
        gap: 16px;
    }
    
    .section-heading h2 {
        font-size: 22px;
        gap: 12px;
    }
    
    .section-heading h2 i {
        font-size: 20px;
    }
    
    .section-heading a {
        padding: 9px 16px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .section-heading {
        margin-bottom: 24px;
        gap: 12px;
    }
    
    .section-heading h2 {
        font-size: 19px;
        gap: 10px;
    }
    
    .section-heading h2 i {
        font-size: 18px;
    }
    
    .section-heading a {
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* Section Padding */
.section-padding {
    padding: 60px 0;
}

.section-padding.pt-0 {
    padding-top: 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 40px 0;
    }
}

/* Game Pills Row */
.game-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    margin-bottom: 20px;
}

.game-pill-row::-webkit-scrollbar {
    height: 6px;
}

.game-pill-row::-webkit-scrollbar-track {
    background: transparent;
}

.game-pill-row::-webkit-scrollbar-thumb {
    background: rgba(var(--primary-rgb), 0.3);
    border-radius: 3px;
}

.game-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    background: var(--card-background, #f8f9fa);
    border: 2px solid var(--border-color, #e0e0e0);
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-color, #333);
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.game-pill::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-color, #6366f1), var(--primary-color, #818cf8));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.game-pill:hover::before {
    opacity: 0.1;
}

.game-pill:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color, #6366f1);
    color: var(--primary-color, #6366f1);
}

.game-pill__media {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    flex-shrink: 0;
}

.game-pill__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Colorful Game Cards - Premium Modern Design */
.game-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
    padding: 4px;
}

@media (max-width: 1200px) {
    .game-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .game-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 576px) {
    .game-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

.game-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    display: block;
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transform-style: preserve-3d;
}

/* Performance optimization - reduce animations on mobile */
@media (max-width: 768px) {
    .game-card:hover {
        transform: translateY(-6px) scale(1.03);
    }
    
    .game-card:hover .game-card__character {
        transform: scale(1.08);
    }
    
    .game-card::after {
        display: none;
    }
}

.game-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--game-color-1), var(--game-color-2));
    border-radius: 22px;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.game-card:hover::before {
    opacity: 0.3;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.5; }
}

.game-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(var(--game-color-1-rgb, 99, 102, 241), 0.3) inset,
        0 0 80px rgba(var(--game-color-1-rgb, 99, 102, 241), 0.3);
}

.game-card__background {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--game-color-1), var(--game-color-2));
    opacity: 0.05;
    z-index: 1;
}

.game-card__pattern {
    display: none;
}

.game-card__character {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 2;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-card:hover .game-card__character {
    transform: scale(1.15);
}

.game-card__logo {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
}

.game-card:hover .game-card__logo {
    transform: translateY(-3px) scale(1.05);
}

.game-card__logo img {
    max-width: 70%;
    max-height: 60px;
    object-fit: contain;
    filter: 
        drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4))
        drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
    transition: filter 0.5s ease;
}

.game-card:hover .game-card__logo img {
    filter: 
        drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5))
        drop-shadow(0 0 20px rgba(255, 255, 255, 0.2))
        brightness(1.1);
}

.game-card__title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 4;
    color: white;
    font-size: 17px;
    font-weight: 800;
    text-align: center;
    padding: 20px 16px;
    background: 
        linear-gradient(to top, 
            rgba(0, 0, 0, 0.95) 0%, 
            rgba(0, 0, 0, 0.7) 60%,
            transparent 100%
        );
    backdrop-filter: blur(12px);
    text-shadow: 
        0 2px 12px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(var(--game-color-1-rgb, 99, 102, 241), 0.3);
    transition: all 0.4s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.game-card:hover .game-card__title {
    padding: 24px 16px;
    background: 
        linear-gradient(to top, 
            rgba(0, 0, 0, 0.98) 0%, 
            rgba(0, 0, 0, 0.8) 70%,
            transparent 100%
        );
    text-shadow: 
        0 3px 16px rgba(0, 0, 0, 0.9),
        0 0 40px rgba(var(--game-color-1-rgb, 99, 102, 241), 0.8);
}

.game-card__title::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, transparent, white, transparent);
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.game-card:hover .game-card__title::before {
    width: 80%;
}

@media (max-width: 576px) {
    .game-card__title {
        font-size: 13px;
        padding: 16px 12px;
    }
    
    .game-card:hover .game-card__title {
        padding: 18px 12px;
    }
}

/* Game Color Variants with Enhanced Styling */
.game-card--valorant {
    --game-color-1: #ff4655;
    --game-color-2: #ff70a6;
    --game-color-1-rgb: 255, 70, 85;
}

.game-card--lol {
    --game-color-1: #c89b3c;
    --game-color-2: #f0e6d2;
    --game-color-1-rgb: 200, 155, 60;
}

.game-card--gta {
    --game-color-1: #75c949;
    --game-color-2: #a7eb7d;
    --game-color-1-rgb: 117, 201, 73;
}

.game-card--pubg {
    --game-color-1: #f5a623;
    --game-color-2: #f8d676;
    --game-color-1-rgb: 245, 166, 35;
}

.game-card--brawl {
    --game-color-1: #4ade80;
    --game-color-2: #86efac;
    --game-color-1-rgb: 74, 222, 128;
}

.game-card--ml {
    --game-color-1: #a855f7;
    --game-color-2: #c084fc;
    --game-color-1-rgb: 168, 85, 247;
}

/* Default colors for cards without specific color variants */
.game-card {
    --game-color-1: #6366f1;
    --game-color-2: #818cf8;
    --game-color-1-rgb: 99, 102, 241;
}

/* Category Showcase Cards - Modern Design */
.category-showcase__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

@media (max-width: 992px) {
    .category-showcase__grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .category-showcase__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.category-card {
    background: var(--card-background, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 18px;
    padding: 28px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color, #6366f1), var(--primary-color, #818cf8));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color, #6366f1);
}

.category-card__title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-color, #111827);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    transition: all 0.3s ease;
}

.category-card:hover .category-card__title {
    transform: translateX(4px);
}

.category-card__title i {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light, #eef2ff);
    color: var(--primary-color, #6366f1);
    border-radius: 14px;
    font-size: 20px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.category-card:hover .category-card__title i {
    transform: rotate(5deg) scale(1.1);
    background: var(--primary-color, #6366f1);
    color: white;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.category-card p {
    color: var(--text-secondary, #6b7280);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.category-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--tag-background, #f3f4f6);
    color: var(--text-color, #374151);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid transparent;
}

.category-tag:hover {
    background: var(--primary-light, #eef2ff);
    color: var(--primary-color, #6366f1);
    transform: translateY(-2px) scale(1.05);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.15);
}

.category-tag i {
    font-size: 11px;
    transition: transform 0.3s ease;
}

.category-tag:hover i {
    transform: scale(1.2);
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color, #6366f1);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.btn-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color, #6366f1);
    transition: width 0.3s ease;
}

.btn-link:hover {
    gap: 12px;
    transform: translateX(4px);
}

.btn-link:hover::after {
    width: 100%;
}

.btn-link i {
    transition: transform 0.3s ease;
}

.btn-link:hover i {
    transform: translateX(4px);
}

/* Enhanced Shine/Glare Effect on Hover */
.game-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.15) 48%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.15) 52%,
        transparent 70%
    );
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    transition: transform 0.8s ease-out;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
}

.game-card:hover::after {
    transform: translateX(100%) translateY(100%) rotate(45deg);
    opacity: 1;
}

/* Smooth scroll for grid */
.game-cards-grid {
    scroll-behavior: smooth;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .game-card,
    .game-card *,
    .game-card::before,
    .game-card::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .game-card:hover {
        transform: none;
    }
}

/* Accessibility - Focus States */
.game-card:focus-visible {
    outline: 3px solid var(--primary-color, #6366f1);
    outline-offset: 4px;
}

.category-card:focus-visible,
.game-pill:focus-visible,
.category-tag:focus-visible,
.btn-link:focus-visible {
    outline: 2px solid var(--primary-color, #6366f1);
    outline-offset: 3px;
}

/* Loading skeleton animation (optional enhancement) */
@keyframes shimmer-loading {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Dark Mode Support */
[data-theme="dark"] .game-pill {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
}

[data-theme="dark"] .game-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color, #6366f1);
}

[data-theme="dark"] .game-card {
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

[data-theme="dark"] .game-card:hover {
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset,
        0 0 50px rgba(var(--game-color-1-rgb, 99, 102, 241), 0.5);
}

[data-theme="dark"] .category-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .category-card:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .category-card__title {
    color: #f9fafb;
}

[data-theme="dark"] .category-card__title i {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

[data-theme="dark"] .category-card:hover .category-card__title i {
    background: #6366f1;
    color: white;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.5);
}

[data-theme="dark"] .category-card p {
    color: #9ca3af;
}

[data-theme="dark"] .category-tag {
    background: rgba(255, 255, 255, 0.05);
    color: #d1d5db;
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .category-tag:hover {
    background: rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .section-heading h2 {
    color: #f9fafb;
}

[data-theme="dark"] .section-heading h2 i {
    color: #818cf8;
}

[data-theme="dark"] .section-heading a {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

[data-theme="dark"] .section-heading a:hover {
    background: #6366f1;
    color: white;
}

/* Light Theme Support - Premium Design */
[data-theme="light"] .game-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.05) inset;
}

[data-theme="light"] .game-card:hover {
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(var(--game-color-1-rgb, 99, 102, 241), 0.2) inset,
        0 0 80px rgba(var(--game-color-1-rgb, 99, 102, 241), 0.15);
}

[data-theme="light"] .game-card__title {
    background: 
        linear-gradient(to top, 
            rgba(0, 0, 0, 0.92) 0%, 
            rgba(0, 0, 0, 0.6) 60%,
            transparent 100%
        );
    color: white;
    text-shadow: 
        0 2px 12px rgba(0, 0, 0, 0.9),
        0 0 20px rgba(var(--game-color-1-rgb, 99, 102, 241), 0.2);
}

[data-theme="light"] .game-card:hover .game-card__title {
    background: 
        linear-gradient(to top, 
            rgba(0, 0, 0, 0.98) 0%, 
            rgba(0, 0, 0, 0.75) 70%,
            transparent 100%
        );
    text-shadow: 
        0 3px 16px rgba(0, 0, 0, 0.95),
        0 0 40px rgba(var(--game-color-1-rgb, 99, 102, 241), 0.6);
}

[data-theme="light"] .section-heading h2 {
    color: #111827;
}

[data-theme="light"] .section-heading h2 i {
    color: #6366f1;
}

[data-theme="light"] .section-heading a {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

[data-theme="light"] .section-heading a:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-color: #6366f1;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

