/* 반응형 디자인 */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .stage-flow {
        flex-direction: column;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
    
    .wizard-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .recommend-btn {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stage-explanation {
        grid-template-columns: 1fr;
    }
    
    .stage-explain-item {
        padding: var(--spacing-md);
    }
    
    .stage-number {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-emoji {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .tool-card {
        padding: 1rem;
    }
    
    .tool-emoji {
        font-size: 2rem;
    }
    
    .tool-name {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .pathways-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .nav-menu {
        width: 100%;
    }
    
    .stage-explain-item {
        flex-direction: column;
        text-align: center;
    }
    
    .stage-explain-item::before {
        width: 100%;
        height: 4px;
        left: 0;
        top: 0;
    }
    
    .stage-content h4 {
        font-size: 1rem;
    }
}

/* 태블릿 세로 방향 */
@media (min-width: 481px) and (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .pathways-grid {
        grid-template-columns: 1fr;
    }
}

/* 태블릿 가로 방향 */
@media (min-width: 769px) and (max-width: 1024px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 대형 스크린 */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 인쇄 스타일 */
@media print {
    .header,
    .footer,
    .search-section,
    .quick-recommend,
    .theme-toggle,
    .offline-indicator {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .tool-card {
        page-break-inside: avoid;
        border: 1px solid #000;
    }
    
    .stage-section {
        page-break-before: always;
    }
    
    .hero {
        padding: 1rem 0;
    }
    
    a {
        color: black;
        text-decoration: none;
    }
    
    .stage-explain-item {
        border: 1px solid #000;
        margin-bottom: 0.5rem;
    }
    
    .stage-number {
        border: 2px solid #000;
    }
}

/* 접근성: 모션 줄이기 설정 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .tool-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .stage-explain-item:hover {
        transform: none;
    }
}

/* 다크 모드 선호 설정 */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #1a1a1a;
        --surface: #2d2d2d;
        --text-primary: #e0e0e0;
        --text-secondary: #a0a0a0;
        --border-color: #404040;
    }
}

/* 고해상도 디스플레이 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-icon,
    .tool-emoji,
    .stage-icon,
    .stage-number {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}