/* Home Page Specific Styles */

/* Page Header */
.page-header {
    text-align: center;
    margin: 10px 0px;
    position: relative;
}

.page-header h2 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Sections */
.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: var(--space-xl);
    text-align: center;
    position: relative;
    padding-bottom: var(--space-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.featured-section {
    padding: 10px 0 0 0;
    background: var(--bg-primary);
    position: relative;
}

.arcade-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-primary);
}

.multiplayer-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-secondary);
}

.strategy-section {
    padding: 10px 0 0 0;
    background: var(--bg-primary);
}

.idle-games-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-secondary);
}

.casual-games-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-primary);
}

.all-games-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-secondary);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.filter-controls {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-xl);
}

/* Game Section Styles */
.game-section {
    padding: var(--space-1xl) 0;
    background: var(--bg-primary);
    position: relative;
}

.game-section--alternate {
    background: var(--bg-secondary);
}

/* Alternate Layout */
.game-section--alternate .games-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: var(--space-lg);
}

/* First game (larger) */
.game-section--alternate .game-card:first-child {
    grid-column: 1 / 3;
    grid-row: 1 / 2;
    display: flex;
    flex-direction: column;
}

.game-section--alternate .game-card:first-child .image-container {
    padding-bottom: 48%;
    /* 4:3 aspect ratio for wider image */
}

/* Second and third games */
.game-section--alternate .game-card:nth-child(2) {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
}

.game-section--alternate .game-card:nth-child(3) {
    grid-column: 4 / 5;
    grid-row: 1 / 2;
}

/* Fourth to seventh games */
.game-section--alternate .game-card:nth-child(4) {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
}

.game-section--alternate .game-card:nth-child(5) {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

.game-section--alternate .game-card:nth-child(6) {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
}

.game-section--alternate .game-card:nth-child(7) {
    grid-column: 4 / 5;
    grid-row: 2 / 3;
}

/* Handle cases with fewer than 4 games */
@media (min-width: 992px) {
    /* For 1 game */
    .game-section--alternate .game-card:only-child {
        grid-column: 1 / -1 !important;
        grid-row: 1 / 2 !important;
    }
    
    /* For 2 games */
    .game-section--alternate .game-card:nth-child(2):last-child {
        grid-column: 3 / -1 !important;
        grid-row: 1 / 2 !important;
    }
    
    /* For 3 games */
    .game-section--alternate .game-card:nth-child(3):last-child {
        grid-column: 4 / 5 !important;
        grid-row: 1 / 2 !important;
    }
}

.game-section--featured {
    background: var(--bg-primary);
}

.game-section--horizontal {
    background: var(--bg-secondary);
}

.game-section--grid {
    background: var(--bg-primary);
}

/* Horizontal Layout */
.games-grid-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.game-section--horizontal .games-grid {
    display: flex;
    gap: var(--space-lg);
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: var(--space-sm) 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-secondary);
}

.game-section--horizontal .games-grid::-webkit-scrollbar {
    height: 8px;
}

.game-section--horizontal .games-grid::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
}

.game-section--horizontal .games-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--radius-full);
}

.game-section--horizontal .game-card {
    flex: 0 0 220px;
    max-width: 220px;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    font-weight: 600;
}

.scroll-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.scroll-btn-left {
    left: -20px;
}

.scroll-btn-right {
    right: -20px;
}

.filter-tags-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.filter-tags-label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: calc(var(--space-xs) * -1);
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
}

.filter-tag {
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--primary-color);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
    line-height: 1;
    position: relative;
    overflow: hidden;
}

.filter-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left var(--transition-normal);
    z-index: -1;
}

.filter-tag:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filter-tag:hover::before {
    left: 0;
}

.filter-tag.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.filter-tag.active::before {
    left: 0;
}



/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: var(--space-lg);
}

.featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    justify-items: center;
}

/* Featured Game Cards */
.featured-grid .game-card {
    position: relative;
    transform: none;
    min-width: 220px;
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.featured-grid .game-card::before {
    content: '⭐ Featured';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-accent);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    z-index: 10;
    white-space: nowrap;
}

.game-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
}

.game-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 1;
    pointer-events: none;
}

.game-card:hover::after {
    opacity: 0.03;
}

.image-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
}

.placeholder-content {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

.placeholder-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: var(--space-sm);
    opacity: 0.7;
}

.placeholder-text {
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.game-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: all var(--transition-normal);
}

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

.image-placeholder {
    display: none;
}

.game-image.loading+.image-placeholder {
    display: flex;
}

.game-image.error {
    display: none;
}

.game-image.error+.image-placeholder {
    display: flex;
}

.game-info {
    padding: 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    position: relative;
    z-index: 2;
    padding-bottom: 10px;
}

.game-title {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
    line-height: 1.3;
    align-items: center;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-description {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

/* Line clamp variations for brief comments */
.line2 {
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.line3 {
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.line4 {
    -webkit-line-clamp: 4;
    line-clamp: 4;
}

.line5 {
    -webkit-line-clamp: 5;
    line-clamp: 5;
}

.line6 {
    -webkit-line-clamp: 6;
    line-clamp: 6;
}

.line-full {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
}

@media (max-width: 768px) {
    .line-full {
        -webkit-line-clamp: 3;
        line-clamp: 3;
        display: -webkit-box;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
    }
}

.game-rating {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--accent-color);
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.game-genre {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
}

.genre-tag {
    background: var(--gradient-primary);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.5px;
}



.game-featured {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    background: var(--gradient-secondary);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
    z-index: 2;
    box-shadow: var(--shadow-md);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

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

/* Loading Animation */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    font-weight: 500;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin: var(--space-lg) 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    font-weight: 500;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin: var(--space-lg) 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    font-weight: 500;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin: var(--space-lg) 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    font-weight: 500;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin: var(--space-lg) 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.section-description {
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

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

/* Loading Animation */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    font-weight: 500;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin: var(--space-lg) 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    font-weight: 500;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin: var(--space-lg) 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    font-weight: 500;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin: var(--space-lg) 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    font-weight: 500;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin: var(--space-lg) 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Category Sections */
.arcade-section .section-title {
    color: #ff6b6b;
}

.multiplayer-section .section-title {
    color: #4ecdc4;
}

.strategy-section .section-title {
    color: #ffd166;
}

.idle-games-section .section-title {
    color: #95e1d3;
}

.casual-games-section .section-title {
    color: #f38181;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: var(--space-2xl);
}

.load-more-btn {
    padding: var(--space-md) var(--space-2xl);
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-xl);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
    font-size: var(--font-size-base);
    position: relative;
    overflow: hidden;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-slow);
}

.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-2xl);
}

.load-more-btn:hover::before {
    left: 100%;
}

.load-more-btn:active {
    transform: translateY(-1px);
}

.load-more-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.load-more-btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    right: 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


/* Mobile Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--container-padding);
    }

    /* Sections */
    .game-section,
    .featured-section,
    .arcade-section,
    .multiplayer-section,
    .strategy-section,
    .all-games-section {
        padding: 10px 0;
    }

    .page-header h2 {
        font-size: var(--font-size-2xl);
    }

    .page-header p {
        font-size: var(--font-size-base);
    }

    /* Horizontal Layout */
    .games-grid-wrapper {
        gap: var(--space-sm);
    }

    .game-section--horizontal .games-grid {
        gap: var(--space-md);
    }

    .game-section--horizontal .game-card {
        flex: 0 0 180px;
        max-width: 180px;
    }

    .scroll-btn {
        width: 32px;
        height: 32px;
        font-size: var(--font-size-lg);
    }

    .scroll-btn-left {
        left: -16px;
    }

    .scroll-btn-right {
        right: -16px;
    }

    .section-title {
        font-size: var(--font-size-xl);
        margin-bottom: var(--space-lg);
    }

    .section-description {
        font-size: var(--font-size-sm);
        margin-bottom: var(--space-lg);
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-lg);
    }

    /* Alternate Layout */
    .game-section--alternate .games-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        gap: var(--space-md);
    }

    .game-section--alternate .game-card:first-child {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .game-section--alternate .game-card:first-child .image-container {
        padding-bottom: 100%;
        /* 1:1 aspect ratio on mobile */
    }

    .game-section--alternate .game-card:nth-child(2),
    .game-section--alternate .game-card:nth-child(3),
    .game-section--alternate .game-card:nth-child(4),
    .game-section--alternate .game-card:nth-child(5),
    .game-section--alternate .game-card:nth-child(n+6) {
        grid-column: span 1;
        grid-row: auto;
    }

    /* Filter Controls */
    .filter-controls {
        flex-direction: column;
        gap: var(--space-md);
        width: 100%;
    }

    .filter-tags-container {
        width: 100%;
    }

    .filter-tags-label {
        text-align: center;
        margin-bottom: var(--space-sm);
        font-size: var(--font-size-base);
    }

    .filter-tags {
        justify-content: center;
        max-width: none;
        gap: var(--space-sm);
        overflow-x: auto;
        padding: var(--space-xs);
        justify-content: flex-start;
    }

    .filter-tag {
        padding: var(--space-xs) var(--space-md);
        font-size: var(--font-size-sm);
        flex-shrink: 0;
    }

    /* Games Grid */
    .games-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .games-grid .game-card {
        width: calc(50% - 10px);
        max-width: none;
        margin: 0;
    }

    .featured-section:not(.game-section--horizontal) .games-grid .game-card {
        width: auto;
    }

    .featured-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .featured-grid .game-card {
        width: calc(50% - 30px);
        min-width: auto;
        max-width: none;
        margin: 0;
    }

    .game-card {
        max-width: 200px;
        margin: 0 auto;
    }

    .game-title {
        font-size: var(--font-size-sm);
        -webkit-line-clamp: 2;
    }

    .game-rating {
        font-size: var(--font-size-xs);
    }

    .game-info {
        padding: var(--space-md);
        gap: var(--space-xs);
    }

    .game-genre {
        gap: var(--space-xs);
    }

    .genre-tag {
        font-size: var(--font-size-xs);
        padding: var(--space-xs) var(--space-sm);
    }



    .game-featured {
        font-size: var(--font-size-xs);
        padding: var(--space-xs) var(--space-sm);
    }

    .load-more-btn {
        padding: var(--space-md) var(--space-xl);
        font-size: var(--font-size-base);
        min-height: 44px;
        width: 100%;
        max-width: 200px;
    }

    /* Loading States */
    .loading-shimmer {
        min-height: 200px;
    }
}

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

    .section-title {
        font-size: var(--font-size-lg);
        margin-bottom: var(--space-md);
    }

    .section-description {
        font-size: var(--font-size-sm);
        margin-bottom: var(--space-md);
    }

    /* Games Grid */
    .games-grid,
    .game-section--horizontal .games-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .games-grid .game-card,
    .game-section--horizontal .game-card {
        width: calc(50% - 10px);
        max-width: none;
        margin: 0;
        flex: none;
    }

    /* Alternate Layout */
    .game-section--alternate .games-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .game-section--alternate .game-card {
        width: calc(50% - 10px);
        max-width: none;
        margin: 0;
    }

    .game-section--alternate .game-card:first-child {
        width: 100%;
    }

    .game-section--alternate .game-card:first-child .image-container {
        padding-bottom: 100%;
        /* 1:1 aspect ratio on mobile */
    }

    .featured-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: var(--space-sm);
    }

    /* Hide scroll buttons on mobile */
    .scroll-btn {
        display: none;
    }

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

    .game-title {
        font-size: var(--font-size-sm);
        -webkit-line-clamp: 2;
    }

    .game-rating {
        font-size: var(--font-size-xs);
    }

    .game-info {
        padding: var(--space-sm);
        gap: var(--space-xs);
    }

    .game-genre {
        gap: var(--space-xs);
    }

    .genre-tag {
        font-size: var(--font-size-xs);
        padding: var(--space-xs) var(--space-sm);
    }


    .game-featured {
        font-size: var(--font-size-xs);
        padding: var(--space-xs) var(--space-sm);
    }

    .filter-tag {
        padding: var(--space-xs) var(--space-sm);
        font-size: var(--font-size-xs);
    }

    .featured-section,
    .arcade-section,
    .multiplayer-section,
    .strategy-section,
    .all-games-section {
        padding: var(--space-xl) 0;
    }

    .load-more-btn {
        padding: var(--space-sm) var(--space-lg);
        font-size: var(--font-size-sm);
        min-height: 40px;
        width: 100%;
        max-width: 180px;
    }

    .page-header h2 {
        font-size: var(--font-size-xl);
    }

    .page-header p {
        font-size: var(--font-size-sm);
    }
}

/* Navigation Mobile Styles */
@media (max-width: 768px) {}

/* Touch-friendly improvements */
@media (max-width: 768px) {
    .game-card {
        min-height: 160px;
    }

    .load-more-btn {
        min-height: 44px;
        /* Minimum touch target size */
        display: flex;
        align-items: center;
        justify-content: center;
    }


}

/* Landscape orientation support */
@media (max-width: 768px) and (orientation: landscape) {

    .games-grid,
    .featured-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

}

/* Game Tags Styles */
.game-tags {
    display: flex;
    text-transform: none;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.game-tag {
    background: var(--gradient-secondary);
    text-transform: none;
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.game-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: -1;
}

.game-tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

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

/* Color variations for different tag categories */
.game-tag:nth-child(3n+1) {
    background: var(--gradient-primary);
}

.game-tag:nth-child(3n+2) {
    background: var(--gradient-secondary);
}

.game-tag:nth-child(3n+3) {
    background: var(--gradient-accent);
}