/* 响应式设计样式 */

/* 平板设备 (768px 及以下) */
@media (max-width: 768px) {
    /* 导航栏 */
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: var(--spacing-xl);
        transition: var(--transition);
        box-shadow: var(--shadow);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu .nav-link {
        font-size: var(--font-size-lg);
        padding: var(--spacing-md) 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* 首页横幅 */
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-lg);
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 200px;
        justify-content: center;
    }
    
    /* 统计信息 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .stat-number {
        font-size: var(--font-size-2xl);
    }
    
    /* 筛选器 */
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: none;
        margin-bottom: var(--spacing-md);
    }
    
    .view-toggle {
        justify-content: center;
    }
    
    /* 作品网格 */
    .works-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .works-grid.list-view .work-card {
        flex-direction: column;
    }
    
    .works-grid.list-view .work-card-image {
        width: 100%;
        height: 200px;
    }
    
    /* 关于部分 */
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-text {
        order: 2;
    }
    
    .about-image {
        order: 1;
    }
    
    .image-placeholder {
        width: 200px;
        height: 200px;
    }
    
    .image-placeholder i {
        font-size: 3rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    /* 联系部分 */
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: var(--spacing-lg);
    }
    
    /* 页脚 */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    /* 模态框 */
    .modal-content {
        margin: var(--spacing-md);
        max-height: calc(100vh - 2rem);
    }
    
    .modal-header,
    .modal-body {
        padding: var(--spacing-md);
    }
}

/* 手机设备 (480px 及以下) */
@media (max-width: 480px) {
    /* 基础设置 */
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* 导航栏 */
    .nav-container {
        padding-left: var(--spacing-sm);
        padding-right: var(--spacing-sm);
    }
    
    .nav-brand h1 {
        font-size: var(--font-size-lg);
    }
    
    /* 首页横幅 */
    .hero-title {
        font-size: var(--font-size-2xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-base);
    }
    
    .hero-content {
        padding: 0 var(--spacing-sm);
    }
    
    /* 统计信息 */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        padding: var(--spacing-md);
    }
    
    /* 区域标题 */
    .section-title {
        font-size: var(--font-size-2xl);
    }
    
    .section-subtitle {
        font-size: var(--font-size-base);
    }
    
    /* 筛选器 */
    .filter-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: var(--spacing-sm);
    }
    
    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* 作品卡片 */
    .work-card-content {
        padding: var(--spacing-md);
    }
    
    .work-card-title {
        font-size: var(--font-size-base);
    }
    
    .work-card-description {
        font-size: var(--font-size-xs);
    }
    
    /* 关于部分 */
    .about-text h2 {
        font-size: var(--font-size-2xl);
    }
    
    .about-text p {
        font-size: var(--font-size-base);
    }
    
    .image-placeholder {
        width: 150px;
        height: 150px;
    }
    
    .image-placeholder i {
        font-size: 2rem;
    }
    
    .skill-item {
        padding: var(--spacing-md);
    }
    
    .skill-item i {
        font-size: 2rem;
    }
    
    /* 联系部分 */
    .contact-item {
        padding: var(--spacing-md);
    }
    
    .contact-item i {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-base);
    }
    
    /* 按钮 */
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-sm);
    }
    
    /* 回到顶部按钮 */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* 大屏幕设备 (1200px 及以上) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .works-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
    
    .skills-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 超大屏幕设备 (1400px 及以上) */
@media (min-width: 1400px) {
    .container {
        max-width: 1600px;
    }
    
    .works-grid {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .hero-section,
    .back-to-top,
    .modal {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0;
    }
    
    .work-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .work-card:hover {
        transform: none;
    }
    
    .btn {
        display: none;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #000000;
        --text-secondary: #333333;
        --bg-primary: #ffffff;
        --border-color: #000000;
    }
    
    .work-card {
        border: 2px solid var(--border-color);
    }
    
    .btn-outline {
        border-width: 3px;
    }
}

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

/* 横屏模式 (手机) */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 70vh;
    }
    
    .hero-title {
        font-size: var(--font-size-2xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-base);
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
