/* ============================
   스플래시 화면 - HAVE + WANT = HAVANT (충돌 애니메이션)
   ============================ */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    overflow: hidden;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-animation {
    position: relative;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.word-container {
    display: flex;
    gap: 60px;
    position: absolute;
}

.splash-word {
    font-size: 4rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    display: inline-flex;
}

.splash-word .keep,
.splash-word .drop {
    display: inline-block;
}

/* HAVE 슬라이드 인 & 충돌 */
.splash-have {
    animation: slideHaveIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards,
               slideHaveCollide 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) 0.55s forwards;
}

/* WANT 슬라이드 인 & 충돌 */
.splash-want {
    animation: slideWantIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards,
               slideWantCollide 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) 0.55s forwards;
}

/* E가 떨어져 나감 - 자연스러운 물리 */
.splash-have .drop-e {
    transform-origin: left bottom;
    animation: dropE 0.5s cubic-bezier(0.33, 0, 0.67, 1) 0.8s forwards;
}

/* W가 떨어져 나감 - 자연스러운 물리 */
.splash-want .drop-w {
    transform-origin: right bottom;
    animation: dropW 0.5s cubic-bezier(0.33, 0, 0.67, 1) 0.8s forwards;
}

/* HAV와 ANT - 우아한 페이드 */
.splash-have .keep {
    animation: fadeKeepLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1) 1.25s forwards;
}

.splash-want .keep {
    animation: fadeKeepRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) 1.25s forwards;
}

.splash-result {
    font-size: 5rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    letter-spacing: 4px;
    opacity: 0;
    transform: scale(0.8);
    animation: revealResult 0.5s cubic-bezier(0.22, 1, 0.36, 1) 1.25s forwards;
}

/* 스플래시 로딩 인디케이터 */
.splash-loading {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.splash-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.splash-status {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

/* 스플래시 애니메이션 키프레임 */
@keyframes slideHaveIn {
    0% {
        transform: translateX(-100px);
        opacity: 0;
        filter: blur(4px);
    }
    100% {
        transform: translateX(0);
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes slideWantIn {
    0% {
        transform: translateX(100px);
        opacity: 0;
        filter: blur(4px);
    }
    100% {
        transform: translateX(0);
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes slideHaveCollide {
    0% { transform: translateX(0); }
    30% { transform: translateX(52px); }
    50% { transform: translateX(44px); }
    70% { transform: translateX(50px); }
    100% { transform: translateX(48px); }
}

@keyframes slideWantCollide {
    0% { transform: translateX(0); }
    30% { transform: translateX(-52px); }
    50% { transform: translateX(-44px); }
    70% { transform: translateX(-50px); }
    100% { transform: translateX(-48px); }
}

/* E 떨어지는 애니메이션 - 물리 기반 */
@keyframes dropE {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 1;
    }
    8% {
        transform: translateY(-15px) translateX(3px) rotate(8deg);
        opacity: 1;
    }
    20% {
        transform: translateY(-8px) translateX(6px) rotate(15deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100px) translateX(25px) rotate(75deg);
        opacity: 0;
    }
}

/* W 떨어지는 애니메이션 - 물리 기반 */
@keyframes dropW {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 1;
    }
    8% {
        transform: translateY(-15px) translateX(-3px) rotate(-8deg);
        opacity: 1;
    }
    20% {
        transform: translateY(-8px) translateX(-6px) rotate(-15deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100px) translateX(-25px) rotate(-75deg);
        opacity: 0;
    }
}

/* HAV 페이드 - 왼쪽으로 살짝 */
@keyframes fadeKeepLeft {
    0% {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-8px);
        filter: blur(2px);
    }
}

/* ANT 페이드 - 오른쪽으로 살짝 */
@keyframes fadeKeepRight {
    0% {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
    100% {
        opacity: 0;
        transform: translateX(8px);
        filter: blur(2px);
    }
}

@keyframes revealResult {
    0% {
        opacity: 0;
        transform: scale(0.85);
        filter: blur(8px);
    }
    40% {
        opacity: 1;
        transform: scale(1.08);
        filter: blur(0);
    }
    60% {
        transform: scale(0.97);
    }
    80% {
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 스플래시 반응형 */
@media (max-width: 768px) {
    .splash-word { font-size: 2.5rem; }
    .splash-result { font-size: 3rem; }
    .word-container { gap: 40px; }
    @keyframes slideHaveCollide {
        0% { transform: translateX(0); }
        100% { transform: translateX(35px); }
    }
    @keyframes slideWantCollide {
        0% { transform: translateX(0); }
        100% { transform: translateX(-35px); }
    }
}

@media (max-width: 480px) {
    .splash-word { font-size: 2rem; }
    .splash-result { font-size: 2.5rem; }
    .word-container { gap: 24px; }
    @keyframes slideHaveCollide {
        0% { transform: translateX(0); }
        100% { transform: translateX(25px); }
    }
    @keyframes slideWantCollide {
        0% { transform: translateX(0); }
        100% { transform: translateX(-25px); }
    }
}

/* ============================
   메인 스타일
   ============================ */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #f1f5f9;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-color);
}

#app {
    min-height: 100vh;
}

/* 헤더 스타일링 */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* HAVANT 로고 애니메이션 (HAVE + WANT = HAVANT 충돌) */
.animated-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    height: 2rem;
    min-width: 120px;
    overflow: visible;
}

.logo-words {
    display: flex;
    gap: 12px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.logo-have,
.logo-want {
    display: inline-flex;
    font-size: 1rem;
    font-weight: 800;
    white-space: nowrap;
}

.logo-have .keep,
.logo-have .drop,
.logo-want .keep,
.logo-want .drop {
    display: inline-block;
    color: white !important;
    -webkit-text-fill-color: white !important;
    background: none !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* HAV + E 슬라이드 인 & 충돌 */
.logo-have {
    animation: logoHaveIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards,
               logoHaveCollide 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards;
}

/* W + ANT 슬라이드 인 & 충돌 */
.logo-want {
    animation: logoWantIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards,
               logoWantCollide 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards;
}

/* E 떨어져 나감 */
.logo-have .drop-e {
    transform-origin: left bottom;
    animation: logoDropE 0.35s cubic-bezier(0.33, 0, 0.67, 1) 0.6s forwards;
}

/* W 떨어져 나감 */
.logo-want .drop-w {
    transform-origin: right bottom;
    animation: logoDropW 0.35s cubic-bezier(0.33, 0, 0.67, 1) 0.6s forwards;
}

/* HAV, ANT 페이드 아웃 */
.logo-have .keep {
    animation: logoKeepFadeLeft 0.2s cubic-bezier(0.4, 0, 0.2, 1) 0.9s forwards;
}

.logo-want .keep {
    animation: logoKeepFadeRight 0.2s cubic-bezier(0.4, 0, 0.2, 1) 0.9s forwards;
}

.logo-result {
    font-size: 1.2rem;
    font-weight: 800;
    color: white !important;
    -webkit-text-fill-color: white !important;
    background: none !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    animation: logoResultReveal 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.9s forwards;
}

/* 로고 애니메이션 키프레임 */
@keyframes logoHaveIn {
    0% {
        transform: translateX(-30px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes logoWantIn {
    0% {
        transform: translateX(30px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes logoHaveCollide {
    0% { transform: translateX(0); }
    30% { transform: translateX(18px); }
    50% { transform: translateX(14px); }
    70% { transform: translateX(17px); }
    100% { transform: translateX(16px); }
}

@keyframes logoWantCollide {
    0% { transform: translateX(0); }
    30% { transform: translateX(-18px); }
    50% { transform: translateX(-14px); }
    70% { transform: translateX(-17px); }
    100% { transform: translateX(-16px); }
}

/* 로고 E 떨어지는 애니메이션 */
@keyframes logoDropE {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 1;
    }
    10% {
        transform: translateY(-8px) translateX(2px) rotate(5deg);
        opacity: 1;
    }
    100% {
        transform: translateY(35px) translateX(12px) rotate(50deg);
        opacity: 0;
    }
}

/* 로고 W 떨어지는 애니메이션 */
@keyframes logoDropW {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 1;
    }
    10% {
        transform: translateY(-8px) translateX(-2px) rotate(-5deg);
        opacity: 1;
    }
    100% {
        transform: translateY(35px) translateX(-12px) rotate(-50deg);
        opacity: 0;
    }
}

/* 로고 HAV 페이드 */
@keyframes logoKeepFadeLeft {
    0% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(-4px); }
}

/* 로고 ANT 페이드 */
@keyframes logoKeepFadeRight {
    0% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(4px); }
}

@keyframes logoResultReveal {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    50% {
        opacity: 1;
        transform: scale(1.06);
    }
    70% {
        transform: scale(0.98);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 호버 시 펄스 애니메이션 */
.animated-logo:hover .logo-result {
    animation: logoPulse 0.4s ease-in-out;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.username {
    font-weight: 600;
    color: white;
    font-size: 0.85rem;
}

.objekt-count {
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 탭 컨테이너 */
.tab-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px;
}

/* 컨트롤 바 - 모드/아티스트/탭을 한 줄에 */
.mode-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.mode-toggle {
    display: inline-flex;
    gap: 2px;
    background: white;
    padding: 3px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.mode-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.mode-btn:hover {
    background: var(--secondary-color);
    color: var(--text-color);
}

.mode-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* 아티스트 토글 - 컴팩트 */
.artist-toggle {
    display: inline-flex;
    gap: 2px;
    background: white;
    padding: 3px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.artist-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.artist-btn:hover {
    background: var(--secondary-color);
    color: var(--text-color);
}

.artist-btn.active {
    background: var(--primary-color);
    color: white;
}

.artist-btn[data-artist="artms"].active {
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
}

/* 탭 버튼 - 숨김 (도감탭이 기본) */
.tab-buttons {
    display: none;
}

.tab-btn {
    padding: 6px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.tab-btn:hover {
    background: var(--secondary-color);
    color: var(--text-color);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* 필터 섹션 - 슬림 인라인 */
.filter-section {
    background: white;
    padding: 10px 14px;
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.filter-section select {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8rem;
    min-width: 80px;
    cursor: pointer;
    transition: all 0.15s;
    background: var(--secondary-color);
    color: var(--text-color);
}

.filter-section select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

/* 필터 그룹 (레거시 지원) */
.filter-group {
    display: flex;
    align-items: center;
}

.filter-group label {
    display: none;
}

.filter-group select {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8rem;
    min-width: 80px;
    cursor: pointer;
}

.reset-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.15s;
}

.reset-btn:hover {
    background: var(--secondary-color);
    border-color: var(--text-secondary);
    color: var(--text-color);
}

/* 통계 섹션 - 인라인 컴팩트 */
.stats-section {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.stat-item {
    background: white;
    padding: 6px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* 캐시 컨트롤 */
.cache-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.cache-status {
    font-size: 0.7rem;
    color: var(--text-secondary);
    padding: 4px 8px;
    background: var(--secondary-color);
    border-radius: 4px;
}

.season-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.season-sort-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.season-sort-btn .sort-icon {
    font-size: 0.8rem;
}

.refresh-btn {
    padding: 5px 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.refresh-btn:hover {
    background: var(--secondary-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 오브젝트 그리드 */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

/* 로딩 상태 */
.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
}

/* 오브젝트 카드 */
.objekt-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    contain: layout style paint;
}

.objekt-card:hover {
    transform: translateY(-4px);
}

.objekt-card .card-image-container {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

.objekt-card .objekt-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    content-visibility: auto;
}

/* 컬렉션 카드 lazy loading 스타일 */
.objekt-card .objekt-image.lazy-img {
    background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 50%, #e8e8e8 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.objekt-card .objekt-image.lazy-img[src] {
    animation: fadeIn 0.3s ease-out;
}

.objekt-card:hover .objekt-image {
    transform: scale(1.02);
}

.objekt-card .class-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
}

.class-badge.first {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
}

.class-badge.special {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
}

.class-badge.double {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.class-badge.welcome {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}

.class-badge.zero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.objekt-card .online-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid white;
}

.online-badge.online {
    background: #4ade80;
}

.online-badge.offline {
    background: #f97316;
}

.objekt-card .card-info {
    padding: 12px;
}

.objekt-card .member-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0 0 4px 0;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.objekt-card .collection-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.objekt-card .season-tag {
    display: inline-block;
    padding: 3px 8px;
    background: var(--secondary-color);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* 더 보기 버튼 */
.load-more-section {
    text-align: center;
    margin-top: 32px;
}

.load-more-btn {
    padding: 16px 48px;
    background: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-md);
}

.load-more-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 준비 중 메시지 */
.market-container,
.chat-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 60px;
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* 반응형 */
@media (max-width: 768px) {
    nav {
        padding: 10px 12px;
    }

    .tab-container {
        padding: 12px;
    }

    .mode-section {
        gap: 8px;
    }

    .mode-btn, .artist-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .filter-section {
        padding: 8px 10px;
        gap: 6px;
    }

    .filter-section select {
        min-width: 70px;
        padding: 5px 6px;
        font-size: 0.75rem;
    }

    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .stats-section {
        gap: 6px;
    }

    .stat-item {
        padding: 4px 8px;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    .stat-value {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .collection-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .objekt-card .card-info {
        padding: 10px;
    }

    .objekt-card .member-name {
        font-size: 0.85rem;
    }
}

/* 도감 모드 - 미보유 오브젝트 */
.objekt-card.not-owned {
    opacity: 0.5;
}

.objekt-card.not-owned .card-image-container {
    filter: grayscale(100%);
}

.objekt-card.not-owned:hover {
    transform: translateY(-4px);
    opacity: 0.7;
}

.objekt-card.not-owned:hover .card-image-container {
    filter: grayscale(50%);
}

.objekt-card.not-owned .card-info {
    background: rgba(0, 0, 0, 0.05);
}

/* 보유 배지 */
.owned-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.owned-badge.multi {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* 도감 통계 */
.dokam-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.dokam-stat {
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--shadow-sm);
}

.dokam-stat .label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.dokam-stat .value {
    font-size: 1.25rem;
    font-weight: 700;
}

.dokam-stat .value.owned-count {
    color: #22c55e;
}

.dokam-stat .value.not-owned-count {
    color: var(--text-secondary);
}

.dokam-stat .progress-bar {
    width: 100px;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    margin-top: 4px;
    overflow: hidden;
}

.dokam-stat .progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* 모달 스타일 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--secondary-color);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--text-color);
}

.modal-body {
    display: flex;
    gap: 32px;
    padding: 32px;
}

.modal-image-section {
    flex-shrink: 0;
    width: 280px;
}

.modal-objekt-image {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.modal-info-section {
    flex: 1;
    min-width: 0;
}

.modal-info-section h2 {
    margin: 0 0 24px 0;
    font-size: 1.5rem;
    color: var(--text-color);
    line-height: 1.3;
}

.modal-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--secondary-color);
    border-radius: var(--radius-sm);
}

.detail-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
}

.modal-info-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}

.modal-info-box h3 {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-info-box p {
    margin: 0;
    font-size: 0.95rem;
    color: #78350f;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.apollo-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.apollo-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 모달 반응형 */
@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
        padding: 24px;
    }

    .modal-image-section {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }

    .modal-info-section h2 {
        font-size: 1.25rem;
    }
}

/* 획득 통계 스타일 */
.acquisition-stats {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.acquisition-stats .stat-item {
    padding: 4px 8px;
    font-size: 0.85rem;
    font-weight: 500;
    background: transparent;
    box-shadow: none;
}

.acquisition-stats .minted {
    color: #22c55e;
}

.acquisition-stats .transferred {
    color: #6366f1;
}

/* ============================
   컬렉팅 맵 스타일
   ============================ */

.collecting-map {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* 시즌 섹션 */
.season-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.season-section:not(.expanded) {
    padding: 0;
}

.season-section.expanded {
    padding: 24px;
}

.season-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.season-section.expanded .season-header {
    padding: 0 0 16px 0;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.season-header:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

.season-section.expanded .season-header:hover {
    background-color: transparent;
}

.season-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.season-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.season-expand-icon {
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
    width: 16px;
}

.season-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.season-progress-mini {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
}

.season-stats {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--secondary-color);
    padding: 6px 14px;
    border-radius: 20px;
}

/* 시리즈 컨테이너 */
.series-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

/* 시리즈 카드 */
.series-card {
    background: var(--secondary-color);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 2px solid transparent;
    contain: layout style;
}

.series-card:hover {
    border-color: var(--primary-color);
}

.series-card.complete {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1) 0%, rgba(34, 197, 94, 0.1) 100%);
    border-color: #22c55e;
}

.series-card.complete .series-title {
    color: #16a34a;
}

/* 시리즈 헤더 */
.series-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.series-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    flex: 1;
}

.series-class {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    color: white;
}

.series-class.first {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
}

.series-class.special {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
}

.series-class.double {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.series-class.welcome {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}

.series-class.zero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.series-type {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 6px;
    text-transform: uppercase;
}

.series-type.online {
    background: #dcfce7;
    color: #16a34a;
}

.series-type.offline {
    background: #ffedd5;
    color: #c2410c;
}

/* 시리즈 HAVANT 선택 버튼 */
.series-havant-btn {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--primary-color);
}

.series-havant-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--primary-color);
}

.series-havant-btn.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 시리즈 카드 HAVANT 선택 상태 */
.series-card.havant-selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* 시리즈 HAVANT 미리보기 (선택 시 표시) */
.series-havant-preview {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    padding: 6px 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
    justify-content: center;
}

.havant-mini-stat {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.havant-mini-stat.have {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.havant-mini-stat.want {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

/* 진행률 바 */
.series-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.series-progress .progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.series-progress .progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.series-card.complete .series-progress .progress-fill {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}

.series-progress .progress-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 45px;
    text-align: right;
}

/* 멤버 그리드 */
.member-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

/* 멤버 셀 */
.member-cell {
    aspect-ratio: 3 / 4;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    contain: layout style paint;
}

.member-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    content-visibility: auto;
}

/* Lazy loading 이미지 스타일 */
.member-cell img.lazy-img {
    background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 50%, #e8e8e8 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.member-cell img.lazy-img[src] {
    animation: fadeIn 0.3s ease-out;
}

@keyframes shimmer {
    0% { background-position: -100% 0; }
    100% { background-position: 100% 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.member-cell .member-number {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
}

/* 보유 상태 */
.member-cell.owned {
    border: 2px solid #22c55e;
}

.member-cell.owned:hover {
    transform: scale(1.05);
}

.member-cell.not-owned {
    background: rgba(0, 0, 0, 0.03);
    border: 2px dashed var(--border-color);
    position: relative;
}

.member-cell.not-owned img {
    filter: grayscale(100%);
    opacity: 0.4;
}

.member-cell.not-owned:hover {
    border-color: var(--text-secondary);
}

.member-cell.not-owned:hover img {
    filter: grayscale(30%);
    opacity: 0.6;
}

/* 보유 개수 배지 */
.member-cell .count-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 4px;
    min-width: 14px;
    text-align: center;
}

/* 반응형 - 컬렉팅 맵 */
@media (max-width: 768px) {
    .series-container {
        grid-template-columns: 1fr;
    }

    .member-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .season-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .season-header-left,
    .season-header-right {
        width: 100%;
        justify-content: space-between;
    }

    .season-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .member-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
    }

    .series-card {
        padding: 12px;
    }

    .series-title {
        font-size: 1rem;
    }

    .season-header {
        padding: 12px 16px;
    }

    .season-section.expanded .season-header {
        padding: 0 0 12px 0;
    }

    .season-stats {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    .season-progress-mini {
        font-size: 0.75rem;
    }
}

/* ============================
   사용자명 버튼 및 모달
   ============================ */

/* 언어 버튼 */
.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.lang-btn .lang-icon {
    font-size: 0.9rem;
}

.lang-btn .lang-text {
    letter-spacing: 0.5px;
}

.username-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.username-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.username-btn .username {
    font-weight: 600;
    color: white;
    font-size: 0.8rem;
}

.username-btn .edit-icon {
    font-size: 0.8rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.username-btn:hover .edit-icon {
    opacity: 1;
}

/* 사용자명 모달 */
.username-modal-content {
    max-width: 400px;
}

.username-modal-inner {
    text-align: center;
    padding: 20px;
}

.username-modal-inner h2 {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    color: var(--text-color);
}

.modal-description {
    color: var(--text-secondary);
    margin: 0 0 24px 0;
    font-size: 0.9rem;
}

.username-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.username-input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.2s;
}

.username-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.username-input-group .submit-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.username-input-group .submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.username-input-group .submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    margin: 0 0 16px 0;
}

.recent-users {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.recent-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recent-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.recent-user-btn {
    padding: 6px 14px;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.recent-user-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ============================
   다크 모드 지원
   ============================ */

@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #818cf8;
        --primary-hover: #6366f1;
        --secondary-color: #1e293b;
        --text-color: #f1f5f9;
        --text-secondary: #94a3b8;
        --border-color: #334155;
        --card-bg: #1e293b;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    }

    body {
        background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    }

    header {
        background: linear-gradient(135deg, #312e81 0%, #4c1d95 100%);
    }

    .filter-section,
    .stat-item,
    .mode-toggle,
    .artist-toggle {
        background: var(--card-bg);
    }

    .filter-section select {
        background: var(--secondary-color);
        color: var(--text-color);
        border-color: var(--border-color);
    }

    .objekt-card {
        background: var(--card-bg);
    }

    .objekt-card .card-info {
        background: var(--card-bg);
    }

    .objekt-card .member-name {
        color: var(--text-color);
    }

    .modal-content {
        background: var(--card-bg);
    }

    .modal-info-section h2 {
        color: var(--text-color);
    }

    .detail-row {
        background: var(--secondary-color);
    }

    .detail-value {
        color: var(--text-color);
    }

    .season-section {
        background: rgba(30, 41, 59, 0.95);
    }

    .series-card {
        background: var(--secondary-color);
    }

    .username-input-group input {
        background: var(--secondary-color);
        color: var(--text-color);
        border-color: var(--border-color);
    }

    .username-input-group input::placeholder {
        color: var(--text-secondary);
    }

    .load-more-btn {
        background: var(--card-bg);
        color: var(--primary-color);
    }

    .load-more-btn:hover {
        background: var(--primary-color);
        color: white;
    }

    .reset-btn {
        background: var(--secondary-color);
        color: var(--text-secondary);
        border-color: var(--border-color);
    }

    .refresh-btn {
        background: var(--secondary-color);
        color: var(--text-secondary);
        border-color: var(--border-color);
    }

    .cache-status {
        background: var(--secondary-color);
        color: var(--text-secondary);
    }

    .recent-user-btn {
        background: var(--secondary-color);
        border-color: var(--border-color);
        color: var(--text-color);
    }
}

/* ============================
   HAVANT 기능 스타일
   ============================ */

/* HAVANT 버튼 특별 스타일 */
.mode-btn.havant-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-weight: 700;
}

.mode-btn.havant-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.mode-btn.havant-btn.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}

/* HAVANT 뷰 컨테이너 */
.havant-view {
    margin-top: 16px;
}

/* HAVANT 탭 */
.havant-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.havant-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.havant-tab-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.havant-tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-md);
}

.havant-tab-btn .tab-icon {
    font-size: 1.25rem;
}

.havant-tab-btn .tab-label {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.havant-tab-btn .tab-count {
    background: rgba(0, 0, 0, 0.15);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.havant-tab-btn.active .tab-count {
    background: rgba(255, 255, 255, 0.25);
}

/* HAVANT 컨트롤 */
.havant-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.havant-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.havant-filters select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
}

.havant-filters select:hover {
    border-color: var(--primary-color);
}

/* WANT 모드 토글 */
.want-mode-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 4px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.want-mode-btn {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text-secondary);
}

.want-mode-btn:hover {
    background: var(--secondary-color);
}

.want-mode-btn.active {
    background: var(--primary-color);
    color: white;
}

.selected-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    padding: 0 8px;
}

/* 내보내기 버튼 */
.havant-export {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.export-btn .btn-icon {
    font-size: 1rem;
}

.export-btn.discord {
    background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
    color: white;
}

.export-btn.discord:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.export-btn.kakao {
    background: linear-gradient(135deg, #FEE500 0%, #E5CC00 100%);
    color: #3C1E1E;
}

.export-btn.kakao:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254, 229, 0, 0.4);
}

/* HAVANT 통계 */
.havant-stats {
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

/* HAVANT 그리드 */
.havant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

/* HAVANT 카드 */
.havant-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-sm);
}

.havant-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.havant-card .card-image {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    position: relative;
}

.havant-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 중복 개수 배지 */
.havant-card .trade-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
}

/* WANT 모드 체크박스 */
.havant-card .want-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.havant-card .want-checkbox:hover {
    border-color: var(--primary-color);
}

.havant-card .want-checkbox.checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.havant-card .want-checkbox.checked::after {
    content: '✓';
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
}

/* HAVANT 카드 정보 */
.havant-card .card-info {
    padding: 10px 12px;
}

.havant-card .card-member {
    font-weight: 700;
    font-size: 0.85rem;
    margin: 0 0 4px 0;
    color: var(--text-color);
}

.havant-card .card-code {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* 토스트 알림 */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    z-index: 9999;
    animation: toastSlideIn 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.toast-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.toast-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.toast-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    bottom: 100px; /* 플로팅 바 위에 표시 */
}

.toast-info::before {
    content: '⏳';
    font-size: 1.1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.toast.fade-out {
    animation: toastFadeOut 0.3s ease forwards;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes toastFadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    to {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
}

/* HAVANT 반응형 */
@media (max-width: 768px) {
    .havant-tabs {
        flex-direction: column;
    }

    .havant-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .havant-export {
        flex-direction: column;
    }

    .export-btn {
        justify-content: center;
    }

    .havant-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .havant-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .havant-card .card-info {
        padding: 8px;
    }

    .havant-card .card-member {
        font-size: 0.75rem;
    }

    .havant-tab-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .havant-tab-btn .tab-icon {
        font-size: 1rem;
    }
}

/* 다크 모드 HAVANT */
@media (prefers-color-scheme: dark) {
    .havant-tab-btn {
        background: var(--card-bg);
        border-color: var(--border-color);
        color: var(--text-color);
    }

    .havant-tab-btn:hover {
        border-color: var(--primary-color);
    }

    .havant-filters select {
        background: var(--card-bg);
        color: var(--text-color);
        border-color: var(--border-color);
    }

    .want-mode-toggle {
        background: var(--card-bg);
    }

    .want-mode-btn {
        color: var(--text-secondary);
    }

    .want-mode-btn:hover {
        background: var(--secondary-color);
    }

    .havant-stats {
        background: var(--card-bg);
    }

    .havant-card {
        background: var(--card-bg);
    }

    .havant-card .card-member {
        color: var(--text-color);
    }

    .havant-card .want-checkbox {
        background: var(--secondary-color);
        border-color: var(--border-color);
    }

    .toast-success {
        background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    }
}

/* ============================
   플로팅 HAVANT 바
   ============================ */

.floating-havant {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 100%;
    max-width: 600px;
    padding: 0 16px 16px;
    pointer-events: none;
}

.floating-havant > * {
    pointer-events: auto;
}

/* 접힌 상태 */
.floating-collapsed {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    backdrop-filter: blur(20px);
    padding: 12px 16px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-havant.expanded .floating-collapsed {
    display: none;
}

.floating-summary {
    display: flex;
    align-items: center;
    gap: 8px;
}

.floating-icon {
    font-size: 1rem;
}

.floating-count {
    color: white;
    font-weight: 700;
    font-size: 1rem;
    min-width: 24px;
}

.floating-quick-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.floating-mode-indicator {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.floating-mode-indicator:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 복사 드롭다운 */
.floating-copy-dropdown {
    position: relative;
}

.floating-copy-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.floating-copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.copy-arrow {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.floating-copy-dropdown:hover .copy-arrow {
    transform: rotate(180deg);
}

.copy-dropdown-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
}

.floating-copy-dropdown:hover .copy-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.copy-option {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    text-align: left;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.copy-option:hover {
    background: var(--secondary-color);
}

.copy-option[data-format="discord"]:hover {
    background: rgba(88, 101, 242, 0.1);
    color: #5865F2;
}

.copy-option[data-format="kakaotalk"]:hover {
    background: rgba(254, 229, 0, 0.2);
    color: #3C1E1E;
}

.floating-save-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.floating-save-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.floating-expand-btn {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-expand-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

/* 펼친 상태 */
.floating-expanded {
    display: none;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 12px 48px rgba(102, 126, 234, 0.25), 0 0 0 1px rgba(102, 126, 234, 0.1);
    overflow: hidden;
    animation: floatingSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-havant.expanded .floating-expanded {
    display: block;
}

@keyframes floatingSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.floating-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.floating-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.1rem;
}

.title-icon {
    font-size: 1.2rem;
}

.floating-collapse-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.floating-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.floating-stats-row {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.floating-stat {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.floating-stat .stat-icon {
    font-size: 1rem;
}

.floating-stat .stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.floating-stat .stat-value {
    margin-left: auto;
    font-weight: 700;
    font-size: 0.8rem;
}

.floating-stat.have .stat-value {
    color: #f59e0b;
}

.floating-stat.want .stat-value {
    color: #667eea;
}

/* 모드 선택 */
.floating-mode-section {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mode-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.mode-buttons {
    display: flex;
    gap: 4px;
    flex: 1;
}

.mode-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 8px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-option:hover {
    border-color: var(--primary-color);
}

.mode-option.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
}

.mode-option .mode-icon {
    font-size: 1rem;
}

/* 미리보기 */
.floating-preview {
    padding: 8px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.preview-header span {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.preview-toggle {
    background: var(--secondary-color);
    border: none;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.preview-toggle:hover {
    background: var(--border-color);
}

.preview-content {
    background: var(--secondary-color);
    border-radius: 10px;
    padding: 10px;
    max-height: 400px;
    min-height: 180px;
    overflow-y: auto;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.preview-content::-webkit-scrollbar {
    width: 4px;
}

.preview-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.preview-empty {
    color: var(--text-secondary);
    text-align: center;
    padding: 8px;
    margin: 0;
}

/* HAVANT 이미지 뷰 */
.havant-empty-state {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

.havant-empty-state .empty-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.havant-empty-state p {
    margin: 4px 0;
}

.havant-empty-state .empty-hint {
    font-size: 0.75rem;
    opacity: 0.7;
}

.havant-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.havant-series-info {
    font-weight: 600;
    color: var(--primary-color);
}

.havant-clear-btn {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.havant-clear-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.havant-section {
    margin-bottom: 12px;
}

.havant-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.havant-section-title {
    font-size: 0.8rem;
    font-weight: 600;
}

.havant-section-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--border-color);
    padding: 2px 6px;
    border-radius: 10px;
}

.havant-grid-empty {
    text-align: center;
    padding: 12px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
}

.havant-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    gap: 4px;
}

.havant-image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    background: var(--border-color);
}

.havant-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.havant-image-item.have {
    border: 2px solid #f59e0b;
}

.havant-image-item.want {
    border: 2px solid #667eea;
    filter: grayscale(60%);
    opacity: 0.8;
}

.havant-image-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: linear-gradient(135deg, var(--border-color) 0%, var(--secondary-color) 100%);
}

.havant-count-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(245, 158, 11, 0.9);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 4px;
}

.havant-collno-badge {
    position: absolute;
    top: 2px;
    left: 2px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.55rem;
    font-weight: 600;
    padding: 1px 3px;
    border-radius: 3px;
}

/* 시리즈 정보 그룹 (멀티 시리즈 지원) */
.series-info-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.havant-season-info {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.smart-mode-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
}

/* 완성도 분석 섹션 */
.completion-status {
    background: var(--secondary-color);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.completion-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.completion-stat {
    font-size: 0.75rem;
    font-weight: 600;
}

.completion-stat.complete {
    color: #22c55e;
}

.completion-stat.incomplete {
    color: #f59e0b;
}

/* 미완성 멤버 필터 */
.incomplete-members {
    margin-top: 8px;
}

.member-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.clear-filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-filter-btn:hover {
    background: var(--border-color);
    color: var(--text-color);
}

.member-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.member-filter-btn {
    background: var(--border-color);
    border: 1px solid transparent;
    color: var(--text-color);
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.member-filter-btn:hover {
    background: var(--primary-color);
    color: white;
}

.member-filter-btn.active {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

/* 액션 버튼들 - 컴팩트 한 줄 배열 */
.floating-actions {
    display: flex;
    gap: 4px;
    padding: 8px 12px 10px;
    justify-content: center;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.action-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 3px;
    padding: 5px 8px;
    border: none;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.action-btn .btn-icon {
    font-size: 0.75rem;
}

.action-btn.discord {
    background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
    color: white;
}

.action-btn.discord:hover {
    filter: brightness(1.1);
    box-shadow: 0 2px 8px rgba(88, 101, 242, 0.3);
}

.action-btn.kakao {
    background: linear-gradient(135deg, #FEE500 0%, #E5CC00 100%);
    color: #3C1E1E;
}

.action-btn.kakao:hover {
    filter: brightness(1.05);
    box-shadow: 0 2px 8px rgba(254, 229, 0, 0.3);
}

.action-btn.save {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.action-btn.save:hover {
    filter: brightness(1.1);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.action-btn.image {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.action-btn.image:hover {
    filter: brightness(1.1);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.action-btn.reset {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.action-btn.reset:hover {
    filter: brightness(1.1);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* 도감 셀 HAVANT 버튼 */
.member-cell .havant-buttons {
    position: absolute;
    bottom: 4px;
    left: 4px;
    right: 4px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transform: translateY(4px);
    transition: all 0.2s;
    pointer-events: none;
}

.member-cell:hover .havant-buttons {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.member-cell .havant-btn {
    flex: 1;
    padding: 4px 6px;
    border: none;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.member-cell .havant-btn.have-btn {
    background: rgba(245, 158, 11, 0.9);
    color: white;
}

.member-cell .havant-btn.have-btn:hover {
    background: #f59e0b;
    transform: scale(1.05);
}

.member-cell .havant-btn.have-btn.active {
    background: #d97706;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}

.member-cell .havant-btn.want-btn {
    background: rgba(102, 126, 234, 0.9);
    color: white;
}

.member-cell .havant-btn.want-btn:hover {
    background: #667eea;
    transform: scale(1.05);
}

.member-cell .havant-btn.want-btn.active {
    background: #4f46e5;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

/* HAVANT 상태 표시 */
.member-cell.in-have {
    box-shadow: 0 0 0 3px #f59e0b, 0 0 12px rgba(245, 158, 11, 0.4);
}

.member-cell.in-want {
    box-shadow: 0 0 0 3px #667eea, 0 0 12px rgba(102, 126, 234, 0.4);
}

.member-cell .havant-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 5;
}

.member-cell .havant-indicator.have {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.member-cell .havant-indicator.want {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* ============================
   HAVANT 관리 페이지
   ============================ */

.havant-manager {
    padding-bottom: 100px; /* 플로팅 바 공간 확보 */
}

.manager-section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-color);
}

.section-icon {
    font-size: 1.1rem;
}

.list-count {
    background: var(--secondary-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* 현재 리스트 카드 */
.current-list-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 12px;
    padding: 16px;
    border: 2px solid rgba(102, 126, 234, 0.1);
}

.current-list-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.list-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.list-stat .stat-icon {
    font-size: 1.5rem;
}

.list-stat .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.list-stat .stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
}

.current-list-preview {
    background: white;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
    max-height: 120px;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.6;
}

.current-list-preview .empty-message {
    text-align: center;
    color: var(--text-secondary);
    margin: 0;
    padding: 20px;
}

.current-list-actions {
    display: flex;
    gap: 8px;
}

.manager-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.manager-btn.primary {
    background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
    color: white;
}

.manager-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

.manager-btn.secondary {
    background: linear-gradient(135deg, #FEE500 0%, #E5CC00 100%);
    color: #3C1E1E;
}

.manager-btn.secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254, 229, 0, 0.3);
}

.manager-btn.accent {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.manager-btn.accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* 저장된 리스트 */
.saved-lists-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.empty-saved-lists, .empty-history {
    text-align: center;
    padding: 32px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
}

.empty-hint {
    font-size: 0.85rem;
    margin-top: 4px;
    opacity: 0.7;
}

.saved-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--secondary-color);
    border-radius: 12px;
    transition: all 0.2s;
}

.saved-list-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
}

.saved-list-info {
    flex: 1;
}

.saved-list-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--text-color);
}

.saved-list-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.saved-list-actions {
    display: flex;
    gap: 8px;
}

.saved-list-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.saved-list-btn.load {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.saved-list-btn.load:hover {
    transform: scale(1.05);
}

.saved-list-btn.copy {
    background: var(--border-color);
    color: var(--text-color);
}

.saved-list-btn.copy:hover {
    background: var(--text-secondary);
    color: white;
}

.saved-list-btn.delete {
    background: transparent;
    color: #ef4444;
}

.saved-list-btn.delete:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* 히스토리 */
.history-container {
    max-height: 200px;
    overflow-y: auto;
}

.clear-history-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.clear-history-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
}

.history-item:last-child {
    border-bottom: none;
}

.history-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-format {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}

.history-format.discord {
    background: rgba(88, 101, 242, 0.1);
    color: #5865F2;
}

.history-format.kakaotalk {
    background: rgba(254, 229, 0, 0.3);
    color: #3C1E1E;
}

.history-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.history-copy {
    background: var(--secondary-color);
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.history-copy:hover {
    background: var(--border-color);
}

/* 설정 */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--secondary-color);
    border-radius: 10px;
}

.setting-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

.setting-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.setting-select:hover {
    border-color: var(--primary-color);
}

/* 저장 모달 */
.save-list-modal {
    max-width: 400px;
}

.save-list-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.save-list-input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.save-list-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.save-list-preview {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--secondary-color);
    border-radius: 10px;
}

.save-list-preview .preview-item {
    flex: 1;
    text-align: center;
}

.save-list-preview .preview-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 4px;
}

.save-list-preview .preview-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
}

/* 플로팅 바 반응형 */
@media (max-width: 768px) {
    .floating-havant {
        max-width: none;
        padding: 0 12px 12px;
    }

    .floating-collapsed {
        padding: 10px 14px;
        border-radius: 16px;
    }

    .floating-expanded {
        border-radius: 20px;
    }

    .floating-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .mode-buttons {
        flex-wrap: wrap;
    }

    .mode-option {
        min-width: calc(50% - 4px);
        padding: 8px 10px;
    }

    .current-list-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .current-list-actions {
        flex-wrap: wrap;
    }

    .manager-btn {
        min-width: calc(50% - 4px);
    }
}

@media (max-width: 480px) {
    .floating-summary {
        gap: 6px;
    }

    .floating-count {
        font-size: 0.9rem;
    }

    .floating-quick-actions {
        gap: 6px;
    }

    .current-list-stats {
        grid-template-columns: 1fr;
    }

    .list-stat {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* 다크 모드 플로팅 바 */
@media (prefers-color-scheme: dark) {
    .floating-expanded {
        background: rgba(30, 30, 30, 0.98);
    }

    .floating-stat {
        background: var(--card-bg);
    }

    .mode-option {
        background: var(--card-bg);
        border-color: var(--border-color);
        color: var(--text-color);
    }

    .preview-content {
        background: var(--card-bg);
    }

    .copy-dropdown-menu {
        background: var(--card-bg);
    }

    .copy-option:hover {
        background: var(--secondary-color);
    }

    .manager-section {
        background: var(--card-bg);
    }

    .current-list-card {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
        border-color: rgba(102, 126, 234, 0.2);
    }

    .list-stat {
        background: var(--secondary-color);
    }

    .current-list-preview {
        background: var(--secondary-color);
    }

    .saved-list-item {
        background: var(--secondary-color);
    }

    .setting-item {
        background: var(--secondary-color);
    }

    .setting-select {
        background: var(--card-bg);
        color: var(--text-color);
    }

    .save-list-input-group input {
        background: var(--card-bg);
        color: var(--text-color);
    }

    .save-list-preview {
        background: var(--secondary-color);
    }
}

/* ============================
   거래 규칙 편집 모달
   ============================ */
.trade-rule-modal .modal-content {
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}

.trade-rule-content h2 {
    margin: 0 0 20px;
    font-size: 1.2rem;
}

.trade-rule-section {
    margin-bottom: 20px;
}

.rule-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

/* 거래 모드 옵션 */
.trade-mode-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.mode-radio {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: var(--secondary-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-radio:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.mode-radio input {
    display: none;
}

.mode-radio input:checked + .mode-label {
    color: var(--primary-color);
}

.mode-radio:has(input:checked) {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

.mode-radio .mode-label {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.mode-radio .mode-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* 멤버 선택 그리드 */
.member-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
}

.member-checkbox {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.15s;
}

.member-checkbox:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--primary-color);
}

.member-checkbox:has(input:checked) {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.member-checkbox input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: white;
}

/* 비율 옵션 */
.ratio-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ratio-radio {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    background: var(--secondary-color);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 60px;
}

.ratio-radio:hover {
    border-color: var(--primary-color);
}

.ratio-radio input {
    display: none;
}

.ratio-radio:has(input:checked) {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

.ratio-radio:has(input:checked) span:first-of-type {
    color: var(--primary-color);
}

.ratio-radio span:first-of-type {
    font-weight: 700;
    font-size: 1rem;
}

.ratio-radio .ratio-desc {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 4px;
    text-align: center;
}

/* 메모 입력 */
.rule-note-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.rule-note-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 액션 버튼 */
.trade-rule-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.rule-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.rule-btn.cancel {
    background: var(--secondary-color);
    color: var(--text-secondary);
}

.rule-btn.cancel:hover {
    background: var(--border-color);
}

.rule-btn.reset {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.rule-btn.reset:hover {
    background: rgba(239, 68, 68, 0.2);
}

.rule-btn.save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.rule-btn.save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 거래 규칙 태그 표시 (이미지 그리드에서) */
.trade-rule-tag {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.75);
    color: #fbbf24;
    font-size: 0.55rem;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 4px;
    z-index: 10;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trade-rule-tag.same {
    background: rgba(74, 222, 128, 0.9);
    color: #052e16;
}

.trade-rule-tag.ratio {
    background: rgba(251, 191, 36, 0.9);
    color: #422006;
}

/* 다크 모드 */
@media (prefers-color-scheme: dark) {
    .trade-rule-content {
        background: var(--card-bg);
    }

    .mode-radio, .ratio-radio, .member-checkbox {
        background: var(--secondary-color);
    }

    .rule-note-input {
        background: var(--secondary-color);
        color: var(--text-color);
    }
}

/* 반응형 */
@media (max-width: 480px) {
    .trade-mode-options {
        grid-template-columns: 1fr;
    }

    .member-checkbox-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .ratio-options {
        justify-content: center;
    }
}

/* 설정 버튼 */
.setting-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.setting-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 멤버 규칙 관리 모달 */
.member-rules-modal .modal-content {
    max-width: 500px;
    max-height: 80vh;
}

.member-rules-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding: 4px;
}

.member-rule-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 8px;
    background: var(--secondary-color);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.member-rule-card:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.member-rule-card.has-rule {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.member-rule-card .member-snum {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 2px;
}

.member-rule-card.has-rule .member-snum {
    color: #fbbf24;
}

.member-rule-card .member-name-ko {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.member-rule-card .rule-preview {
    font-size: 0.6rem;
    color: #fbbf24;
    font-weight: 600;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

@media (max-width: 480px) {
    .member-rules-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================
   거래소 (Trading) 스타일
   ============================ */

.market-container {
    min-height: 400px;
}

/* 로그인 섹션 */
.trade-login-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 40px 20px;
}

.trade-login-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.trade-login-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.trade-login-card h3 {
    color: var(--text-color);
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.trade-login-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.trade-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #5865F2;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.trade-login-btn:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.trade-login-btn svg {
    width: 20px;
    height: 20px;
}

/* 메인 거래소 섹션 */
.trade-main-section {
    padding: 16px;
}

.trade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 16px;
}

.trade-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trade-username {
    font-weight: 600;
    color: var(--text-color);
}

.trade-cosmo {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.trade-header-actions {
    display: flex;
    gap: 8px;
}

.trade-sync-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.trade-sync-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.trade-logout-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.trade-logout-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-color);
}

/* 서브탭 */
.trade-subtabs {
    display: flex;
    gap: 4px;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
}

.trade-subtab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.trade-subtab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
}

.trade-subtab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.trade-subtab .badge {
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.trade-subtab.active .badge {
    background: rgba(255, 255, 255, 0.3);
}

/* 컨텐츠 영역 */
.trade-contents {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
}

.trade-content {
    display: none;
}

.trade-content.active {
    display: block;
}

/* HAVE/WANT 리스트 */
.trade-lists-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.trade-list-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 16px;
}

.list-header {
    margin-bottom: 12px;
}

.list-header h4 {
    color: var(--text-color);
    font-size: 1rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.list-header h4 span {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
}

.list-description {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.trade-list-content {
    min-height: 120px;
}

.trade-list-content .empty-message {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-align: center;
    padding: 40px 20px;
}

/* 아이템 그리드 */
.trade-item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
}

.trade-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.trade-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trade-item .quantity-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #f97316;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
}

.trade-item .item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px 4px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.trade-item .item-member {
    font-size: 0.6rem;
    color: white;
    font-weight: 600;
}

.trade-item .item-collection {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.7);
}

/* 매칭 찾기 버튼 */
.trade-actions-bar {
    display: flex;
    justify-content: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.trade-find-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.trade-find-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

/* 매칭 리스트 */
.trade-match-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.match-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.match-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.match-card.mutual {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.05);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.match-partner {
    font-weight: 600;
    color: var(--text-color);
}

.match-partner small {
    color: var(--text-secondary);
    font-weight: 400;
    margin-left: 8px;
}

.match-type {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.match-type.mutual {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.match-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.match-give, .match-receive {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 12px;
}

.match-give h5, .match-receive h5 {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.mini-grid {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.mini-grid img {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
}

.mini-grid .more {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.match-actions {
    display: flex;
    gap: 8px;
}

.match-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-contact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-contact:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-profile {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.btn-profile:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* 반응형 */
@media (max-width: 768px) {
    .trade-lists-container {
        grid-template-columns: 1fr;
    }

    .trade-subtabs {
        flex-wrap: wrap;
    }

    .trade-subtab {
        flex: none;
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .match-items {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .trade-login-card {
        padding: 24px;
    }

    .trade-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .trade-item-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
