/* 모바일 최적화 스타일 */
@media (max-width: 768px) {
    /* 헤더 영역 */
    .header {
        padding: 20px 15px;
    }

    .header h1 {
        font-size: 2em;
    }

    .subtitle {
        font-size: 1em;
    }

    /* 게임 카드 */
    .game-card {
        margin: 10px;
        padding: 15px;
    }

    .game-image {
        height: 180px;
    }

    .game-info h2 {
        font-size: 1.2em;
    }

    .game-description {
        font-size: 0.9em;
    }

    /* 태그 필터 */
    .tag-filter {
        padding: 15px;
        margin: 10px;
    }

    .tag-buttons {
        gap: 8px;
    }

    .tag-button {
        padding: 6px 12px;
        font-size: 0.8em;
    }

    /* 가상 트레이너 */
    .virtual-trainer {
        width: calc(100% - 20px);
        max-width: none;
        bottom: 10px;
        right: 10px;
        padding: 15px;
    }

    .trainer-avatar {
        width: 50px;
        height: 50px;
    }

    .trainer-info h3 {
        font-size: 1.1em;
    }

    .trainer-message {
        font-size: 0.9em;
        padding: 12px;
    }

    /* 로그인/프로필 영역 */
    .login-area {
        top: 10px;
        right: 10px;
    }

    .login-button {
        padding: 8px 16px;
        font-size: 0.9em;
    }

    /* 터치 최적화 */
    .play-button,
    .trainer-button,
    .tag-button {
        min-height: 44px; /* 터치 영역 최소 크기 */
    }

    /* 스크롤 및 터치 동작 개선 */
    .game-container {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    /* 모달 */
    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .input-group input {
        font-size: 16px; /* iOS에서 자동 확대 방지 */
    }

    /* 방향 전환 대응 */
    @media (orientation: landscape) {
        .game-container {
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        }

        .virtual-trainer {
            width: 300px;
            right: 10px;
            bottom: 10px;
        }
    }
}

/* 태블릿 최적화 */
@media (min-width: 769px) and (max-width: 1024px) {
    .game-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .game-card {
        margin: 15px;
    }
}

/* 터치 피드백 개선 */
@media (hover: none) {
    .game-card:active {
        transform: scale(0.98);
    }

    .play-button:active {
        transform: scale(0.95);
    }

    .tag-button:active {
        opacity: 0.8;
    }
}

/* 다크 모드 대응 */
@media (prefers-color-scheme: dark) {
    /* 이미 다크 테마이므로 추가 스타일 필요 없음 */
}

/* 고대비 모드 대응 */
@media (prefers-contrast: high) {
    .game-card {
        border: 2px solid #fff;
    }

    .tag-button {
        border: 2px solid #4facfe;
    }

    .loading-spinner {
        border-width: 3px;
    }
}

/* 애니메이션 감소 설정 대응 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
} 