/* CSS Variables for Theming */
:root {
    --bg: #050510;
    --card: rgba(30, 41, 59, 0.7);
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --accent: #f59e0b;
}

/* Reset and Base Styles */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
    background-color: var(--bg);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(56, 189, 248, 0.15) 0%, transparent 50%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    background-position: 0 0, 0 0, 0 0, 0 0;
    background-attachment: fixed;
    color: var(--text); 
    line-height: 1.5; 
    min-height: 100vh;
}

/* Header & Navigation */
header { 
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(12px);
    padding: 1rem 2rem; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
    position: sticky; 
    top: 0; 
    z-index: 100; 
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.top-nav {
    display: flex;
    gap: 1.5rem;
}

.top-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.top-nav a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.logo { 
    font-size: 1.5rem; 
    font-weight: 900; 
    color: var(--text); 
    text-decoration: none; 
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px rgba(96, 165, 250, 0.4);
}

.search-bar { 
    padding: 0.75rem 1.25rem; 
    border-radius: 30px; 
    border: 1px solid var(--border); 
    background: var(--bg); 
    color: var(--text); 
    width: 100%; 
    max-width: 450px; 
    outline: none; 
    transition: all 0.2s ease; 
    font-size: 0.95rem;
}

.search-bar:focus { 
    border-color: var(--primary); 
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Layout */
.container { 
    max-width: 1280px; 
    margin: 0 auto; 
    padding: 2rem 1.5rem; 
}

/* Hero Section */
.hero { 
    text-align: center; 
    padding: 3rem 1rem 4rem; 
}

.hero h1 { 
    font-size: 3rem; 
    margin-bottom: 1rem; 
    font-weight: 900;
    background: linear-gradient(135deg, #818cf8, #c084fc); 
    -webkit-background-clip: text; 
    color: transparent; 
    letter-spacing: -1px;
}

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

/* Category Filters */
.categories { 
    display: flex; 
    gap: 0.75rem; 
    justify-content: center; 
    margin-bottom: 2rem; 
    flex-wrap: wrap; 
}

.category-btn { 
    background: var(--card); 
    border: 1px solid var(--border); 
    color: var(--text); 
    padding: 0.6rem 1.5rem; 
    border-radius: 30px; 
    cursor: pointer; 
    font-weight: 600; 
    transition: all 0.2s ease; 
    font-size: 0.95rem;
}

.category-btn:hover, .category-btn.active { 
    background: var(--primary); 
    border-color: var(--primary); 
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Sections */
.section {
    margin-bottom: 4rem;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.section-header h2 {
    font-size: 1.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    color: transparent;
}
.more-games-container {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}
.more-btn {
    background: linear-gradient(135deg, var(--primary), #c084fc);
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}
.more-btn:hover {
    transform: translateY(-3px) ;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.6);
}

/* Small Games Grid (Like Poki) */
.games-grid, .featured-grid, .all-games-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); 
    gap: 0.75rem; 
}

@media (min-width: 640px) {
    .games-grid, .featured-grid, .all-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }
}

.game-card { 
    background: var(--card); 
    border-radius: 12px; 
    overflow: hidden; 
    border: 2px solid transparent; 
    text-decoration: none; 
    color: inherit; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    display: block;
    position: relative;
    display: flex; flex-direction: column; aspect-ratio: 1 / 1;
}

.game-card:hover { 
    transform: translateY(-8px) ; 
    border-color: #a78bfa; 
    box-shadow: 0 15px 30px rgba(167, 139, 250, 0.3), 0 0 15px rgba(167, 139, 250, 0.5); 
    z-index: 10;
}

.game-image {
    flex: 1;
    min-height: 0;
    width: 100%;
    height: auto; 
    object-fit: cover; 
    transition: transform 0.5s ease;
}

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

.game-info {
    height: 95px;

    flex-shrink: 0;
    position: relative;
    padding: 0.85rem 0.5rem;
    background: #1e293b;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.game-title { 
    font-size: 0.9rem; 
    font-weight: 800; 
    margin-bottom: 0.15rem; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.game-meta { 
    font-size: 0.7rem; 
    color: #e2e8f0; 
    display: flex; 
    justify-content: center; 
    gap: 0.75rem;
    align-items: center; 
    font-weight: 700;
}

.tag { 
    display: none; 
}

.featured-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: #f59e0b;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 2;
}

/* Empty State */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    background: var(--card);
    border-radius: 16px;
    border: 1px dashed var(--border);
}

/* Game Details Page */
.back-btn { 
    display: inline-block; 
    margin-bottom: 2rem; 
    color: var(--text-muted); 
    text-decoration: none; 
    font-weight: 600;
    transition: color 0.2s ease; 
}

.back-btn:hover { 
    color: var(--primary); 
}

.game-details { 
    display: grid; 
    grid-template-columns: 2fr 1fr; 
    gap: 2rem; 
}

.game-player { 
    background: #000; 
    border-radius: 16px; 
    overflow: hidden; 
    position: relative; 
    aspect-ratio: 16 / 9; 
    border: 1px solid var(--border);
}

.game-banner { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    /* opacity: 0.6; */
    /* filter: brightness(0.7); */
    transition: all 0.3s ease;
}
.game-player:hover .game-banner {
    /* opacity: 0.8; */
    /* filter: brightness(0.9); */
}

.play-overlay { 
    position: absolute; 
    inset: 0; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
}

.play-btn { 
    background: var(--primary); 
    color: white; 
    border: none; 
    padding: 1.25rem 3rem; 
    font-size: 1.25rem; 
    font-weight: 800; 
    border-radius: 40px; 
    cursor: pointer; 
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease; 
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.play-btn:hover { 
    transform: ; 
    background: var(--primary-hover); 
}

.game-info-full { 
    background: var(--card); 
    border: 1px solid var(--border); 
    border-radius: 16px; 
    padding: 2rem; 
}

.game-info-full h1 { 
    font-size: 2.25rem; 
    margin-bottom: 1rem; 
    font-weight: 900;
}

.game-meta-full { 
    display: flex; 
    gap: 1.5rem; 
    color: var(--text-muted); 
    margin-bottom: 2rem; 
    font-size: 0.95rem; 
    flex-wrap: wrap; 
    font-weight: 600;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.game-info-full h2 { 
    font-size: 1.25rem; 
    margin-bottom: 1rem; 
    color: var(--text); 
}

.game-info-full p { 
    color: var(--text-muted); 
    line-height: 1.7; 
}

.game-rules {
    color: var(--text-muted);
    line-height: 1.7;
    margin-top: 1rem;
    padding-left: 1.25rem;
}

.game-rules li {
    margin-bottom: 0.5rem;
}

/* Game Modal Styles */
.game-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 1000;
    flex-direction: column;
}

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

.game-modal-header {
    height: 70px;
    border-bottom: 2px solid var(--primary);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 10;
}

.game-modal-header h2 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.game-controls {
    display: flex;
    gap: 0.75rem;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.2s;
}

.control-btn svg {
    width: 18px;
    height: 18px;
}

.control-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.exit-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.exit-btn:hover {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.game-modal-body {
    flex: 1;
    position: relative;
    background: #000;
    min-height: 0;
    overflow: hidden;
}

.game-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: #000;
    display: block;
}

/* SEO Footer */
.site-footer {
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 3rem 1.5rem 1.5rem;
    margin-top: 4rem;
}
.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-col h3 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}
.footer-col ul {
    list-style: none;
}
.footer-col ul li {
    margin-bottom: 0.5rem;
}
.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.9rem;
}
.footer-col a:hover {
    color: var(--primary);
}
.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Mobile Responsiveness */
@media (max-width: 860px) {
    .header-left {
        flex-direction: column;
        gap: 1rem;
    }
    .top-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    .game-details { 
        grid-template-columns: 1fr; 
    }
}

@media (max-width: 640px) {
    header { 
        flex-direction: column; 
        gap: 1rem; 
        padding: 1rem;
    }
    .search-bar { 
        max-width: 100%; 
    }
    .hero h1 {
        font-size: 2.25rem;
    }
}

/* Modern Game Thumbnails */
.game-card {
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
}
.game-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.5), 0 0 15px rgba(99, 102, 241, 0.3);
}

.game-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.9);
}
.game-image {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.game-card:hover .game-image {
    transform: scale(1.1);
}
.featured-badge {
    background: linear-gradient(45deg, #ef4444, #f97316);
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.4);
    letter-spacing: 1px;
}

/* Fix game title wrapping */
.game-title {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    font-size: 0.9rem !important; /* Slightly smaller to fit better */
}


/* Focus mode style for game image */
main:nth-of-type(1) > div#game-details:nth-of-type(1) > div:nth-of-type(1) > img#game-image:nth-of-type(1) {
    border-radius: inherit;
    object-position: center;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}




/* --- Robust Thumbnail & Layout Fixes --- */
.game-card {
    aspect-ratio: auto !important; 
    display: flex !important;
    flex-direction: column !important;
    border-radius: 16px !important;
    background: #1e293b !important;
    overflow: visible !important;
}

.game-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* Perfect square for image area */
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    flex-shrink: 0;
}

.game-image {
    position: absolute !important;
    top: 0; left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.game-card:hover .game-image {
    transform: scale(1.15) !important;
}

/* Aesthetic Layers / Overlays */
.img-overlay {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(to bottom, rgba(30, 41, 59, 0) 65%, #1e293b 100%),
        radial-gradient(circle at center, transparent 40%, rgba(0,0,0,0.5) 100%);
    box-shadow: inset 0 2px 10px rgba(255,255,255,0.1);
    pointer-events: none;
    z-index: 1;
    transition: all 0.3s ease;
}

.game-card:hover .img-overlay {
    background: 
        linear-gradient(to bottom, rgba(30, 41, 59, 0) 50%, #1e293b 100%),
        linear-gradient(45deg, rgba(139, 92, 246, 0.35) 0%, transparent 70%);
}

.game-info {
    position: relative !important;
    height: 90px !important; /* Fixed container height for all games */
    flex-shrink: 0 !important;
    background: #1e293b !important;
    padding: 0.5rem 0.75rem !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    border-radius: 0 0 16px 16px !important;
    z-index: 2;
}

.game-title {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    color: #fff !important;
    text-align: center !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5) !important;
    margin-bottom: 0.35rem !important;
}

.game-meta {
    margin: 0 !important;
    z-index: 3;
}

/* --- Vignette & Feather Effects --- */
.game-image-wrapper {
    background: #0f172a !important; /* dark base behind image */
}

.img-overlay {
    background: 
        linear-gradient(to bottom, rgba(30, 41, 59, 0) 50%, #1e293b 100%),
        radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.75) 120%) !important;
    box-shadow: 
        inset 0 0 40px rgba(0, 0, 0, 0.8),
        inset 0 0 20px rgba(0, 0, 0, 0.6) !important;
    mix-blend-mode: multiply; /* Helps feathering blend smoothly into the image */
}

/* We need a secondary overlay for the bottom gradient since mix-blend-mode: multiply might ruin the color matching at the bottom */
.game-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(30, 41, 59, 0) 65%, #1e293b 100%);
    pointer-events: none;
    z-index: 2;
}

.game-card:hover .img-overlay {
    background: 
        radial-gradient(circle at center, transparent 20%, rgba(0, 0, 0, 0.8) 120%) !important;
    box-shadow: 
        inset 0 0 50px rgba(0, 0, 0, 0.9),
        inset 0 0 25px rgba(0, 0, 0, 0.7) !important;
}

.game-card:hover .game-image-wrapper::after {
    background: 
        linear-gradient(to bottom, rgba(30, 41, 59, 0) 50%, #1e293b 100%),
        linear-gradient(45deg, rgba(139, 92, 246, 0.35) 0%, transparent 70%);
}

/* --- Square Overlaid Thumbnails --- */
.game-card {
    aspect-ratio: 1 / 1 !important;
    display: block !important; /* Remove flex column */
    border-radius: 16px !important;
    background: transparent !important;
    overflow: hidden !important;
    position: relative !important;
    padding: 0 !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
}

.game-card:hover {
    border-color: var(--primary) !important;
}

.game-image-wrapper {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: auto !important;
    border-radius: 0 !important;
}

.game-image {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.img-overlay {
    /* Retain the aesthetic vignette but remove the solid background */
    background: radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.75) 120%) !important;
    box-shadow: 
        inset 0 0 40px rgba(0, 0, 0, 0.8),
        inset 0 0 20px rgba(0, 0, 0, 0.6) !important;
    mix-blend-mode: multiply !important;
    z-index: 1 !important;
}

.game-image-wrapper::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    /* Smooth gradient from transparent to dark at bottom for text */
    background: linear-gradient(to bottom, transparent 30%, rgba(0, 0, 0, 0.95) 100%) !important;
    pointer-events: none !important;
    z-index: 2 !important;
}

.game-card:hover .img-overlay {
    background: radial-gradient(circle at center, transparent 20%, rgba(0, 0, 0, 0.8) 120%) !important;
}

.game-card:hover .game-image-wrapper::after {
    /* Colorful bottom gradient on hover */
    background: 
        linear-gradient(to bottom, transparent 30%, rgba(0, 0, 0, 0.9) 100%),
        linear-gradient(45deg, rgba(139, 92, 246, 0.4) 0%, transparent 80%) !important;
}

.game-info {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    background: transparent !important; /* Remove dark box */
    padding: 1rem 0.75rem !important;
    z-index: 3 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: center !important;
    border-radius: 0 !important;
}

.game-title {
    font-size: 1rem !important;
    font-weight: 800 !important;
    color: #fff !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.9), 0 1px 3px rgba(0,0,0,0.8) !important;
    margin-bottom: 0.25rem !important;
}

.game-meta {
    z-index: 3 !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8) !important;
}

/* --- Title Alignment & Highlight --- */
.game-title {
    font-size: 1.15rem !important;
    font-weight: 900 !important;
    color: var(--primary) !important; /* Highlight text with primary color */
    text-shadow: 
        0 0 10px rgba(139, 92, 246, 0.8),
        0 0 20px rgba(139, 92, 246, 0.4),
        0 2px 4px rgba(0,0,0,1) !important; /* Glowing effect */
    text-align: center !important;
    white-space: normal !important;
    display: block !important; /* Remove line clamp to show full text */
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    line-height: 1.2 !important;
    width: 100% !important;
    padding: 0 0.5rem !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important; /* Make it look more prominent */
}

/* On hover, make the glow even stronger */

/* Ensure the info container expands nicely if title is long */
.game-info {
    height: auto !important;
    padding-bottom: 1.25rem !important;
    justify-content: center !important;
}

.game-meta {
    margin-top: 0.25rem !important;
    font-size: 0.85rem !important;
}

/* --- Revert Title Color to White and Add Hover Animation --- */
.game-title {
    color: #ffffff !important; /* White text like reference */
    font-weight: 900 !important;
    font-size: 1.3rem !important;
    text-transform: uppercase !important;
    text-shadow: 
        0 4px 10px rgba(0,0,0,0.9), 
        0 2px 4px rgba(0,0,0,0.8) !important; /* Dark drop shadow for contrast */
    transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.3s ease !important;
}

/* Hover color animation for the title on all cards */
.game-card:hover .game-title {
    color: #ffffff !important; /* keep white */
    text-shadow: 
        0 4px 15px rgba(0,0,0,0.9),
        0 2px 8px rgba(0,0,0,0.8),
        0 0 20px rgba(255,255,255,0.3) !important;
    transform: scale(1.05) !important;
}

/* Fix text overlay/overlap issues */
.game-title {
    font-size: 1.1rem !important; /* Slightly smaller to prevent overlap */
    line-height: 1.25 !important;
    word-break: break-word !important; /* Prevent long words from overflowing */
    padding: 0 0.25rem !important;
    margin-bottom: 0.5rem !important;
}

/* Image opacity animation on hover */
.game-image {
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease !important;
}

.game-card:hover .game-image {
    transform: scale(1.15) !important;
    opacity: 0.6 !important; /* Dim the image on hover */
}

/* Add more visible border to thumbnails */
.game-card {
    border: 3px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
}

.game-card:hover {
    border-color: #ef4444 !important; /* Match the hot tag color for the hover border */
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4) !important;
}
