/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo h1 {
    font-size: 2rem;
    margin-bottom: 0.2rem;
}

.logo h1 a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo h1 a:hover {
    color: #ffd700;
}

.tagline {
    font-size: 0.9rem;
    opacity: 0.9;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1rem;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.search-box {
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 25px;
    width: 250px;
    font-size: 0.9rem;
}

.search-box button {
    padding: 0.5rem 1.5rem;
    background-color: #ffd700;
    color: #333;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.search-box button:hover {
    background-color: #ffed4e;
    transform: translateY(-2px);
}

/* Breadcrumb */
.breadcrumb {
    background-color: #e9ecef;
    padding: 0.5rem 0;
}

.breadcrumb ol {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.breadcrumb li:not(:last-child)::after {
    content: '>';
    margin-left: 0.5rem;
    color: #6c757d;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #ffd700;
    color: #333;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #ffed4e;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: #333;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Filter Section */
.filter-section {
    background-color: white;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.filter-controls {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: bold;
    color: #495057;
}

.filter-group select {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 5px;
    background-color: white;
    min-width: 150px;
}

/* Game Categories */
.game-categories {
    padding: 4rem 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.category-image {
    height: 200px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
}

.category-info {
    padding: 1.5rem;
}

.category-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.category-info p {
    color: #666;
    margin-bottom: 1rem;
}

.game-count {
    background-color: #007bff;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Games Grid */
.games-list {
    padding: 2rem 0;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.game-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.game-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.game-card:hover .game-image img {
    transform: scale(1.1);
}

.game-format,
.game-mode {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0,0,0,0.8);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.game-info {
    padding: 1.5rem;
}

.game-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.game-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.game-genre,
.game-size {
    font-size: 0.9rem;
    color: #666;
}

.game-rating {
    margin-bottom: 1rem;
}

.stars {
    color: #ffd700;
    margin-right: 0.5rem;
}

.rating-text {
    font-size: 0.9rem;
    color: #666;
}

.game-description {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.game-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-download {
    flex: 1;
    background-color: #28a745;
    color: white;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 25px;
    text-align: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-download:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

.btn-favorite {
    background: none;
    border: 2px solid #dc3545;
    color: #dc3545;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.btn-favorite:hover,
.btn-favorite.active {
    background-color: #dc3545;
    color: white;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    background-color: white;
    color: #007bff;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    background-color: #007bff;
    color: white;
}

.page-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.page-dots {
    padding: 0.5rem;
    color: #6c757d;
}

/* Featured Games */
.featured-games {
    padding: 4rem 0;
    background-color: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

/* Download Guide */
.download-guide {
    padding: 4rem 0;
    background-color: #f8f9fa;
}

.guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.step h3 {
    margin-bottom: 1rem;
    color: #333;
}

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

/* System Requirements */
.system-requirements {
    padding: 4rem 0;
    background-color: white;
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.requirement-card {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    border-left: 5px solid #007bff;
}

.requirement-card h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.3rem;
}

.requirement-card ul {
    list-style: none;
}

.requirement-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.requirement-card li:last-child {
    border-bottom: none;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #ffd700;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #495057;
    padding-top: 1rem;
    text-align: center;
    color: #adb5bd;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-box {
        width: 100%;
        justify-content: center;
    }
    
    .search-box input {
        width: 200px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group select {
        min-width: auto;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .guide-steps {
        grid-template-columns: 1fr;
    }
    
    .requirements-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .page-header {
        padding: 2rem 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .game-info {
        padding: 1rem;
    }
    
    .game-actions {
        flex-direction: column;
    }
    
    .btn-favorite {
        align-self: center;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus,
a:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .header,
    .footer,
    .filter-section,
    .pagination {
        display: none;
    }
    
    .game-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}