/* ========================================
   墨韵幽境 — 响应式增强
   ======================================== */

/* ── 容器 ── */

.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 768px) {
    .container { padding: 0 24px; }
}

@media (min-width: 1200px) {
    .container { padding: 0 48px; }
}

/* ── 响应式方向 ── */

.flex-responsive {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .flex-responsive { flex-direction: row; }
}

/* ── 响应式网格 ── */

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

/* ── 触摸友好 ── */

.touch-target {
    min-width: 44px;
    min-height: 44px;
}

/* ── 安全区域 ── */

.safe-area-top { padding-top: env(safe-area-inset-top); }
.safe-area-bottom { padding-bottom: env(safe-area-inset-bottom); }

/* ── 响应式隐藏 ── */

.hide-mobile { display: none; }

@media (min-width: 768px) {
    .hide-mobile { display: block; }
}

.hide-desktop { display: block; }

@media (min-width: 768px) {
    .hide-desktop { display: none; }
}

/* ── 文字溢出 ── */

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── 滚动 ── */

.scroll-touch {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
}

.scrollbar-hidden {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hidden::-webkit-scrollbar {
    display: none;
}

/* ── 响应式图片/视频 ── */

.img-responsive {
    max-width: 100%;
    height: auto;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* ── 游戏界面专用 ── */

.game-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.game-options {
    width: 100%;
    padding: 16px;
}

@media (min-width: 768px) {
    .game-options { max-width: 800px; margin: 0 auto; padding: 24px; }
}

/* ── 减少动画 ── */

@media (prefers-reduced-motion: reduce) {
    html:not(.dn-motion-preview) *,
    html:not(.dn-motion-preview) *::before,
    html:not(.dn-motion-preview) *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── 打印 ── */

@media print {
    .no-print { display: none !important; }
    body { background: white !important; color: black !important; }
}
