/* ==========================================================================
   Starscape Guide - ギャラリーページ専用スタイル (gallery.css)
   ========================================================================== */

/* === Masonry風カラムレイアウト === */
.masonry-gallery {
    column-count: 3;
    column-gap: 15px;
}

@media (max-width: 992px) {
    .masonry-gallery {
        column-count: 2;
    }
}

@media (max-width: 576px) {
    .masonry-gallery {
        column-count: 1;
    }
}

/* 各カード */
.gallery-item {
    break-inside: avoid;
    margin-bottom: 15px;
    border-radius: 14px;
    overflow: hidden;
    background: transparent;
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* 画像（比率維持） */
.gallery-item-img {
    width: 100%;
    height: auto;
    display: block;
}

/* ホバーオーバーレイは削除されました */

/* カードのフッター (アバターとイイね) */
.gallery-item-footer {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    background: rgba(10, 12, 22, 0.6);
    border-top: none;
}

.gallery-item-footer .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.gallery-item-footer .user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

/* イイねボタンのスタイル */
.like-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    transition: color 0.2s, transform 0.2s;
    outline: none;
    padding: 4px 8px;
    border-radius: 20px;
}

.like-btn:hover {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.08);
}

.like-btn.liked {
    color: #ff4757;
    animation: heartBeat 0.3s ease-in-out;
}

.like-btn .like-count {
    margin-left: 5px;
    font-size: 0.8rem;
    font-weight: 600;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

/* メタデータセクション */
.gallery-item-info {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.01);
}

.gallery-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.meta-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    display: inline-flex;
    align-items: center;
}

.meta-pill {
    border-radius: 20px;
    background: rgba(13, 110, 253, 0.15);
    border: 1px solid rgba(13, 110, 253, 0.25);
    color: #fff;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.meta-badge i {
    opacity: 0.8;
}

/* 投稿モーダルの機材セレクターのグラスモーフィズムデザイン */
.gear-select-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 15px;
}

/* オートコンプリート候補ボックスの強化 */
.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(20, 22, 35, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1060;
    display: none;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.8);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.autocomplete-suggestions::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-suggestions::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: rgba(13, 110, 253, 0.15);
}

.suggestion-model {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
}

/* 投稿モーダルのリッチデザイン */
.modal-content.glass-modal {
    background: rgba(18, 20, 32, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

/* 空状態のプレースホルダー */
.empty-gallery {
    text-align: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    margin: 40px auto;
    max-width: 600px;
}

.empty-gallery i {
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.15);
    margin-bottom: 20px;
}

/* SNS アイコン */
.sns-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sns-icon {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.2s ease;
    text-decoration: none;
}

.sns-icon:hover {
    transform: scale(1.1);
}

.sns-icon.x-link:hover {
    color: #fff;
}

.sns-icon.ig-link:hover {
    color: #e1306c;
}

/* Exif 圧縮ステータスバナー */
.compression-status-bar {
    background: rgba(13, 110, 253, 0.1);
    border: 1px solid rgba(13, 110, 253, 0.2);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.8rem;
    color: #6ea8fe;
}

/* ギャラリー検索コントロールのグラス化 */
.gallery-search-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* 横スクロールラッパー */
.horizon-scroll {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.horizon-scroll::-webkit-scrollbar {
    height: 4px;
}

.horizon-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Gear Rank Styles */
.gear-rank-card {
    width: 180px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, background 0.3s ease;
}

.gear-rank-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
    border-color: #6ea8fe;
}

.gear-rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 24px;
    height: 24px;
    background: #ffca28;
    color: #000;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.gear-rank-img-wrap {
    height: 120px;
    overflow: hidden;
    background: #000;
}

.gear-rank-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.gear-rank-card:hover .gear-rank-img-wrap img {
    opacity: 1;
}

.gear-rank-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.1);
    font-size: 2rem;
}

.gear-rank-name {
    font-size: 0.85rem;
    color: #fff;
    line-height: 1.2;
}

.camera-rank-num {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffca28;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.x-small {
    font-size: 0.75rem;
}

.hover-bg-primary:hover {
    background-color: rgba(13, 110, 253, 0.1) !important;
    border-color: #0d6efd !important;
}

/* フィルター＆ソートボタンのプレミアムデザイン */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7) !important;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-btn:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.filter-btn.active {
    color: #ffca28 !important;
    background: rgba(255, 202, 40, 0.15);
    border-color: rgba(255, 202, 40, 0.4);
    box-shadow: 0 4px 12px rgba(255, 202, 40, 0.1);
    font-weight: 700;
}

/* レスポンシブ境界線（仕切り線） */
@media (min-width: 576px) {
    .filter-divider {
        border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
        padding-left: 1.5rem !important;
    }
}
@media (max-width: 575px) {
    .filter-divider {
        border-left: none !important;
        padding-left: 0 !important;
        margin-top: 0.5rem;
    }
}
