/* ==========================================
   카테고리 필터 컨트롤
   ========================================== */
.lobby-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 30px;
    letter-spacing: 0.05em;
}
.filter-btn.active {
    background: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* 성향 테스트 및 퀴즈 런처 버튼 라인 */
.launcher-group {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* ==========================================
   신 일러스트 카드 그리드
   ========================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1-fraction));
    /* auto-fill responsive grid */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.god-card {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: auto;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* 카드 내부에 신비로운 빛 번짐 효과 (속성별 백라이트) */
.god-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

/* 속성별 호버 글로우 효과 */
.god-card[data-attribute="gods"]:hover {
    border-color: #ffd700;
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.35);
}
.god-card[data-attribute="titans"]:hover {
    border-color: #ff5722;
    box-shadow: 0 10px 25px rgba(255, 87, 34, 0.35);
}
.god-card[data-attribute="heroes"]:hover {
    border-color: #00e5ff;
    box-shadow: 0 10px 25px rgba(0, 229, 255, 0.35);
}

.god-card:hover {
    transform: translateY(-10px);
}

.god-card:hover::before {
    opacity: 0.8;
}

/* 신 일러스트 카드 텍스트 콘텐츠 */
.god-card .card-info {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.god-card .attribute-badge {
    align-self: flex-start;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    display: inline-block;
    letter-spacing: 0.05em;
}

.god-card[data-attribute="gods"] .attribute-badge {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.god-card[data-attribute="titans"] .attribute-badge {
    background: rgba(255, 87, 34, 0.15);
    color: #ff784e;
    border: 1px solid rgba(255, 87, 34, 0.3);
}

.god-card[data-attribute="heroes"] .attribute-badge {
    background: rgba(0, 229, 255, 0.15);
    color: #00e5ff;
    border: 1px solid rgba(0, 229, 255, 0.3);
}

.god-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
    color: #ffffff !important; /* 테마 무관 카드 내 이름은 항상 또렷한 백색 고수 */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.5);
}

.god-card .title-sub {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8) !important; /* 테마 무관 설명글은 항상 밝은 회백색 고수 */
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* ==========================================
   유물 진열장 (Showcase)
   ========================================== */
.showcase-section {
    margin-top: 5rem;
    padding: 3rem 2rem;
    border-radius: 16px;
    position: relative;
}

.showcase-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.showcase-header h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary-color);
    text-shadow: 0 0 8px var(--primary-glow);
    margin-bottom: 0.5rem;
}

.showcase-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1.5rem;
    justify-content: center;
}

.artifact-slot {
    min-height: 145px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 0.75rem;
    border: 1px dashed rgba(212, 175, 55, 0.25);
    border-radius: 12px;
    background: rgba(13, 17, 23, 0.45);
    position: relative;
    transition: all 0.3s ease;
}

/* 미해금 상태 */
.artifact-slot.locked {
    filter: grayscale(1) opacity(0.4);
}
.artifact-slot.locked::after {
    content: '🔒';
    position: absolute;
    font-size: 1.2rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.7;
}

/* 해금 상태 */
.artifact-slot.unlocked {
    border-style: solid;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
    filter: none;
    cursor: pointer;
}
.artifact-slot.unlocked:hover {
    box-shadow: 0 0 25px var(--primary-glow);
    transform: scale(1.05);
}

.artifact-slot img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 0.75rem;
    transition: transform 0.3s ease;
}

.artifact-slot.unlocked:hover img {
    transform: rotate(10deg) scale(1.1);
}

/* 유물 명칭 풀네임 노출 및 자연스러운 줄바꿈 보장 */
.artifact-slot .artifact-name {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    color: var(--text-color);
    word-break: keep-all; /* 단어가 중간에서 끊어지지 않도록 어절 단위 개행 */
    width: 100%;
    margin-top: 0.5rem;
}

/* ==========================================
   로비 3단 반응형 최적화 미디어 쿼리
   ========================================== */

/* 태블릿 반응형 (1024px 이하) */
@media (max-width: 1024px) {
    .launcher-group {
        gap: 1rem;
        flex-wrap: wrap;
    }
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }
}

/* 모바일 반응형 (768px 이하) */
@media (max-width: 768px) {
    .launcher-group {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    .launcher-group .btn {
        width: 100%;
        padding: 0.9rem 1.5rem;
        font-size: 0.9rem;
    }
    .lobby-controls {
        gap: 0.5rem;
        width: 100%;
    }
    .filter-btn {
        flex: 1 1 calc(50% - 0.5rem);
        text-align: center;
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.25rem;
        padding: 0;
    }
    .god-card {
        height: 270px;
        padding: 1.2rem;
    }
    .god-card h3 {
        font-size: 1.2rem;
    }
    .showcase-section {
        padding: 2rem 1.25rem;
        margin-top: 3.5rem;
    }
    .showcase-grid {
        grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
        gap: 0.75rem;
    }
    .artifact-slot {
        padding: 0.75rem 0.5rem;
    }
    .artifact-slot img {
        width: 42px;
        height: 42px;
        margin-bottom: 0.5rem;
    }
    .artifact-slot .artifact-name {
        font-size: 0.65rem;
    }
}
