* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', 'Segoe UI', sans-serif;
    background: #E8F5E9;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 10%, rgba(102, 187, 106, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 90%, rgba(108, 196, 168, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 10%, rgba(135, 206, 235, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 10% 90%, rgba(255, 160, 122, 0.1) 0%, transparent 20%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #FFFFFF 0%, #E8F5E9 100%);
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.15);
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 800;
    color: #66BB6A;
    text-shadow: 2px 2px 0 #FFF, 3px 3px 0 rgba(102, 187, 106, 0.3);
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #66BB6A 0%, #4CAF50 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.search-box {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border-radius: 50px;
    padding: 12px 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: #66BB6A;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.2);
}

.search-box input {
    border: none;
    outline: none;
    font-size: 16px;
    width: 280px;
    background: transparent;
    color: #555;
}

.search-box input::placeholder {
    color: #AAA;
}

.search-icon {
    color: #66BB6A;
    margin-right: 12px;
    font-size: 18px;
}

.home-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #66BB6A 0%, #4CAF50 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.category-tag {
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    background: #FFFFFF;
    color: #666;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.category-tag:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.category-tag.active {
    color: white;
    border-color: transparent;
    animation: bounce 0.5s ease;
}

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

.results-count {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
    padding-left: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-content {
    display: flex;
    gap: 30px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    flex: 1;
}

.game-card {
    background: #F1F8E9;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.15);
    transition: all 0.3s ease;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(76, 175, 80, 0.25);
}

.game-thumb {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #C8E6C9 0%, #A5D6A7 100%);
}

.game-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.game-card:hover .game-thumb img {
    transform: scale(1.08);
}

.game-info {
    padding: 20px;
}

.game-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
}

.game-desc {
    font-size: 14px;
    color: #777;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
}

.trending-section {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.15);
    position: sticky;
    top: 20px;
}

.trending-title {
    font-size: 20px;
    font-weight: 700;
    color: #66BB6A;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #F1F8E9;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.trending-item:hover {
    transform: translateX(5px);
    background: #E8F5E9;
}

.trending-thumb {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.trending-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trending-info {
    flex: 1;
    min-width: 0;
}

.trending-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trending-cat {
    font-size: 12px;
    color: #999;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-results-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.no-results-text {
    font-size: 18px;
}

footer {
    margin-top: 50px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #66BB6A;
}

.footer-copyright {
    color: #999;
    font-size: 13px;
}

.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.15);
}

.page-title {
    font-size: 32px;
    font-weight: 800;
    color: #66BB6A;
    margin-bottom: 30px;
    text-align: center;
}

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

.page-section h2 {
    font-size: 22px;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #C8E6C9;
}

.page-section p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.page-section ul {
    color: #666;
    line-height: 1.8;
    padding-left: 25px;
}

.page-section li {
    margin-bottom: 10px;
}

.contact-email {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, #66BB6A 0%, #4CAF50 100%);
    color: white;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.contact-email:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

@media (max-width: 1024px) {
    .sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .search-box input {
        width: 200px;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .logo {
        font-size: 22px;
    }
    
    .categories {
        padding: 15px;
    }
    
    .category-tag {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
}

.detail-page {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.15);
}

.detail-content {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.detail-image {
    flex: 0 0 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.detail-info {
    flex: 1;
}

.detail-title {
    font-size: 32px;
    font-weight: 800;
    color: #333;
    margin-bottom: 15px;
}

.detail-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.detail-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.detail-description {
    margin-bottom: 20px;
}

.detail-description p {
    color: #555;
    line-height: 1.8;
    font-size: 15px;
}

.detail-instructions {
    background: #F1F8E9;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.detail-instructions h3 {
    color: #66BB6A;
    margin-bottom: 10px;
    font-size: 18px;
}

.detail-instructions p {
    color: #666;
    line-height: 1.6;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.detail-tag {
    background: #E8F5E9;
    color: #66BB6A;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.play-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: linear-gradient(135deg, #66BB6A 0%, #4CAF50 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.5);
}

.play-btn span:first-child {
    font-size: 22px;
}

.related-games {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #E8F5E9;
}

.related-title {
    font-size: 24px;
    font-weight: 700;
    color: #66BB6A;
    margin-bottom: 25px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.related-card {
    background: #F1F8E9;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.2);
}

.related-thumb {
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-card:hover .related-thumb img {
    transform: scale(1.1);
}

.related-info {
    padding: 15px;
}

.related-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-cat {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.game-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.game-modal {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.game-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #66BB6A 0%, #4CAF50 100%);
}

.game-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.game-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.game-modal-body {
    padding: 0;
}

.game-modal-body iframe {
    display: block;
    border: none;
}

@media (max-width: 900px) {
    .detail-content {
        flex-direction: column;
    }
    
    .detail-image {
        flex: none;
        max-width: 100%;
    }
    
    .detail-title {
        font-size: 26px;
    }
}

@media (max-width: 600px) {
    .detail-page {
        padding: 20px;
    }
    
    .detail-title {
        font-size: 22px;
    }
    
    .play-btn {
        width: 100%;
        justify-content: center;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}