/**
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * ⚡ APC System - Gallery Stylesheet
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 📁 파일명: /www/_acc/css/gallery.css
 * 📌 버전: v1.5
 * 📅 작성일: 2025-12-16
 * 📝 설명: ⭐ 카드 배경 바나나톤(#fffbeb) 통일
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * Gallery Grid
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    padding-bottom: 60px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * Card Design
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.gallery-card {
    background: #fffbeb;  /* ⭐ 카드 배경을 바나나톤으로 통일 */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #fde68a;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(255, 107, 53, 0.15);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * Card Header (프로필 영역)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.card-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
    gap: 8px;
}

/* ⭐ 프로필 사진 - 크기 축소 (26px → 22px) */
.user-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #fde68a;
    background: #f0f0f0;
    transition: transform 0.2s, border-color 0.2s;
}

.user-avatar:hover {
    transform: scale(1.1);
    border-color: #FF6B35;
}

.user-avatar.loaded {
    border-color: #fde68a;
}

/* ⭐ 유저 링크 - 폰트 크기 증가 (0.95rem → 1rem) */
.user-link {
    font-weight: 700; 
    font-size: 1rem; 
    color: #FF6B35;
    text-decoration: none;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-link:hover { 
    text-decoration: underline; 
    color: #E91E63;
}

.x-link {
    color: #000;
    opacity: 0.6;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.x-link:hover {
    opacity: 1;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * Card Image
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.card-image-wrapper {
    padding: 12px;
    background: #fffbeb;
}

.card-image {
    width: 100%; 
    aspect-ratio: 4 / 5; 
    background: #f0f0f0; 
    cursor: pointer; 
    position: relative; 
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    border-radius: 12px;
}

.card-image:hover img {
    transform: scale(1.05);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * Card Title
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.card-title {
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: #fffbeb;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * Card Footer (배지 영역)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.card-footer {
    padding: 10px 14px; 
    background: #fffbeb;
    display: flex; 
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ★★★ [A-3] 카드 날짜 표시 ★★★ */
.card-date {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
    margin-right: auto;  /* 오른쪽으로 다른 배지들 밀기 */
}

/* 카테고리 배지 */
.badge {
    background: #fef3c7;
    color: #d97706;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    border: 1px solid #fde68a;
}

/* ★★★ [A-2] 모델명 배지 (신규 추가) ★★★ */
.model-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid #f59e0b;
    white-space: nowrap;
}

.model-badge .model-icon {
    font-size: 0.85rem;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * Scroll to Top Button
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f59e0b 0%, #FF6B35 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: linear-gradient(135deg, #FF6B35 0%, #E91E63 100%);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
    transform: translateY(-3px);
}

.scroll-top-btn svg {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 2.5;
    fill: none;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * ⭐ [C-4] Card Meta Stats (조회수/복사수/북마크)
 * ⭐ 파일위치: /www/_acc/css/gallery.css (라인 246~)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.card-meta-stats {
    display: flex;
    justify-content: space-around;
    gap: 8px;
    padding: 8px 0;
    margin: 0 12px;  /* ⭐ 이미지 너비에만 구분선 적용 (좌우 마진) */
    background: #fffbeb;  /* ⭐ 바나나톤 배경 명시 */
    border-top: 1px solid #fde68a;     /* ⭐ 위 구분선 */
    border-bottom: 1px solid #fde68a;  /* ⭐ 아래 구분선 추가 */
}

.meta-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #92400e;
}

.meta-stat svg {
    stroke: #f59e0b;
    flex-shrink: 0;
}

.meta-stat-label {
    color: #b45309;
    font-size: 0.7rem;
}

.card-view-count,
.card-copy-count,
.card-bookmark-count {
    font-weight: 700;
    color: #d97706;
}