/* 心理健康网 - 响应式样式 */

/* 超大屏幕 (≥1400px) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-banner {
        padding: 6rem 0;
    }
    
    .display-4 {
        font-size: 3.5rem;
    }
}

/* 大屏幕 (1200px-1399px) */
@media (max-width: 1399.98px) {
    .container {
        max-width: 1140px;
    }
}

/* 中等屏幕 (992px-1199px) */
@media (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    .hero-banner h1 {
        font-size: 2.75rem;
    }
    
    .vip-card {
        padding: 3rem !important;
    }
}

/* 平板 (768px-991px) */
@media (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
    
    /* 导航栏调整 */
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 8px;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
        margin-top: 1rem;
    }
    
    /* 英雄区域调整 */
    .hero-banner .row {
        flex-direction: column;
    }
    
    .hero-banner .col-lg-6 {
        width: 100%;
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .hero-banner .col-lg-6:last-child {
        margin-bottom: 0;
    }
    
    .hero-banner img {
        max-width: 80%;
        margin: 0 auto;
    }
    
    /* 测试卡片调整 */
    .test-card {
        margin-bottom: 1.5rem;
    }
    
    /* VIP区域调整 */
    .vip-card .row {
        flex-direction: column;
        text-align: center;
    }
    
    .vip-card .col-lg-8,
    .vip-card .col-lg-4 {
        width: 100%;
    }
    
    .vip-card .col-lg-8 {
        margin-bottom: 2rem;
    }
    
    /* 页脚调整 */
    .footer .row > div {
        margin-bottom: 2rem;
    }
    
    .footer .row > div:last-child {
        margin-bottom: 0;
    }
}

/* 手机 (576px-767px) */
@media (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }
    
    body {
        font-size: 15px;
    }
    
    /* 文字大小调整 */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    /* 按钮调整 */
    .btn {
        padding: 0.375rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1.5rem;
        font-size: 1rem;
    }
    
    /* 间距调整 */
    .section-light,
    .section-white,
    .section-vip {
        padding: 2.5rem 0;
    }
    
    .hero-banner {
        padding: 3rem 0;
    }
    
    /* 卡片调整 */
    .card-body {
        padding: 1.25rem;
    }
    
    /* 测试进度容器调整 */
    .progress-container {
        position: static;
        margin-bottom: 2rem;
    }
    
    /* 报告页面调整 */
    .report-header {
        padding: 2rem 0;
        margin-top: 1rem;
    }
    
    .score-display {
        font-size: 2.5rem;
    }
    
    /* 打印按钮位置调整 */
    .print-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}

/* 小手机 (<576px) */
@media (max-width: 575.98px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100%;
    }
    
    /* 文字大小调整 */
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    /* 品牌文字隐藏 */
    .brand-text {
        display: none;
    }
    
    /* 按钮组调整 */
    .d-flex.flex-wrap.gap-3 {
        gap: 0.5rem !important;
    }
    
    .btn-lg {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* 测试信息调整 */
    .test-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    /* VIP价格调整 */
    .vip-price .price {
        font-size: 2rem;
    }
    
    .vip-price .currency {
        font-size: 1rem;
    }
    
    /* 表格调整 */
    .table-responsive {
        font-size: 0.875rem;
    }
    
    /* 页脚文字居中 */
    .footer .text-md-end {
        text-align: left !important;
    }
    
    /* 模态框调整 */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    /* 工具提示调整 */
    .tooltip {
        font-size: 0.75rem;
    }
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        padding-top: 0;
        font-size: 12pt;
        color: #000;
        background: white;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .btn {
        display: none !important;
    }
    
    a {
        color: #000;
        text-decoration: none;
    }
    
    /* 避免分页时切断重要内容 */
    .card,
    .recommendation-item,
    .disclaimer-box {
        page-break-inside: avoid;
    }
    
    /* 报告页眉 */
    @page {
        margin: 2cm;
    }
    
    /* 隐藏所有背景色和阴影 */
    .bg-dark,
    .bg-light,
    .bg-white {
        background: white !important;
        color: black !important;
    }
    
    .text-white,
    .text-primary,
    .text-success {
        color: black !important;
    }
    
    .shadow-sm,
    .shadow {
        box-shadow: none !important;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #6c8eff;
        --light-color: #2d3748;
        --dark-color: #e2e8f0;
    }
    
    body {
        background-color: #1a202c;
        color: #e2e8f0;
    }
    
    .navbar {
        background-color: #2d3748 !important;
    }
    
    .card {
        background-color: #2d3748;
        color: #e2e8f0;
    }
    
    .section-white {
        background-color: #2d3748;
    }
    
    .section-light {
        background-color: #1a202c;
    }
    
    .text-muted {
        color: #a0aec0 !important;
    }
    
    .footer {
        background-color: #2d3748;
    }
    
    /* 测试页面特殊处理 */
    .option-item {
        background-color: #4a5568;
        border-color: #718096;
    }
    
    .option-item:hover {
        background-color: #2d3748;
    }
    
    .progress-container {
        background-color: #2d3748;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --danger-color: #ff0000;
        --success-color: #008000;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: underline;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .card,
    .test-card,
    .option-item {
        transition: none !important;
    }
}