:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --dark-color: #2d3436;
    --light-color: #f5f6fa;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

img {
    max-width: 100%;
    height: auto;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
    display: inline-block;
    text-decoration: none;
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.primary:hover {
    background-color: #5649c0;
    transform: translateY(-2px);
}

.btn.secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn.secondary:hover {
    background-color: #8c7ae6;
    transform: translateY(-2px);
}

.btn.login {
    background: transparent;
    color: var(--dark-color);
    margin-right: 10px;
}

.btn.signup {
    background-color: var(--primary-color);
    color: white;
}

/* Header Styles */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    width: 150px;
}

.footer-logo img {
    width: 200px;
}

/* Mobile Menu Styles */
.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

.nav-menu {
    transition: all 0.3s ease;
}

.nav-menu ul {
    display: flex;
    list-style: none;
}

.nav-menu ul li {
    margin: 0 15px;
}

.nav-menu ul li a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-menu ul li a:hover,
.nav-menu ul li a.active {
    color: var(--primary-color);
}

.nav-menu ul li a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

.auth-buttons {
    display: flex;
    align-items: center;
}

/* Hero Section */
.hero {
    padding: 150px 0 80px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    margin-top: 60px;
}

.hero .container {
    display: flex;
    flex-direction: column;
}

.hero-content {
    text-align: center;
    margin-bottom: 40px;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #666;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-image {
    text-align: center;
}

.hero-carousel {
    position: relative;
    height: 100px; /* increased height for two-line text */
    overflow: hidden;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    /* text-align: center; */
    font-size: 2.5rem; /* you can adjust */
    line-height: 1.2;
}
span{
    font-size: 24px;
    font-weight: 400;
}

.carousel-item.active {
    opacity: 1;
}

/* Popular Games Section */
.popular-games {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.games-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-btn {
    padding: 8px 20px;
    background-color: var(--white);
    border: 1px solid #ddd;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.game-item {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.game-item:hover {
    transform: translateY(-10px);
}

.game-image {
    height: 180px;
    overflow: hidden;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-item:hover .game-image img {
    transform: scale(1.1);
}

.game-info {
    padding: 20px;
}

.game-info h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 0.9rem;
}

/* Footer Styles */
footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.footer-logo h2 span {
    color: var(--primary-color);
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.social-icons a {
    color: var(--white);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-color);
}

/* Responsive Styles */
@media (min-width: 768px) {
    .hero .container {
        flex-direction: row;
        align-items: center;
    }
    
    .hero-content {
        text-align: left;
        flex: 1;
        padding-right: 50px;
        margin-bottom: 0;
    }
    
    .hero-image {
        flex: 1;
        text-align: right;
    }
    
    .cta-buttons {
        justify-content: flex-start;
    }

    .auth-buttons {
        display: none;
    }
    
    .auth-buttons.mobile-visible .signup {
        display: block;
      }
    
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        text-align: left;
    }
    
    .footer-links ul {
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {

    .logo img{
        width: 120px;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 15px;
    }

    .auth-buttons {
        display: none;
    }

    /* Show Sign Up button in the mobile menu */
    .mobile-menu .signup-mobile {
        display: inline-block;
        margin-top: 20px;
    }

    /* Hide the login button in the mobile menu */
    .mobile-menu .login-mobile {
        display: none;
    }

    /* Style for the mobile signup button */
    .signup-mobile a {
        display: inline-block;
        width: 100%;
        max-width: 150px;
        text-align: center;
        margin-top: 20px;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: var(--shadow);
        padding: 20px;
        transform: translateY(-150%);
        opacity: 0;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-menu ul li {
        margin: 10px 0;
        text-align: center;
    }
    
    .mobile-menu {
        display: block;
    }

    .auth-buttons.mobile-visible {
        display: flex !important;
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
        align-items: center;
    }
    
    .auth-buttons {
        display: none;
    }

    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .hero {
        padding: 120px 0 60px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

/* Accessibility Improvements */
button, a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Prevent layout shift on hover */
.game-item, .filter-btn, .btn {
    transform: translateZ(0);
}

/* iOS input zoom prevention */
@supports (-webkit-touch-callout: none) {
    input, select, textarea {
        font-size: 16px;
    }
}

@media (max-width: 767px) {
    .mobile-auth {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
        align-items: center;
    }

    .mobile-auth .btn {
        width: 100%;
        max-width: 250px;
    }
}
