/* Home Page Styles */

/* Banner Section */
.banner {
    background: linear-gradient(135deg, #0096c7 0%, #0077b6 50%, #023e8a 100%);
    color: white;
    padding: 120px 0;
    margin-top: calc(var(--header-height) * -1);
    padding-top: calc(var(--header-height) + 120px);
    position: relative;
    overflow: hidden;
}

/* Animated background patterns */
.banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(144, 224, 239, 0.25) 0%, rgba(202, 240, 248, 0.1) 50%, transparent 70%);
    border-radius: 50%;
    animation: float-up 15s ease-in-out infinite;
    filter: blur(40px);
}

.banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 119, 182, 0.35) 0%, rgba(0, 150, 199, 0.15) 50%, transparent 70%);
    border-radius: 50%;
    animation: float-down 20s ease-in-out infinite;
    filter: blur(40px);
}

@keyframes float-up {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    50% { transform: translateY(-60px) rotate(180deg) scale(1.1); }
}

@keyframes float-down {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    50% { transform: translateY(60px) rotate(-180deg) scale(1.1); }
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    position: relative;
    z-index: 1;
}

.banner-text {
    flex: 1;
    animation: slideInLeft 0.8s ease-out;
}

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

.banner-text h1 {
    font-size: 64px;
    margin-bottom: 30px;
    font-weight: 900;
    line-height: 1.1;
    background: linear-gradient(45deg, #ffffff, #90e0ef, #caf0f8, #ffffff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease-in-out infinite;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
    letter-spacing: -0.5px;
}

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

.banner-text p {
    font-size: 24px;
    margin-bottom: 40px;
    opacity: 0.98;
    line-height: 1.7;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
    font-weight: 500;
    max-width: 90%;
}

/* Enhanced button styles */
.banner-text .btn {
    padding: 18px 48px;
    font-size: 20px;
    font-weight: 700;
    background: white;
    color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    border-radius: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.banner-text .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 168, 232, 0.2), rgba(0, 119, 182, 0.3));
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.banner-text .btn:hover::before {
    width: 400px;
    height: 400px;
}

.banner-text .btn::after {
    content: '→';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    opacity: 0;
    transition: all 0.3s ease;
}

.banner-text .btn:hover::after {
    opacity: 1;
    right: 15px;
}

.banner-text .btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.35);
    padding-right: 55px;
    border-color: white;
}

.banner-featured {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.banner-game {
    position: relative;
    border-radius: 25px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.25);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
}

.banner-game::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 168, 232, 0.3), rgba(144, 224, 239, 0.2));
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

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

.banner-game:hover {
    transform: scale(1.1) rotate(3deg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
    z-index: 10;
}

.banner-game:nth-child(even):hover {
    transform: scale(1.1) rotate(-3deg);
}

.banner-game:nth-child(1) {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.banner-game:nth-child(2) {
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.banner-game:nth-child(3) {
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

.banner-game:nth-child(4) {
    animation: fadeInUp 0.6s ease-out 0.8s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.banner-game img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.9);
}

.banner-game:hover img {
    transform: scale(1.2);
    filter: brightness(1.1);
}

.banner-game-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.6) 60%, transparent);
    padding: 25px;
    color: white;
    transform: translateY(15px);
    transition: all 0.4s ease;
    z-index: 2;
}

.banner-game:hover .banner-game-overlay {
    transform: translateY(0);
    background: linear-gradient(to top, rgba(0, 168, 232, 0.95), rgba(0, 119, 182, 0.7) 60%, transparent);
}

.banner-game-title {
    font-size: 16px;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.banner-game-title::before {
    content: '▶';
    font-size: 12px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.banner-game:hover .banner-game-title::before {
    opacity: 1;
    transform: translateX(0);
}

/* Game Sections */
.games-section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

/* Alternating section backgrounds */
.games-section:nth-child(even) {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.games-section:nth-child(odd) {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
}

/* Section decorative elements */
.games-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 168, 232, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.games-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(144, 224, 239, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 20px;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 168, 232, 0.1);
}

.section-header h2::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 60%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.section-header:hover h2::before {
    opacity: 1;
}

.section-header .view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    padding: 10px 20px;
    border-radius: 25px;
    background: linear-gradient(135deg, rgba(0, 168, 232, 0.1), rgba(144, 224, 239, 0.1));
    border: 2px solid rgba(0, 168, 232, 0.2);
}

.section-header .view-all::after {
    content: '→';
    font-size: 18px;
    transition: transform 0.3s ease;
}

.section-header .view-all:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 168, 232, 0.3);
}

.section-header .view-all:hover::after {
    transform: translateX(5px);
}

/* Game Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

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

/* Game Cards */
.game-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 168, 232, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
}

.game-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

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

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 168, 232, 0.25);
}

/* Add badge for featured cards */
.game-card.featured::after {
    content: '⭐';
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    z-index: 10;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.game-card.featured {
    grid-column: span 1;
}

.game-card.large {
    grid-column: span 2;
}

.game-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
}

.game-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.game-card:hover .game-image::before {
    left: 100%;
}

.game-card.featured .game-image {
    height: 260px;
}

.game-card.large .game-image {
    height: 320px;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.95);
}

.game-card:hover .game-image img {
    transform: scale(1.15) rotate(2deg);
    filter: brightness(1.05);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 168, 232, 0.9), rgba(0, 119, 182, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    backdrop-filter: blur(5px);
}

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

.play-btn {
    background: white;
    color: var(--primary-color);
    padding: 15px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.play-btn::before {
    content: '▶';
    margin-right: 8px;
    font-size: 14px;
}

.play-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 168, 232, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.play-btn:hover::after {
    width: 300px;
    height: 300px;
}

.play-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.game-info {
    padding: 25px;
    background: linear-gradient(180deg, white 0%, #f8f9fa 100%);
}

.game-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.game-card:hover .game-title {
    color: var(--primary-color);
}

.game-category {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 15px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-date {
    color: var(--text-light);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.game-date::before {
    content: '📅';
    font-size: 14px;
}

.game-description {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

/* Section Icon Styles */
.section-icon {
    font-size: 40px;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

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

/* Unique styles for each section */
.section-new {
    background: linear-gradient(180deg, #e0f7fa 0%, #ffffff 50%, #e0f7fa 100%);
}

.section-new .section-header h2 {
    color: #00acc1;
}

.section-new .section-header::after {
    background: linear-gradient(90deg, #00acc1, #00e5ff);
}

.section-new .section-icon {
    filter: drop-shadow(0 0 10px rgba(0, 172, 193, 0.5));
}

.section-popular {
    background: linear-gradient(180deg, #fff3e0 0%, #ffffff 50%, #fff3e0 100%);
}

.section-popular .section-header h2 {
    color: #ff6f00;
}

.section-popular .section-header::after {
    background: linear-gradient(90deg, #ff6f00, #ff9100);
}

.section-popular .section-icon {
    filter: drop-shadow(0 0 10px rgba(255, 111, 0, 0.5));
    animation: fire 1.5s ease-in-out infinite;
}

@keyframes fire {
    0%, 100% { transform: scale(1) rotate(-5deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

.section-trending {
    background: linear-gradient(180deg, #f3e5f5 0%, #ffffff 50%, #f3e5f5 100%);
}

.section-trending .section-header h2 {
    color: #7b1fa2;
}

.section-trending .section-header::after {
    background: linear-gradient(90deg, #7b1fa2, #ab47bc);
}

.section-trending .section-icon {
    filter: drop-shadow(0 0 10px rgba(123, 31, 162, 0.5));
}

.section-puzzle {
    background: linear-gradient(180deg, #e8f5e9 0%, #ffffff 50%, #e8f5e9 100%);
}

.section-puzzle .section-header h2 {
    color: #388e3c;
}

.section-puzzle .section-header::after {
    background: linear-gradient(90deg, #388e3c, #66bb6a);
}

.section-puzzle .section-icon {
    filter: drop-shadow(0 0 10px rgba(56, 142, 60, 0.5));
}

.section-adventure {
    background: linear-gradient(180deg, #fce4ec 0%, #ffffff 50%, #fce4ec 100%);
}

.section-adventure .section-header h2 {
    color: #c2185b;
}

.section-adventure .section-header::after {
    background: linear-gradient(90deg, #c2185b, #f06292);
}

.section-adventure .section-icon {
    filter: drop-shadow(0 0 10px rgba(194, 24, 91, 0.5));
}

.section-arcade {
    background: linear-gradient(180deg, #e1f5fe 0%, #ffffff 50%, #e1f5fe 100%);
}

.section-arcade .section-header h2 {
    color: #0277bd;
}

.section-arcade .section-header::after {
    background: linear-gradient(90deg, #0277bd, #29b6f6);
}

.section-arcade .section-icon {
    filter: drop-shadow(0 0 10px rgba(2, 119, 189, 0.5));
}

/* Responsive */
@media (max-width: 768px) {
    .banner {
        padding: 80px 0 60px;
        padding-top: calc(var(--header-height) + 80px);
    }

    .banner::before,
    .banner::after {
        width: 450px;
        height: 450px;
    }

    .banner-content {
        flex-direction: column;
        gap: 50px;
    }

    .banner-text {
        text-align: center;
    }

    .banner-text h1 {
        font-size: 44px;
        margin-bottom: 25px;
    }

    .banner-text p {
        font-size: 20px;
        margin-bottom: 35px;
        max-width: 100%;
    }

    .banner-text .btn {
        padding: 16px 42px;
        font-size: 18px;
        display: inline-block;
        margin: 0 auto;
    }

    .banner-featured {
        width: 100%;
        gap: 20px;
    }

    .banner-game img {
        height: 180px;
    }

    .games-section {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 30px;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .section-icon {
        font-size: 32px;
    }

    .section-header .view-all {
        font-size: 14px;
        padding: 8px 16px;
    }

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

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

    .game-card.large {
        grid-column: span 1;
    }

    .game-image {
        height: 150px;
    }

    .game-card.featured .game-image {
        height: 180px;
    }

    .game-card.large .game-image {
        height: 200px;
    }

    .game-info {
        padding: 15px;
    }

    .game-title {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .banner {
        padding: 60px 0 40px;
        padding-top: calc(var(--header-height) + 60px);
    }

    .banner::before,
    .banner::after {
        width: 350px;
        height: 350px;
    }

    .banner-text h1 {
        font-size: 32px;
        margin-bottom: 20px;
        letter-spacing: -0.3px;
    }

    .banner-text p {
        font-size: 17px;
        margin-bottom: 30px;
    }

    .banner-text .btn {
        padding: 14px 36px;
        font-size: 16px;
    }

    .banner-featured {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .banner-game img {
        height: 220px;
    }

    .banner-game-overlay {
        padding: 20px;
    }

    .banner-game-title {
        font-size: 15px;
    }

    .section-header h2 {
        font-size: 24px;
    }

    .section-icon {
        font-size: 28px;
    }

    .section-header .view-all {
        font-size: 12px;
        padding: 6px 12px;
    }

    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .game-card {
        border-radius: 15px;
    }

    .game-info {
        padding: 12px;
    }

    .game-title {
        font-size: 13px;
    }

    .game-category {
        font-size: 11px;
        padding: 4px 10px;
    }
}
