/**
 * 响应式设计样式
 * 针对不同屏幕尺寸的优化
 */

/* 大屏幕 (1200px+) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 中等屏幕 (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .ranking-table th,
    .ranking-table td {
        padding: 0.8rem;
    }
    
    .exchange-info {
        gap: 1.5rem;
    }
    
    .exchange-logo img {
        width: 60px;
        height: 60px;
    }
}

/* 小屏幕 (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
    .header .container {
        flex-direction: column;
        text-align: center;
    }
    
    .logo {
        justify-content: center;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .logo-image {
        height: 35px;
    }
    
    .nav {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .ranking-table {
        font-size: 0.9rem;
    }
    
    .ranking-table th,
    .ranking-table td {
        padding: 0.6rem;
    }
    
    .exchange-info {
        flex-direction: column;
        text-align: center;
    }
    
    .exchange-links {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 超小屏幕 (320px - 479px) */
@media (max-width: 479px) {
    .container {
        padding: 0 10px;
    }
    
    .header {
        padding: 0.8rem 0;
    }
    
    .logo {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .logo-image {
        height: 30px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo .tagline {
        font-size: 0.8rem;
    }
    
    .nav {
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .hero {
        padding: 1.5rem 1rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .update-info {
        font-size: 0.8rem;
        padding: 0.8rem;
    }
    
    .ranking-section h2,
    .exchange-stats h2,
    .hot-pairs h2 {
        font-size: 1.3rem;
        padding: 1.5rem 1rem 1rem;
    }
    
    .ranking-table {
        font-size: 0.8rem;
    }
    
    .ranking-table th,
    .ranking-table td {
        padding: 0.4rem;
    }
    
    .exchange-logo img {
        width: 50px;
        height: 50px;
    }
    
    .exchange-details h1 {
        font-size: 1.5rem;
    }
    
    .exchange-name-en {
        font-size: 1rem;
    }
    
    .exchange-links {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: 1rem;
    }
    
    .about-content {
        padding: 1.5rem 1rem;
    }
    
    .about-content h1 {
        font-size: 2rem;
    }
    
    .about-section h2 {
        font-size: 1.3rem;
    }
    
    .about-section p {
        font-size: 0.9rem;
    }
    
    .contact-info {
        padding: 1rem;
    }
    
    .disclaimer {
        padding: 1rem;
    }
    
    .disclaimer p {
        font-size: 0.9rem;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .error-content h1 {
        font-size: 4rem;
    }
    
    .error-content h2 {
        font-size: 1.5rem;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 200px;
    }
}

/* 横屏手机优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 1rem 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-description {
        margin-bottom: 1rem;
    }
    
    .main {
        padding: 1rem 0;
    }
}

/* 打印样式 */
@media print {
    .header,
    .footer,
    .nav,
    .btn-primary,
    .btn-secondary,
    .btn-detail {
        display: none;
    }
    
    .main {
        padding: 0;
    }
    
    .ranking-table {
        font-size: 12px;
    }
    
    .ranking-table th,
    .ranking-table td {
        padding: 4px;
        border: 1px solid #000;
    }
    
    .exchange-header {
        break-inside: avoid;
    }
    
    .stats-grid {
        display: block;
    }
    
    .stat-card {
        display: inline-block;
        width: 45%;
        margin: 5px;
        vertical-align: top;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .header {
        background: #000;
        color: #fff;
    }
    
    .btn-primary {
        background: #000;
        border: 2px solid #fff;
    }
    
    .btn-secondary {
        background: #666;
        border: 2px solid #fff;
    }
    
    .ranking-table th {
        background: #000;
        color: #fff;
    }
    
    .ranking-row:hover {
        background: #f0f0f0;
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

