/* responsive.css - 响应式样式 */

/* 通用响应式调整 */
@media (max-width: 576px) {
    /* 超小屏幕 - 手机竖屏 */
    
    /* 基础调整 */
    html {
        font-size: 14px;
    }
    
    body {
        font-size: 0.9rem;
    }
    
    /* 导航栏调整 */
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-brand img {
        height: 30px;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }
    
    /* 灯笼区域 */
    .lantern.card {
        margin-bottom: 1rem;
    }
    
    .lantern .countdown {
        font-size: 1.5rem;
    }
    
    /* 表格响应式 */
    .table-responsive {
        margin-bottom: 1rem;
        overflow-x: auto;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    /* 移动端导航 */
    .mobile-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #dee2e6;
        z-index: 1000;
    }
    
    .mobile-nav a {
        flex: 1;
        text-align: center;
        padding: 10px 5px;
        color: #6c757d;
        text-decoration: none;
        font-size: 0.8rem;
    }
    
    .mobile-nav a.active {
        color: #0d6efd;
        font-weight: bold;
    }
    
    .mobile-nav a i {
        display: block;
        font-size: 1.2rem;
        margin-bottom: 5px;
    }
    
    /* 轮播图调整 */
    .swiper-container {
        margin-top: 3.5rem !important;
    }
    
    .swiper-slide img {
        height: 250px !important;
    }
    
    /* 页脚调整 */
    footer {
        padding-bottom: 4rem !important;
    }
    
    footer .row > div {
        margin-bottom: 1.5rem;
    }
    
    /* 按钮调整 */
    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

@media (min-width: 576px) and (max-width: 768px) {
    /* 小屏幕 - 手机横屏/小平板 */
    
    .lantern .countdown {
        font-size: 1.75rem;
    }
    
    .swiper-slide img {
        height: 300px !important;
    }
    
    .mobile-nav {
        display: none;
    }
}

@media (max-width: 768px) {
    /* 平板及以下 */
    
    /* 隐藏桌面端搜索框 */
    .d-md-none .d-none {
        display: none !important;
    }
    
    /* 表格紧凑 */
    table th, table td {
        padding: 0.5rem;
    }
    
    /* 卡片间距调整 */
    .card {
        margin-bottom: 1rem;
    }
    
    /* 容器内边距调整 */
    .container, .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* 后台布局调整 */
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 1rem !important;
    }
}

@media (min-width: 768px) and (max-width: 992px) {
    /* 中等屏幕 - 平板 */
    
    .lantern .countdown {
        font-size: 1.75rem;
    }
    
    .swiper-slide img {
        height: 350px !important;
    }
    
    /* 后台侧边栏调整 */
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px !important;
    }
}

@media (min-width: 992px) {
    /* 大屏幕及以上 - 桌面端 */
    
    .mobile-nav {
        display: none !important;
    }
    
    /* 后台布局 */
    .main-content {
        margin-left: 250px;
        padding: 2rem;
        min-height: 100vh;
        transition: margin-left 0.3s ease;
    }
}

@media (min-width: 1200px) {
    /* 超大屏幕 */
    
    .container {
        max-width: 1140px;
    }
    
    /* 灯笼区域优化 */
    .lantern.card {
        height: 380px;
    }
    
    /* 轮播图 */
    .swiper-slide img {
        height: 450px !important;
    }
}

@media (min-width: 1400px) {
    /* 特大屏幕 */
    
    .container {
        max-width: 1320px;
    }
}

/* 打印样式 */
@media print {
    .no-print,
    .navbar,
    .mobile-nav,
    .sidebar,
    .sidebar-toggle,
    #back-to-top,
    .btn {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    a {
        color: black !important;
        text-decoration: none !important;
    }
    
    table {
        width: 100% !important;
        border-collapse: collapse !important;
    }
    
    table, th, td {
        border: 1px solid black !important;
    }
    
    th, td {
        padding: 4px !important;
        text-align: left !important;
    }
    
    .page-break {
        page-break-before: always;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    :root {
        --text-color: #000;
        --bg-color: #fff;
    }
    
    body {
        color: var(--text-color);
        background-color: var(--bg-color);
    }
    
    a {
        text-decoration: underline;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
    }
    
    .card {
        background-color: #1e1e1e;
        border-color: #333;
    }
    
    .table {
        color: #e0e0e0;
    }
    
    .table-dark {
        background-color: #2d2d2d;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    /* 触摸设备 */
    .btn, 
    .nav-link,
    .form-control,
    .form-select {
        min-height: 44px; /* 最小触摸目标尺寸 */
    }
    
    .lantern {
        cursor: default;
    }
    
    .lantern:hover {
        transform: none;
    }
}

/* 减少动画（辅助功能） */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 方向特定样式 */
@media (orientation: portrait) {
    /* 竖屏 */
    .swiper-container {
        height: 250px;
    }
}

@media (orientation: landscape) {
    /* 横屏 */
    .swiper-container {
        height: 300px;
    }
}

/* 像素密度调整 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* 视网膜屏幕 */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}