* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #0f0f1e;
}

header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-links a:hover {
    color: #4ecdc4;
}

main {
    margin-top: 60px;
}

section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero {
    text-align: center;
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: 0.5rem;
}

.search-box input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
}

.search-box button {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: transform 0.3s;
}

.search-box button:hover {
    transform: scale(1.05);
}

.categories {
    background: #1a1a2e;
    color: white;
}

.categories h2, .games h2, .about h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: white;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: linear-gradient(135deg, #2d2d44 0%, #1f1f2e 100%);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.3);
}

.category-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.category-card h3 {
    color: #4ecdc4;
}

.games {
    background: #16213e;
    color: white;
}

.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    background: #2d2d44;
    color: white;
    border: 2px solid #4ecdc4;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.filter-btn:hover, .filter-btn.active {
    background: #4ecdc4;
    color: #1a1a2e;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.game-card {
    background: linear-gradient(135deg, #2d2d44 0%, #1f1f2e 100%);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.3);
}

.game-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.game-image-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.game-info {
    padding: 1.5rem;
}

.game-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #4ecdc4;
}

.game-category {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.game-size {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.game-rating {
    color: #ffd700;
    margin-bottom: 1rem;
}

.download-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.3s;
}

.download-btn:hover {
    transform: scale(1.05);
}

.about {
    background: #1a1a2e;
    color: white;
}

.about p {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: #ccc;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    background: #2d2d44;
    border-radius: 15px;
}

.feature-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.feature h3 {
    color: #4ecdc4;
    margin-bottom: 0.5rem;
}

.feature p {
    color: #999;
    font-size: 1rem;
}

footer {
    background: #0a0a15;
    color: white;
    text-align: center;
    padding: 2rem;
}

.disclaimer {
    color: #999;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 35px;
    font-weight: bold;
    padding: 10px 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #ff6b6b;
}

#modalBody {
    padding: 2rem;
    color: white;
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.modal-image-img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    margin: 0 auto 1rem;
    display: block;
    border-radius: 15px;
}

.modal-title {
    font-size: 2.5rem;
    color: #4ecdc4;
    margin-bottom: 0.5rem;
}

.modal-category {
    color: #999;
    font-size: 1.1rem;
}

.modal-rating {
    color: #ffd700;
    font-size: 1.3rem;
    margin: 1rem 0;
}

.modal-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ccc;
    margin-bottom: 2rem;
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section h3 {
    color: #4ecdc4;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #4ecdc4;
    padding-bottom: 0.5rem;
}

.modal-features {
    list-style: none;
    padding: 0;
}

.modal-features li {
    padding: 0.5rem 0;
    color: #ccc;
    font-size: 1.05rem;
}

.modal-features li:before {
    content: "✓ ";
    color: #4ecdc4;
    font-weight: bold;
    margin-right: 0.5rem;
}

.modal-requirements {
    background: #2d2d44;
    padding: 1.5rem;
    border-radius: 10px;
}

.requirement-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #3d3d54;
}

.requirement-item:last-child {
    border-bottom: none;
}

.requirement-label {
    color: #4ecdc4;
    font-weight: bold;
}

.requirement-value {
    color: #ccc;
    text-align: right;
}

.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-box {
    background: #2d2d44;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
}

.info-label {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.info-value {
    color: #4ecdc4;
    font-size: 1.2rem;
    font-weight: bold;
}

.modal-download-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
    transition: transform 0.3s;
    margin-top: 1rem;
}

.modal-download-btn:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-title {
        font-size: 1.8rem;
    }
    
    .modal-info-grid {
        grid-template-columns: 1fr;
    }
}
