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

body {
    font-family: 'Comic Neue', cursive;
    background: #ffeb3b;
    min-height: 100vh;
    color: #333;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(0,0,0,0.03) 35px, rgba(0,0,0,0.03) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(0,0,0,0.03) 35px, rgba(0,0,0,0.03) 70px);
    pointer-events: none;
    z-index: 0;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.content {
    text-align: center;
    max-width: 1400px; 
    width: 100%;
    position: relative;
    z-index: 1;
}

.logo {
    max-width: 250px;
    margin-bottom: 1rem;
    filter: drop-shadow(5px 5px 0px #000) drop-shadow(-2px -2px 0px #fff);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.subtitle {
    font-size: 2rem;
    font-family: 'Bangers', cursive;
    color: #ff1744;
    margin-bottom: 0.8rem;
    font-weight: 400;
    text-shadow: 3px 3px 0px #000, -1px -1px 0px #fff;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --- Search Bar Styles --- */
.search-container {
    margin: 1.5rem auto 2.5rem;
    width: 100%;
    max-width: 500px;
    position: relative;
}

#searchInput {
    width: 100%;
    padding: 16px 28px;
    border: 4px solid #000;
    border-radius: 20px;
    font-size: 1.1rem;
    font-family: 'Comic Neue', cursive;
    font-weight: 700;
    color: #333;
    background: #fff;
    box-shadow: 8px 8px 0px #000, inset 2px 2px 0px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

#searchInput::placeholder {
    color: #999;
    font-style: italic;
}

#searchInput:focus {
    outline: none;
    border-color: #ff1744;
    box-shadow: 8px 8px 0px #ff1744, inset 2px 2px 0px rgba(0,0,0,0.1);
    transform: translate(-2px, -2px);
}

/* --- Game Showcase Styles --- */
.game-showcase {
    display: flex;
    justify-content: center; 
    flex-wrap: wrap;         
    gap: 2rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;
}

/* --- Game card layout --- */
.game-card {
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    border-radius: 0;
    cursor: pointer;
    width: 320px;
    overflow: hidden;
    box-shadow: 10px 10px 0px #000;
    transition: all 0.2s ease;
    border: 4px solid #000;
    display: flex;
    flex-direction: column;
    position: relative;
}

.game-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff1744, #4ecdc4, #ffe66d, #ff1744);
    background-size: 300% 300%;
    animation: borderGlow 3s ease infinite;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

@keyframes borderGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.game-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-bottom: 4px solid #000;
    filter: contrast(1.1) saturate(1.2);
}
 
.game-card:hover {
    transform: translate(-5px, -5px) rotate(1deg);
    box-shadow: 15px 15px 0px #000;
    border-color: #ff1744;
}

.game-card:hover .game-image {
    transform: scale(1.08);
    filter: contrast(1.2) saturate(1.3);
}

.game-card:active {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0px #000;
}
 
.game-content {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 1.2rem 1.5rem;
    text-align: left;
    background: #fff;
}

.game-title {
    font-size: 1.5rem;
    font-family: 'Bangers', cursive;
    font-weight: 400;
    color: #000;
    text-shadow: 2px 2px 0px #ff1744, -1px -1px 0px rgba(255,255,255,0.8);
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1.2;
}

.game-description {
    font-size: 0.95rem;
    font-family: 'Comic Neue', cursive;
    color: #333;
    line-height: 1.5;
    margin-top: 0.5rem;
    font-weight: 400;
}

/* --- Footer and Social Links --- */
.social-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-link {
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.2s ease;
    border: 4px solid #000;
    box-shadow: 6px 6px 0px #000;
    position: relative;
}

.social-link:hover {
    background: #ff1744;
    transform: translate(-3px, -3px) rotate(-5deg);
    box-shadow: 10px 10px 0px #000;
}

.social-link:active {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0px #000;
}

.footer-links {
    margin-top: 1.5rem;
    font-size: 1rem;
    font-family: 'Comic Neue', cursive;
    font-weight: 700;
}

.footer-links a {
    color: #000;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 4px 8px;
    position: relative;
    text-shadow: 1px 1px 0px #fff;
}

.footer-links a:hover {
    color: #ff1744;
    text-shadow: 2px 2px 0px #000;
}

/* --- Total Plays Counter --- */
#total-plays {
    font-size: 1.3rem !important;
    font-family: 'Bangers', cursive;
    color: #000 !important;
    margin-top: 0.5rem !important;
    margin-bottom: 2rem !important;
    text-shadow: 2px 2px 0px #fff, -1px -1px 0px #000;
    letter-spacing: 1px;
    padding: 10px 20px;
    background: #fff;
    border: 3px solid #000;
    box-shadow: 5px 5px 0px #000;
    display: inline-block;
    transform: rotate(-2deg);
    animation: wiggle 3s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

/* --- Responsive Styles --- */
@media (max-width: 1350px) {
    .game-showcase {
        max-width: 800px;
    }
    .game-card {
        width: 380px;
    }
}

@media (max-width: 820px) {
    .game-card {
         width: 100%;
         max-width: 400px;
    }
}

@media (max-width: 768px) {
    .logo {
        max-width: 200px;
    }
    
    .subtitle {
        font-size: 1.5rem;
    }

    #total-plays {
        font-size: 1.1rem !important;
        padding: 8px 16px;
    }

    .game-title {
        font-size: 1.3rem;
    }
}

