/* 响应式设计样式 */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --text-color: #333;
    --light-text-color: #666;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
    --font-family-base: 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* 全局样式 */
body {
    font-family: var(--font-family-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
}

/* 链接样式 */
a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* 容器 */
.container {
    padding-left: 15px;
    padding-right: 15px;
}

/* 表格 */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table th, .table td {
    white-space: nowrap;
    vertical-align: middle;
}

/* 表单 */
.form-control {
    width: 100%;
    max-width: 400px;
    border-color: var(--border-color);
}

/* 按钮 */
.btn {
    white-space: nowrap;
    border-radius: .25rem;
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: var(--primary-color);
}

/* 卡片 */
.card {
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: .5rem;
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075)!important;
}

/* 导航 */
.navbar {
    background-color: #fff !important;
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
    font-weight: bold;
    color: var(--primary-color) !important;
}

.nav-link {
    color: var(--text-color) !important;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* 英雄区域 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 80px 0;
    border-radius: .5rem;
    margin-bottom: 30px;
}

/* 功能特色卡片 */
.feature-card {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
}

.feature-card .card-body i {
    color: var(--primary-color) !important;
}

/* 使用说明步骤 */
.how-it-works .rounded-circle {
    background-color: var(--primary-color) !important;
}

/* 图片 */
.img-fluid {
    max-width: 100%;
    height: auto;
}

/* 二维码图片 */
.qr-code-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border: 1px solid var(--border-color);
    border-radius: .25rem;
}

/* 操作按钮组 */
.action-buttons .btn {
    margin-right: 5px;
    margin-bottom: 5px;
}

/* 状态标签 */
.status-badge {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

/* 统计卡片 */
.stat-card {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    background-color: #fff;
}

.stat-card h4 {
    font-size: 1.2em;
    color: var(--light-text-color);
}

.stat-card p {
    font-size: 2em;
    font-weight: bold;
    color: var(--primary-color);
}

/* 搜索框和工具栏 */
.search-toolbar {
    display: flex;
}

/* 动态页面样式 */
.dynamic-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.dynamic-page body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

.dynamic-page .container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.dynamic-page .header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.dynamic-page .title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 8px;
}

.dynamic-page .subtitle {
    font-size: 16px;
    opacity: 0.9;
}

.dynamic-page .content {
    padding: 40px 20px;
}

.dynamic-page .content h1, .dynamic-page .content h2, .dynamic-page .content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
}

.dynamic-page .content h1 {
    font-size: 24px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.dynamic-page .content h2 {
    font-size: 20px;
}

.dynamic-page .content h3 {
    font-size: 18px;
}

.dynamic-page .content p {
    margin-bottom: 15px;
    text-align: justify;
}

.dynamic-page .content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

/* 搜索框和工具栏 */
.search-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.search-toolbar .form-control {
    flex-grow: 1;
    max-width: none;
}

.search-toolbar .btn {
    flex-shrink: 0;
}

/* 页脚 */
.footer {
    background-color: #343a40 !important;
    color: #fff !important;
    padding: 20px 0;
    margin-top: 50px;
}

/* 媒体查询 - 移动设备 */
@media (max-width: 767.98px) {
    body {
        font-size: 14px;
    }

    .display-4 {
        font-size: 2.5rem;
    }

    .lead {
        font-size: 1rem;
    }

    .hero-section {
        padding: 50px 0;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    .navbar-nav .nav-link, .navbar-nav .btn {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }

    .feature-card {
        margin-bottom: 20px;
    }

    .how-it-works .col-md-3 {
        margin-bottom: 30px;
    }

    .qr-code-img {
        width: 80px;
        height: 80px;
    }

    .action-buttons .btn {
        width: 100%;
        margin-right: 0;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-card h4 {
        font-size: 1em;
    }

    .stat-card p {
        font-size: 1.5em;
    }

    .search-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* 媒体查询 - 平板设备 */
@media (min-width: 768px) and (max-width: 991.98px) {
    body {
        font-size: 15px;
    }

    .display-4 {
        font-size: 3rem;
    }

    .lead {
        font-size: 1.1rem;
    }

    .hero-section {
        padding: 60px 0;
    }

    .qr-code-img {
        width: 90px;
        height: 90px;
    }
}

/* 媒体查询 - 桌面设备 */
@media (min-width: 992px) and (max-width: 1199.98px) {
    body {
        font-size: 16px;
    }

    .display-4 {
        font-size: 3.5rem;
    }

    .lead {
        font-size: 1.2rem;
    }

    .hero-section {
        padding: 70px 0;
    }
}

/* 媒体查询 - 超大屏幕 */
@media (min-width: 1200px) {
    body {
        font-size: 16px;
    }

    .display-4 {
        font-size: 4rem;
    }

    .lead {
        font-size: 1.25rem;
    }

    .hero-section {
        padding: 80px 0;
    }
}

/* 打印样式 */
@media print {
    .navbar, .footer, .action-buttons, .pagination, .search-toolbar {
        display: none !important;
    }

    body {
        background-color: #fff;
        color: #000;
    }

    .container {
        width: auto;
        max-width: 100%;
        padding: 0;
    }

    table {
        width: 100%;
        border-collapse: collapse;
    }

    th, td {
        border: 1px solid #ccc;
        padding: 8px;
    }
}

/* 辅助类 */
.d-print-none {
    display: block !important;
}

@media print {
    .d-print-none {
        display: none !important;
    }
}

.d-print-block {
    display: none !important;
}

@media print {
    .d-print-block {
        display: block !important;
    }
}

/* 操作按钮组响应式 */
.action-buttons {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

@media (max-width: 767.98px) {
  .action-buttons {
    flex-direction: column;
  }
  
  .action-buttons .btn {
    margin-bottom: 0.25rem;
  }
}

/* 状态标签响应式 */
.badge {
  font-size: 0.75em;
  padding: 0.25em 0.4em;
}

@media (max-width: 767.98px) {
  .badge {
    font-size: 0.7em;
    padding: 0.2em 0.3em;
  }
}

/* 分页响应式 */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 767.98px) {
  .pagination .page-item {
    margin: 0.1rem;
  }
  
  .pagination .page-link {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
  }
}

/* 统计卡片响应式 */
.stats-card {
  text-align: center;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
}

@media (max-width: 767.98px) {
  .stats-card {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }
}

/* 搜索框响应式 */
.search-box {
  max-width: 300px;
  width: 100%;
}

@media (max-width: 767.98px) {
  .search-box {
    max-width: 100%;
  }
}

/* 工具栏响应式 */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 767.98px) {
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .toolbar > * {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

/* 文本截断 */
.text-truncate-mobile {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .text-truncate-mobile {
    max-width: 150px;
  }
}

/* 隐藏/显示工具类 */
@media (max-width: 575.98px) {
  .d-none-xs { display: none !important; }
  .d-block-xs { display: block !important; }
}

@media (max-width: 767.98px) {
  .d-none-sm { display: none !important; }
  .d-block-sm { display: block !important; }
}

@media (max-width: 991.98px) {
  .d-none-md { display: none !important; }
  .d-block-md { display: block !important; }
}

@media (max-width: 1199.98px) {
  .d-none-lg { display: none !important; }
  .d-block-lg { display: block !important; }
}

/* 打印样式 */
@media print {
  .no-print {
    display: none !important;
  }
  
  .table {
    border-collapse: collapse;
  }
  
  .table th,
  .table td {
    border: 1px solid #000;
  }
}