/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

:root {
    --primary-color: #3a86ff;
    --secondary-color: #ff006e;
    --dark-color: #1e1e24;
    --light-color: #f8f9fa;
    --accent-color: #ffbe0b;
}

body {
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
}

/* 导航栏样式 */
header {
    background-color: var(--dark-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 1.5rem;
}

.nav-links a {
    color: var(--light-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* 英雄区域样式 */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('racing-background.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 5rem 1rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.play-btn {
    background-color: var(--accent-color);
    color: var(--dark-color);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 游戏容器样式 */
.game-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
    aspect-ratio: 16/9;
    position: relative;
}

iframe {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.fallback-message {
    display: none;
    text-align: center;
    padding: 3rem;
    background-color: #f0f0f0;
    border-radius: 10px;
}

/* 内容区域样式 */
.content-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.content-section h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--primary-color);
    position: relative;
}

.content-section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 0.5rem auto;
}

/* 游戏指南样式 */
.instructions {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.instruction-step {
    display: flex;
    align-items: flex-start;
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.step-number {
    background-color: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 1rem;
}

/* 优势和特征网格样式 */
.advantages-grid,
.features-grid,
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* FAQ样式 */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

/* 页脚样式 */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.copyright {
    margin-top: 2rem;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
}

/* FAQ样式补充 */
.faq-item {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: white;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    cursor: pointer;
    background-color: white;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--dark-color);
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: transform 0.3s;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 1.2rem;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 0 1.2rem 1.2rem;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

/* Games Section Styles */
#more-games {
    min-height: 100vh;
    padding: 4rem 0;
}

.games-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.games-header h2 {
    margin: 0;
    flex: 1;
}

.refresh-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.refresh-btn:hover:not(.loading) {
    background: linear-gradient(135deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.refresh-btn.loading {
    background: linear-gradient(135deg, #999, #777);
    cursor: not-allowed;
}

.refresh-icon {
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.refresh-icon.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Games Grid Styles */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    min-height: 400px;
}

.game-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.game-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-image img {
    transform: scale(1.05);
}

.game-info {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.game-category {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
}

.game-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 0.8rem 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Loading and Error States */
.loading, .error, .no-games {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    font-size: 1.1rem;
    color: #666;
}

.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 10px;
    color: #999;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.error {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border-radius: 10px;
}

.retry-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 10px 20px;
    border-radius: 25px;
    margin-top: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: white;
    color: #ff6b6b;
}

.no-games {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
    border-radius: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .games-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .refresh-btn {
        align-self: stretch;
        justify-content: center;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.2rem;
    }
    
    .game-card {
        margin: 0 auto;
        max-width: 280px;
    }
    
    .game-info {
        padding: 1.2rem;
    }
    
    .game-title {
        font-size: 1.1rem;
    }

    #more-games {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .game-image {
        height: 150px;
    }
    
    .game-info {
        padding: 1rem;
    }

    .game-title {
        font-size: 1rem;
    }

    #more-games {
        padding: 2rem 0;
    }
}

/* Game Details Page Styles */
.game-details-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    text-align: center;
    font-size: 1.2rem;
    color: #666;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.game-details-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    text-align: center;
    padding: 2rem;
}

.game-details-error h2 {
    color: #ff6b6b;
    margin-bottom: 1rem;
}

.game-details-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.game-details-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.back-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.game-details-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
    line-height: 1.2;
}

.game-details-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.game-play-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.game-iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    border-radius: 10px;
    overflow: hidden;
}

.game-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.no-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

.game-info-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.game-description,
.game-controls,
.game-faq,
.game-video {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
}

.game-description h3,
.game-controls h3,
.game-faq h3,
.game-video h3 {
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.game-description p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.controls-content {
    color: #666;
    line-height: 1.6;
}

.faq-content {
    color: #666;
    line-height: 1.6;
}

/* FAQ Detail Styles */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item-detail {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.2rem;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.faq-item-detail:hover {
    background: #f0f2f5;
    transform: translateX(5px);
}

.faq-question-detail {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.question-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 15px;
    min-width: 25px;
    text-align: center;
    flex-shrink: 0;
}

.question-text {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
    line-height: 1.4;
}

.faq-answer-detail {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding-left: 0.5rem;
}

.answer-icon {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 15px;
    min-width: 25px;
    text-align: center;
    flex-shrink: 0;
}

.answer-text {
    color: #555;
    line-height: 1.5;
    font-size: 0.95rem;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 10px;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Game Card Click Effect */
.game-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Responsive Design for Game Details */
@media (max-width: 768px) {
    .game-details-container {
        padding: 1rem;
    }
    
    .game-details-title {
        font-size: 2rem;
    }
    
    .game-details-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .game-play-section,
    .game-description,
    .game-controls,
    .game-faq,
    .game-video {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .game-details-title {
        font-size: 1.5rem;
    }
    
    .back-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 1rem;
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
    align-items: start;
}

.footer-logo h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-logo p {
    color: #bdc3c7;
    line-height: 1.6;
    margin: 0;
    max-width: 300px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    justify-items: start;
    align-items: start;
}

.footer-section {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ecf0f1;
    position: relative;
    padding-bottom: 0.5rem;
    margin-top: 0;
}

.footer-section h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
}

.footer-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: #ffd700;
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright p {
    margin: 0;
    color: #95a5a6;
    font-size: 0.9rem;
    line-height: 1.4;
}

.footer-copyright p:first-child {
    font-weight: 600;
    color: #ecf0f1;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.footer-social a:hover {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
}

/* Footer Responsive Design */
@media (max-width: 992px) {
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .footer-content {
        padding: 2rem 1rem 1rem;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-logo {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .footer-logo p {
        max-width: none;
    }
    
    .footer-links {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        justify-items: center;
        text-align: center;
    }
    
    .footer-section h4:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-logo h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-section h4 {
        font-size: 1rem;
        text-align: center;
    }
    
    .footer-section ul {
        text-align: center;
    }
    
    .footer-section h4:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-social a {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
} 