:root {
    /* 主色调 */
    --color-primary: #c95dac;
    --color-primary-mid: #c95dac;
    --color-primary-light: #c95dac;

    /* 强调色（Play 按钮） */
    --color-accent: #c95dac;
    --color-accent-dark: #c95dac;

    /* 背景色 */
    --bg-body: #c95dac;
    --bg-card: #c95dac;
    --bg-white: #c95dac;

    /* 文字色 */
    --text-primary: #fff;
    --text-secondary: #fff;

    /* 主题阴影 */
    --shadow-primary: rgba(13, 148, 136, 0.3);
    --shadow-primary-hover: rgba(13, 148, 136, 0.4);
    --shadow-primary-light: rgba(13, 148, 136, 0.15);
    --shadow-primary-strong: rgba(13, 148, 136, 0.5);
    --shadow-accent: rgba(16, 185, 129, 0.4);
    --shadow-accent-hover: rgba(16, 185, 129, 0.5);
    --shadow-soft: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
}

.app-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-mid) 50%, var(--color-primary-light) 100%);
    color: white;
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 15px var(--shadow-primary);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
}

.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 0.75rem;
    background-color: #fff;
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px var(--shadow-soft);
}

.toggle-bar {
    width: 24px;
    height: 3px;
    background-color: #1e293b;
    border-radius: 2px;
    transition: all 0.3s ease-out;
}

.mobile-menu-toggle.active .toggle-bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active .toggle-bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .toggle-bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.site-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: white;
}

.site-logo svg {
    height: 40px;
    width: auto;
}

.language-select {
    position: relative;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.language-select select {
    display: none;
}

.app-body {
    display: flex;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.side-nav {
    width: 200px;
    background-color: var(--color-primary);
    padding: 1.5rem 1rem;
    flex-shrink: 0;
    overflow-y: auto;
}

.side-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #fff;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in;
    font-size: 0.9rem;
}

.side-nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.side-nav img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.main-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.content-area {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.section-wrapper {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title img {
    width: 24px;
    height: 24px;
}

.section-title a {
    color: var(--color-primary);
    text-decoration: none;
}

.section-title a:hover {
    text-decoration: underline;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .game-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .game-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.game-card {
    background-color: var(--bg-card);
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.25s ease-out;
    cursor: pointer;
}

.game-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 10px 15px -3px var(--shadow-primary-light);
}

.game-card a {
    text-decoration: none;
    color: inherit;
}

.game-icon-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

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

.game-card:hover .game-icon-wrapper img {
    transform: scale(1.05);
}

.game-name-container {
    padding: 0.75rem;
}

.game-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-container {
    text-align: center;
    margin-top: 1.5rem;
}

.btn-primary {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease-in;
    box-shadow: 0 4px 6px var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px var(--shadow-primary-hover);
}

.site-footer {
    background-color: var(--color-primary);
    color: white;
    padding: 2rem 1.5rem;
    margin-top: 2rem;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease-in;
}

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

.footer-copyright {
    text-align: center;
    font-size: 0.8rem;
}

.ad-container {
    text-align: center;
    padding: 1rem;
    background-color: var(--bg-body);
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--shadow-primary-hover);
    transition: all 0.2s ease-in;
    z-index: 50;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px var(--shadow-primary-strong);
}

.back-to-top img {
    width: 24px;
    height: 24px;
}

.mobile-nav-scroll {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background-color: var(--color-primary);
    z-index: 90;
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    padding: 4rem 1rem 1rem;
    overflow-y: auto;
}

.mobile-nav-scroll.open {
    transform: translateX(0);
}

.mobile-nav-scroll ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-nav-scroll a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #fff;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.mobile-nav-scroll a:hover {
    background-color: var(--color-primary);
    color: white;
}

.mobile-nav-scroll img {
    width: 18px;
    height: 18px;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .side-nav {
        display: none;
    }

    .mobile-nav-scroll {
        display: block;
    }
}

.game-detail-header {
    position: relative;
    height: 250px;
    overflow: hidden;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.game-detail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.game-detail-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid white;
    margin-bottom: 1rem;
    overflow: hidden;
}

.game-detail-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.play-btn-container {
    margin-top: 1rem;
}

.play-btn {
    display: inline-block;
    padding: 1rem 3rem;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.2s ease-in;
    box-shadow: 0 4px 12px var(--shadow-accent);
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow-accent-hover);
}

.similar-games-section {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.similar-games-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.fullscreen-game {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000;
    z-index: 300;
    display: flex;
    flex-direction: column;
}

.fullscreen-game iframe {
    flex: 1;
    border: none;
    width: 100%;
}

.game-settings-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in;
}

.game-settings-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.game-settings-btn img {
    width: 24px;
    height: 24px;
}

/* Game Detail Styles */
.game-detail {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.game-header {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 0.75rem;
}

.game-background {
    width: 100%;
    height: 100%;
    background-image: url('./EndlessTruckTeaser.jpg?v=0.2-9116448e');
    background-size: cover;
    background-position: center;
}

.background-darken {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-icon-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    overflow: hidden;
    display: block;
    margin: 0 auto 1rem;
}

.game-icon-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-align: center;
    margin-bottom: 1rem;
}

.game-info-section {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.game-infos {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

/* Game Overlay Styles */
.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
}

.game-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.game-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.game-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.game-control-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in;
}

.game-control-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.game-control-btn svg {
    width: 24px;
    height: 24px;
}

.close-btn {
    background: rgba(239, 68, 68, 0.8);
    border-color: rgba(239, 68, 68, 0.9);
}

.close-btn:hover {
    background: rgba(239, 68, 68, 1);
}

/* Clamp effect */
.clamp {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.1) 0%, transparent 50%);
    pointer-events: none;
}
