* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #121212;
    color: #e0e0e0;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== HEADER STYLES ===== */
header {
    background-color: #1a1a1a;
    padding: 15px 0;
    border-bottom: 2px solid #333;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 2rem;
    color: #a020f0;
}

.logo h1 {
    font-size: 1.8rem;
    background: linear-gradient(90deg, #a020f0, #ff0000);
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.search-bar {
    display: flex;
    align-items: center;
    background: #2a2a2a;
    border-radius: 30px;
    padding: 8px 15px;
    flex-grow: 1;
    max-width: 400px;
    margin: 0 20px;
}

.search-bar i {
    color: #888;
    margin-right: 10px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: #e0e0e0;
    width: 100%;
    outline: none;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    color: #e0e0e0;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

nav a:hover,
nav a.active {
    background-color: #333;
    color: #a020f0;
}

/* ===== MAIN CAROUSEL ===== */
.main-carousel {
    margin: 20px 0;
}

.carousel-container {
    position: relative;
    height: 350px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: none;
    align-items: center;
}

.carousel-slide.active {
    opacity: 1;
    display: flex;
}

.slide-content {
    padding: 0 40px;
    max-width: 600px;
}

.slide-text h3 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.slide-text p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

/* ===== BUTTONS ===== */
.cta-button {
    display: inline-block;
    background: linear-gradient(90deg, #a020f0, #ff0000);
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(160, 32, 240, 0.4);
}

.secondary-button {
    background: #555;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s ease;
}

.secondary-button:hover {
    background: #666;
    transform: translateY(-2px);
}

/* ===== CAROUSEL CONTROLS ===== */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 100;
}

.carousel-nav:hover {
    background-color: rgba(160, 32, 240, 0.7);
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

.dot-container {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 100;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.dot:hover {
    transform: scale(1.2);
}

.dot.active-dot {
    background-color: #a020f0;
    transform: scale(1.2);
}

/* ===== SECTIONS ===== */
.section-title {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #a020f0, #ff0000);
    margin: 10px auto;
    border-radius: 2px;
}

.categories,
.featured-games {
    padding: 40px 0;
}

/* ===== CATEGORY SLIDESHOW ===== */
.category-slideshow {
    position: relative;
    margin: 30px 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.category-slides-container {
    display: flex;
    transition: transform 0.5s ease;
}

.category-slide {
    min-width: 100%;
    position: relative;
    height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    flex-shrink: 0;
}

.category-slide-content {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 30px;
    width: 100%;
}

.category-slide-content h3 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.category-slide-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    max-width: 600px;
}

/* Category Slideshow Controls */
.category-slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 100;
}

.category-slide-nav:hover {
    background-color: rgba(160, 32, 240, 0.7);
}

.category-slide-prev {
    left: 15px;
}

.category-slide-next {
    right: 15px;
}

.category-slide-dots {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 100;
}

.category-slide-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.category-slide-dot:hover {
    transform: scale(1.2);
}

.category-slide-dot.active {
    background-color: #a020f0;
    transform: scale(1.2);
}

/* ===== CATEGORY GRID ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.category-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 25px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #333;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: #a020f0;
    box-shadow: 0 10px 25px rgba(160, 32, 240, 0.3);
}

.category-card h3 {
    position: relative;
    z-index: 2;
    font-size: 1.3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: white;
    position: relative;
    z-index: 2;
}

/* Category-specific background colors */
.category-card[data-category="action"] { background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%); }
.category-card[data-category="puzzle"] { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.category-card[data-category="strategy"] { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.category-card[data-category="horror"] { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.category-card[data-category="sports"] { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.category-card[data-category="sim"] { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); color: #333; }
.category-card[data-category="sim"] h3 { color: #333; text-shadow: none; }
.category-card[data-category="arcade"] { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.category-card[data-category="racing"] { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }

/* ===== FEATURED GAMES ===== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.game-card {
    background: #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    border: 1px solid #333;
    transition: all 0.3s ease;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: #a020f0;
    box-shadow: 0 10px 25px rgba(160, 32, 240, 0.2);
}

.game-image {
    width: 75px;
    height: 75px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    background-color: #2a2a2a;
}

.game-details {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.game-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.game-category-tag {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.game-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #aaa;
}

.game-download-btn {
    align-self: flex-end;
    padding: 8px 15px;
    font-size: 0.9rem;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #1e1e1e;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    border: 2px solid #a020f0;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s ease;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #ff0000;
}

#modalTitle {
    margin-bottom: 20px;
    font-size: 1.8rem;
    color: #a020f0;
    padding-right: 40px;
}

.modal-category,
.modal-game {
    padding: 10px 0;
}

.modal-game .game-category {
    color: #a020f0;
    font-weight: bold;
    margin: 10px 0;
    font-size: 1.1rem;
}

.modal-features ul,
.modal-game ul {
    margin: 15px 0;
    padding-left: 20px;
    list-style-type: none;
}

.modal-features li,
.modal-game li {
    margin: 8px 0;
    padding-left: 15px;
    position: relative;
}

.modal-features li::before,
.modal-game li::before {
    content: '▶';
    color: #a020f0;
    position: absolute;
    left: 0;
    font-size: 0.8rem;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

/* ===== NOTIFICATION ===== */
.notification {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #1e1e1e;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 3000;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-left: 4px solid #a020f0;
    max-width: 350px;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* ===== FOOTER ===== */
footer {
    background-color: #1a1a1a;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 2px solid #333;
}

.footer-bottom {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-bar {
        max-width: 100%;
        margin: 10px 0;
        order: 3;
        width: 100%;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .carousel-container {
        height: 250px;
    }
    
    .slide-text h3 {
        font-size: 1.8rem;
    }
    
    .slide-text p {
        font-size: 1rem;
    }
    
    .carousel-nav {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .category-slide {
        height: 300px;
    }
    
    .category-slide-content h3 {
        font-size: 1.8rem;
    }
    
    .category-slide-content p {
        font-size: 1rem;
        padding-right: 20px;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .category-card {
        padding: 15px 10px;
        min-height: 120px;
    }
    
    .category-icon {
        font-size: 2rem;
        margin-bottom: 10px;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions button {
        width: 100%;
    }
    
    .notification {
        left: 20px;
        right: 20px;
        max-width: none;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .carousel-container {
        height: 200px;
    }
    
    .slide-content {
        padding: 0 20px;
    }
    
    .slide-text h3 {
        font-size: 1.5rem;
    }
    
    .category-slide-content {
        padding: 20px;
    }
    
    .category-slide-content h3 {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}