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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 50%, #0369a1 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.landing-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.landing-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem 0;
    text-align: center;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.main-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    font-weight: 400;
}

.stats {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    backdrop-filter: blur(5px);
}

.game-count {
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Container for consistent layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 1400px) {
    .container {
        max-width: 1650px;
    }
}

@media (min-width: 1800px) {
    .container {
        max-width: 2200px;
    }
}

@media (min-width: 2200px) {
    .container {
        max-width: 2600px;
    }
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem 0;
    text-align: center;
}

.site-title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.title-icon {
    margin-right: 1rem;
}

.site-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    font-weight: 400;
}

/* Main Content */
.main {
    flex: 1;
    padding: 3rem 0;
}

.landing-main {
    flex: 1;
    padding: 3rem 0;
}

/* Search Section Styles */
.search-section {
    max-width: 1400px;
    margin: 0 auto 3rem auto;
    padding: 0 1rem;
}

@media (min-width: 1400px) {
    .search-section {
        max-width: 1800px;
    }
}

@media (min-width: 1800px) {
    .search-section {
        max-width: 2200px;
    }
}

@media (min-width: 2200px) {
    .search-section {
        max-width: 2600px;
    }
}

.search-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto 1rem auto;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #64748b;
    z-index: 2;
}

#game-search {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    font-size: 1rem;
    font-weight: 500;
    color: #1a202c;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#game-search::placeholder {
    color: #64748b;
    font-weight: 400;
}

#game-search:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1), 0 4px 12px rgba(0, 0, 0, 0.15);
    background: white;
}

.clear-search {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 50%;
    background: #64748b;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 2;
}

.clear-search:hover {
    background: #475569;
    transform: translateY(-50%) scale(1.1);
}

.clear-search svg {
    width: 14px;
    height: 14px;
}

.search-stats {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Search responsive adjustments */
@media (max-width: 767px) {
    .search-container {
        padding: 1.5rem;
        margin: 0 0.5rem;
        border-radius: 15px;
    }

    .search-box {
        max-width: 100%;
    }

    #game-search {
        font-size: 16px;
        /* Prevent zoom on iOS */
    }
}

/* Animation for filtered results */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.games-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 1400px) {
    .games-container {
        max-width: 1650px;
    }
}

@media (min-width: 1800px) {
    .games-container {
        max-width: 2200px;
    }
}

@media (min-width: 2200px) {
    .games-container {
        max-width: 2600px;
    }
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 360px));
    gap: 1.5rem;
    margin-bottom: 2rem;
    max-width: 1400px;
    margin: 0 auto 2rem auto;
    padding: 0 1rem;
    justify-content: center;
}

/* Responsive grid adjustments for larger screens */
@media (min-width: 1400px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 340px));
        max-width: 1650px;
        gap: 1.5rem;
    }
}

@media (min-width: 1800px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 320px));
        max-width: 2200px;
        gap: 1.25rem;
    }
}

@media (min-width: 2200px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 300px));
        max-width: 2600px;
        gap: 1.25rem;
    }
}

@media (max-width: 767px) {
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    .games-grid {
        gap: 1rem;
    }
}

/* Game Card Styles */
.game-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
}

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

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0ea5e9 0%, #0284c7 50%, #0369a1 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Game Thumbnail Styles */
.game-thumbnail {
    width: 100%;
    height: 220px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
}

.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.game-card:hover .game-thumbnail img {
    transform: scale(1.08);
}

/* Game Content Styles */
.game-info {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.game-category {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    align-self: flex-start;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
    margin-bottom: 0.5rem;
}

.game-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

.game-description {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
    font-weight: 400;
}

/* Game Meta Information */
.game-meta {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.game-meta span {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.875rem;
    background: #f7fafc;
    color: #4a5568;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.game-difficulty {
    background: linear-gradient(135deg, #fef5e7 0%, #fed7aa 100%) !important;
    color: #c05621 !important;
    border-color: #fed7aa !important;
}

.game-players {
    background: linear-gradient(135deg, #e0f2fe 0%, #b3e5fc 100%) !important;
    color: #0277bd !important;
    border-color: #b3e5fc !important;
}

.game-duration {
    background: linear-gradient(135deg, #f3e8ff 0%, #ddd6fe 100%) !important;
    color: #6b46c1 !important;
    border-color: #ddd6fe !important;
}

/* Game Tags */
.game-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.game-tag {
    padding: 0.4rem 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.025em;
    transition: transform 0.2s ease;
}

.game-tag:hover {
    transform: translateY(-1px);
}

.game-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.75rem;
}

.game-description {
    color: #718096;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

/* Game Metadata Styles */
.game-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.game-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-badge.category {
    background: #e6fffa;
    color: #234e52;
    border: 1px solid #b2f5ea;
}

.game-badge.difficulty {
    border: 1px solid;
}

.game-badge.difficulty-easy {
    background: #f0fff4;
    color: #22543d;
    border-color: #9ae6b4;
}

.game-badge.difficulty-medium {
    background: #fffbf0;
    color: #744210;
    border-color: #f6e05e;
}

.game-badge.difficulty-hard {
    background: #fff5f5;
    color: #742a2a;
    border-color: #feb2b2;
}

.game-badge.playtime {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.game-players {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.game-actions {
    display: flex;
    justify-content: center;
    margin-top: auto;
}

.play-button {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 120px;
}

.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

/* Footer Styles */
.landing-footer {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

/* Footer */
.footer {
    background: #075985;
    color: #e0f2fe;
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
}

.footer p {
    color: #e0f2fe;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .games-grid {
        flex-wrap: wrap;
        justify-content: center;
    }

    .game-card {
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    .site-title {
        font-size: 2.5rem;
    }

    .site-description {
        font-size: 1.1rem;
    }

    .games-grid {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .game-card {
        max-width: 100%;
        min-width: auto;
    }

    .game-info {
        padding: 1.5rem;
    }

    .game-meta {
        gap: 0.5rem;
    }

    .game-meta span {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }

    .main,
    .landing-main {
        padding: 2rem 0;
    }

    .category-title {
        font-size: 1.75rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .site-title {
        font-size: 2rem;
    }

    .game-thumbnail {
        height: 180px;
    }

    .game-info {
        padding: 1.25rem;
        gap: 0.875rem;
    }

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

    .game-description {
        font-size: 0.9rem;
    }
}

/* Animation for page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card {
    animation: fadeInUp 0.6s ease forwards;
}

.game-card:nth-child(1) {
    animation-delay: 0.1s;
}

.game-card:nth-child(2) {
    animation-delay: 0.2s;
}

.game-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .game-card {
        transition: none;
        animation: none;
    }

    .game-card:hover {
        transform: none;
    }
}

/* Focus styles for accessibility */
.game-card:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}