/* 移动端（小于768px）*/
@media screen and (max-width: 767px) {
    :root {
        --spacing-md: 12px;
        --spacing-lg: 16px;
        --spacing-xl: 24px;
        
        --font-size-xs: 12px;
        --font-size-sm: 14px;
        --font-size-md: 16px;
        --font-size-lg: 20px;
        --font-size-xl: 24px;
        --font-size-xxl: 28px;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .site-header {
        padding: var(--spacing-sm) 0;
    }
    
    .site-title {
        font-size: var(--font-size-md);
    }
    
    .logo svg {
        width: 24px;
        height: 24px;
    }
    
    .game-library {
        padding: var(--spacing-md) 0;
    }
    
    .games-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--spacing-sm);
    }
}

/* 平板（768px-1023px）*/
@media screen and (min-width: 768px) and (max-width: 1023px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
    
    .games-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* 小桌面（1024px-1279px）*/
@media screen and (min-width: 1024px) and (max-width: 1279px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
    
    .games-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

/* 大桌面（1280px及以上）*/
@media screen and (min-width: 1280px) {
    .container {
        padding: 0 var(--spacing-xl);
    }
    
    .games-grid {
        grid-template-columns: repeat(10, 1fr);
    }
    
    .game-container {
        max-height: 70vh;
    }
}

/* 打印样式 */
@media print {
    .site-header,
    .game-library,
    .game-container {
        display: none;
    }
    
    .game-info {
        background-color: white;
        color: black;
        padding: 0;
    }
    
    .game-details h2 {
        color: black;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --color-background: #121212;
        --color-text-dark: #E0E0E0;
        --color-border: #333333;
    }
}

/* 减少动画（如果用户偏好） */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 移动端样式 */
@media (max-width: 768px) {
    .game-container {
        height: 50vh;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .site-header {
        padding: var(--spacing-sm) 0;
    }
    
    .games-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: var(--spacing-xs);
    }
    
    .game-card img {
        border-radius: var(--border-radius-sm);
    }
    
    .game-details h1 {
        font-size: var(--font-size-lg);
    }
    
    .game-details p {
        font-size: var(--font-size-sm);
    }
} 