/* Custom styles for Traffic Rider website */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00cc00;
}

/* Game container enhancements */
.game-container {
    transition: all 0.3s ease;
}

.game-container:hover {
    transform: scale(1.01);
}

/* Animated background for sections */
.bg-animated {
    background: linear-gradient(-45deg, #1a1a2e, #16213e, #0f3460, #1a1a2e);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Enhanced button styles */
.btn-glow {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-glow:hover {
    box-shadow: 0 0 20px #00ff00;
}

/* Responsive typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.75rem;
    }
    h3 {
        font-size: 1.5rem;
    }
}

/* Loading animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading::after {
    content: '';
    width: 50px;
    height: 50px;
    border: 5px solid #00ff00;
    border-top-color: transparent;
    border-radius: 50%;
    animation: loading 1s linear infinite;
}

@keyframes loading {
    to {
        transform: rotate(360deg);
    }
}

/* Language selector enhancements */
.language-selector select {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00ff00;
    color: #00ff00;
    transition: all 0.3s ease;
}

.language-selector select:hover {
    background: rgba(0, 255, 0, 0.1);
}

/* Footer enhancements */
footer {
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ff00, transparent);
}

/* Image hover effects */
.screenshot-container {
    position: relative;
    overflow: hidden;
}

.screenshot-container img {
    transition: transform 0.3s ease;
}

.screenshot-container:hover img {
    transform: scale(1.1);
}

/* Review card enhancements */
.review-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 255, 0, 0.2);
}

/* Fullscreen button enhancement */
.fullscreen-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 255, 0, 0.2);
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fullscreen-btn:hover {
    background: rgba(0, 255, 0, 0.3);
    transform: scale(1.05);
}

/* 全局变量 */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --text-color: #ffffff;
    --background-color: #121212;
    --card-background: #1e1e1e;
    --hover-color: #45a049;
    --transition-speed: 0.3s;
    --bg-dark: #1a1a2e;
    --bg-darker: #16213e;
    --card-bg: #1f2937;
    --card-hover: #2d3748;
    --section-spacing: 4rem;
    --heading-font: 'Orbitron', 'Arial', sans-serif;
    --body-font: 'Poppins', 'Arial', sans-serif;
}

/* 全局样式 */
body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* 导航栏样式 */
nav {
    background-color: var(--card-background);
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* 语言选择器样式 */
#languageSelect {
    background-color: var(--card-background);
    color: var(--text-color);
    border: 1px solid var(--primary-color);
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

#languageSelect:hover {
    background-color: var(--primary-color);
}

/* 章节通用样式 */
section {
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-speed);
}

section:hover {
    transform: translateY(-5px);
}

/* 标题样式 */
h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 0.5rem auto;
}

/* 游戏评分部分 */
#game-rating {
    text-align: center;
}

.rating-score {
    font-size: 3rem;
    color: var(--primary-color);
    margin: 1rem 0;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* 游戏介绍部分 */
#game-intro {
    background: linear-gradient(135deg, var(--card-background) 0%, #2a2a2a 100%);
}

/* 推荐部分 */
.recommendation {
    padding: 1.5rem;
    margin: 1rem 0;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: all var(--transition-speed);
}

.recommendation:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

/* 游戏指南部分 */
.guide-section {
    margin: 1.5rem 0;
    padding: 1rem;
    border-left: 4px solid var(--primary-color);
    background-color: rgba(76, 175, 80, 0.1);
}

/* 游戏特性部分 */
.feature {
    padding: 1.5rem;
    margin: 1rem 0;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: all var(--transition-speed);
}

.feature:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

/* 玩家喜爱部分 */
.love-factor {
    padding: 1.5rem;
    margin: 1rem 0;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: all var(--transition-speed);
}

.love-factor:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

/* 游戏背景部分 */
#game-background {
    background: linear-gradient(135deg, var(--card-background) 0%, #2a2a2a 100%);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

/* 游戏历史部分 */
.history-timeline {
    position: relative;
    padding: 2rem 0;
}

.history-year {
    padding: 1rem;
    margin: 1rem 0;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: all var(--transition-speed);
}

.history-year:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(10px);
}

/* 如何游玩部分 */
.controls-section {
    margin: 1.5rem 0;
    padding: 1rem;
    border-left: 4px solid var(--secondary-color);
    background-color: rgba(33, 150, 243, 0.1);
}

/* 玩家评论部分 */
.review {
    padding: 1.5rem;
    margin: 1rem 0;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: all var(--transition-speed);
}

.review:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

.reviewer {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stars {
    color: #ffd700;
    margin-bottom: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    section {
        padding: 1rem;
        margin: 1rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .rating-score {
        font-size: 2rem;
    }

    .recommendation,
    .feature,
    .love-factor,
    .review {
        margin: 0.5rem 0;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeIn 0.5s ease-out;
}

/* 多语言切换过渡效果 */
[data-i18n] {
    transition: opacity var(--transition-speed);
}

[data-i18n].changing {
    opacity: 0;
}

/* 页脚样式 */
footer {
    background-color: var(--card-background);
    color: var(--text-color);
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

/* 图片响应式处理 */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* 无障碍焦点样式 */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
} 