/**
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * ⚡ APC System - Responsive Stylesheet
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 📁 파일명: /www/_acc/css/responsive.css
 * 📌 버전: v1.6
 * 📅 작성일: 2025-12-16
 * 📝 설명: ⭐ 모바일 메타 아이콘만 표시 + 프로필 크기 조절
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * MOBILE RESPONSIVE (max-width: 768px)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 768px) {
    
    /* ★ 헤더 축소 */
    .sticky-header {
        padding: 12px 15px;
    }
    .sticky-header h1 {
        font-size: 1.1em;
    }
    .sticky-header p {
        font-size: 0.7em;
        margin-top: 4px;
    }
    
    /* ★ [A-1] Hero 통계 - 모바일 */
    .hero-stats {
        gap: 10px;
        margin-top: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .hero-stat-item {
        padding: 5px 10px;
        gap: 4px;
    }
    .hero-stat-icon {
        font-size: 0.85rem;
    }
    .hero-stat-value {
        font-size: 0.9rem;
    }
    .hero-stat-label {
        font-size: 0.65rem;
    }
    
    /* ★ 언어 드롭다운 - 모바일 상단 */
    .header-content {
        padding-right: 70px;
    }
    .lang-dropdown {
        right: 5px;
        top: 0px;  /* ⭐ 모바일에서도 상단 고정 */
    }
    .lang-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    /* ★ 컨테이너 */
    .container {
        padding: 12px;
    }
    
    /* ★ 필터바 - 모바일 (두 줄 레이아웃) */
    .filter-bar {
        padding: 10px 12px;
        gap: 10px;
        flex-wrap: wrap;
    }
    .filter-buttons {
        gap: 8px;
        width: 100%;
        flex: none;
        order: 1;
    }
    .filter-btn {
        height: 32px;
        padding: 0 14px;
        font-size: 0.8rem;
        line-height: 30px;
        border-radius: 16px;
    }
    
    /* ★ 검색 + 결과 한 행 - 모바일 (두 번째 줄) */
    .search-result-row {
        gap: 8px;
        width: 100%;
        justify-content: space-between;
        order: 2;
    }
    
    /* ★ 결과 수 */
    .result-count {
        height: 32px;
        padding: 0 12px;
        border-radius: 16px;
    }
    .count-number {
        font-size: 1rem;
    }
    .count-label {
        font-size: 0.7rem;
    }
    
    /* ★ 검색 폼 - 모바일 */
    .search-form {
        height: 32px;
        padding: 0 3px 0 12px;
        flex: 1;
        max-width: none;
        border-radius: 16px;
    }
    .search-input {
        width: auto;
        flex: 1;
        min-width: 60px;
        font-size: 0.85rem;
    }
    .search-btn {
        width: 26px;
        height: 26px;
        flex-shrink: 0;
    }
    .search-btn svg {
        width: 14px;
        height: 14px;
    }
    
    /* ★ 카드 그리드 - 2열 */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* ★ 카드 축소 */
    .card-header {
        padding: 8px 10px;
        gap: 6px;
    }
    /* ⭐ 모바일 프로필 아바타 - 더 작게 (파일위치: responsive.css 라인 139~) */
    .user-avatar {
        width: 20px;
        height: 20px;
        border-width: 1.5px;
    }
    /* ⭐ 모바일 유저링크 - 폰트 조절 */
    .user-link {
        font-size: 0.85rem;
    }
    
    /* ★ 이미지 wrapper 축소 */
    .card-image-wrapper {
        padding: 8px;
    }
    .card-image {
        border-radius: 8px;
    }
    .card-image img {
        border-radius: 8px;
    }
    
    .card-title {
        padding: 6px 10px;
        font-size: 12px;
    }
    .card-footer {
        padding: 6px 10px;
        gap: 6px;
    }
    .badge {
        font-size: 0.65rem;
        padding: 3px 6px;
    }
    
    /* ★ 카드 날짜 - 모바일 */
    .card-date {
        font-size: 0.65rem;
    }
    
    /* ★ 모델 배지 - 모바일 */
    .model-badge {
        font-size: 0.6rem;
        padding: 3px 8px;
    }
    .model-badge .model-icon {
        font-size: 0.75rem;
    }
    
    /* ⭐ [C-4] 메타 수치 - 모바일에서 라벨 숨김 (아이콘만) */
    /* ⭐ 파일위치: responsive.css 라인 190~ */
    .card-meta-stats {
        margin: 0 8px;
        padding: 6px 0;
    }
    .meta-stat-label {
        display: none !important;  /* ⭐ 모바일에서 Views/Copies/Saves 텍스트 숨김 */
    }
    .meta-stat {
        gap: 3px;
    }
    .meta-stat svg {
        width: 12px;
        height: 12px;
    }
    .card-view-count,
    .card-copy-count,
    .card-bookmark-count {
        font-size: 0.7rem;
    }
    
    /* ★ Scroll to Top */
    .scroll-top-btn {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
    .scroll-top-btn svg {
        width: 20px;
        height: 20px;
    }
    
    /* ★ 관리 버튼 숨김 (모바일) */
    .desktop-only {
        display: none !important;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * MOBILE MODAL (max-width: 768px)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 768px) {
    
    /* ★ 모달 오버레이 - 외부 클릭 여백 */
    .modal-overlay {
        padding: 12px;
    }
    
    /* ★ 모달 컨텐츠 - 자동 높이 */
    .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 24px);
        border-radius: 16px;
        overflow: hidden;
        background: #ffffff;
    }
    
    /* ★★★ 모바일 레이아웃: 이미지+정보 상단, 프롬프트+버튼 하단 ★★★ */
    .modal-body {
        display: grid;
        grid-template-columns: 140px 1fr;
        grid-template-rows: auto 1fr auto;
        grid-template-areas:
            "image info"
            "prompt prompt"
            "footer footer";
        height: auto;
        max-height: calc(100vh - 24px);
        overflow: hidden;
    }
    
    /* ★ 이미지 영역 - 모바일 크기로 오버라이드 */
    .modal-left {
        grid-area: image;
        width: auto;
        min-width: auto;
        padding: 12px;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        background: var(--bg);
    }
    
    .img-container {
        width: 120px;
        height: 160px;
        min-width: 120px;
        min-height: 160px;
        max-width: 120px;
        max-height: 160px;
        border-radius: 12px;
        overflow: hidden;
        flex-shrink: 0;
        background: #f0f0f0;
    }
    
    .img-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 12px;
    }
    
    /* ★ 정보 영역 (modal-right 무력화) */
    .modal-right {
        display: contents;
    }
    
    .modal-right-header {
        grid-area: info;
        padding: 12px;
        border-bottom: none;
        overflow: visible;
        background: var(--bg);
    }
    
    /* ⭐ 모바일에서 수정/삭제 버튼 숨김 */
    .admin-controls {
        display: none !important;
    }
    
    /* ⭐ 모바일에서 이미지 편집 영역 숨김 (편집 모드 비활성) */
    .edit-image-section {
        display: none !important;
    }
    
    .modal-title {
        font-size: 0.9rem;
        margin-bottom: 6px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .header-top-row {
        margin-bottom: 6px;
    }
    
    .category-badge {
        padding: 3px 8px;
        font-size: 0.65rem;
    }
    
    .user-text h2 {
        font-size: 0.85rem;
    }
    
    .tags-display-area {
        gap: 4px;
        margin-top: 6px;
    }
    
    .hash-tag {
        padding: 2px 6px;
        font-size: 0.65rem;
    }
    
    /* ★ [A-4] 메타정보 패널 - 모바일 */
    .modal-meta-panel {
        gap: 12px;
        margin-top: 10px;
        padding: 8px 10px;
        flex-wrap: wrap;
    }
    .meta-icon {
        font-size: 0.85rem;
    }
    .meta-label {
        font-size: 0.65rem;
    }
    .meta-value {
        font-size: 0.75rem;
    }
    
    /* ★ 프롬프트 영역 - 전체 너비, 스크롤 */
    .modal-right-body {
        grid-area: prompt;
        flex: 0 0 auto;
        padding: 12px;
        border-top: 1px solid #fde68a;
        min-height: 100px;
        max-height: 40vh;
        overflow-y: auto;
        background: var(--bg);
    }
    
    .section-label {
        font-size: 0.7rem;
        margin-bottom: 8px;
    }
    
    .prompt-text-area {
        padding: 10px;
    }
    
    .prompt-text-area p {
        font-size: 0.8rem;
        line-height: 1.5;
    }
    
    /* ★ 버튼 영역 - 하단 고정 */
    .modal-right-footer {
        grid-area: footer;
        padding: 12px;
        gap: 8px;
        border-top: 1px solid #fde68a;
        background: var(--bg);
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .modal-right-footer .copy-btn-main {
        margin-left: 0;
    }

    .action-btn {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    
    /* 모바일에서 버튼 텍스트 숨김 (아이콘만) */
    .modal-right-footer .btn-text {
        display: none;
    }
    
    .action-btn svg {
        width: 16px;
        height: 16px;
    }
    
    #btnUserText {
        max-width: 70px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * VERY SMALL MOBILE (max-width: 400px)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 400px) {
    
    .sticky-header h1 {
        font-size: 0.95em;
    }
    .sticky-header p {
        font-size: 0.65em;
    }
    
    .gallery-grid {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    /* ★ 모델 배지 - 초소형 */
    .model-badge {
        font-size: 0.55rem;
        padding: 2px 6px;
    }
    
    /* ★ 초소형에서 이미지 축소 */
    .modal-body {
        grid-template-columns: 110px 1fr;
    }
    
    .img-container {
        width: 95px;
        height: 120px;
        max-width: 95px;
        max-height: 120px;
    }
    
    .modal-right-header {
        padding: 10px 10px 10px 0;
    }
    
    .modal-title {
        font-size: 0.8rem;
    }
    
    .user-text h2 {
        font-size: 0.75rem;
    }
    
    .hash-tag {
        font-size: 0.6rem;
    }
}