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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

#homepage {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== HEADER ===== */
header {
    text-align: center;
    margin-bottom: 50px;
    color: white;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ===== GAME GRID ===== */
#game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* ===== GAME CARD ===== */
.game-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.game-card-image {
    position: relative;
    background: #f7fafc;
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

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

.game-status {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(5px);
}

.game-card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.game-card-content h2 {
    color: #2d3748;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.game-description {
    color: #4a5568;
    line-height: 1.7;
    font-size: 0.95rem;
    flex: 1;
    margin-bottom: 15px;
}

.game-description strong {
    color: #2d3748;
}

.game-description em {
    color: #667eea;
    font-style: italic;
}

.game-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag.puzzle {
    background: #ebf4ff;
    color: #4a6fa5;
}

.tag.strategy {
    background: #f0fff4;
    color: #2d7d46;
}

.tag.classic {
    background: #fff5f5;
    color: #e53e3e;
}

.tag.logic {
    background: #faf5ff;
    color: #805ad5;
}

.tag.soon {
    background: #fefcbf;
    color: #975a16;
}

.play-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    align-self: flex-start;
}
.turtle-image {
   width: auto;
    height: 100%;
     max-width: 88%;
    max-height: 88%; 
    object-fit: contain;
    display: block;
    border-radius: 5px;
    transition: transform 0.3s ease;
}
.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.play-btn.disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    opacity: 0.7;
}

.play-btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* ===== COMING SOON CARD ===== */
.coming-soon .game-card-image {
    background: linear-gradient(135deg, #e2e8f0 0%, #edf2f7 100%);
}

.coming-soon-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #a0aec0;
}

.coming-soon-placeholder span {
    font-size: 4rem;
    margin-bottom: 10px;
}

.coming-soon-placeholder p {
    font-size: 1.2rem;
    font-weight: 600;
}

.coming-soon .game-card {
    opacity: 0.7;
}

.coming-soon .game-card:hover {
    transform: translateY(-4px);
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    color: white;
    padding: 30px 0 10px 0;
    opacity: 0.8;
    font-size: 0.95rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    #game-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .game-card-image {
        height: 180px;
    }
    
    .game-card-content h2 {
        font-size: 1.3rem;
    }
    
    .game-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }
    
    .game-card-image {
        height: 150px;
    }
    
    .game-card-content {
        padding: 18px;
    }
    
    .play-btn {
        padding: 10px 24px;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
    }
    
    .game-status {
        font-size: 0.7rem;
        padding: 4px 12px;
    }
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}
