/* 아이템스타 - 게임아이템 거래 플랫폼 */

:root {
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-input: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.88);
    --bg-footer: #0f172a;
    --bg-secondary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: rgba(15, 23, 42, 0.08);
    --border: rgba(15, 23, 42, 0.08);
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-light: rgba(99, 102, 241, 0.07);
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    --blue: #3b82f6;
    --green: #10b981;
    --red: #ef4444;
    --yellow: #f59e0b;
    --purple: #8b5cf6;
    --cyan: #06b6d4;
    --pink: #ec4899;
    --orange: #f97316;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --shadow-sm: 0 1px 3px rgba(15,23,42,0.04), 0 1px 2px rgba(15,23,42,0.06);
    --shadow-md: 0 4px 16px rgba(15,23,42,0.07), 0 2px 4px rgba(15,23,42,0.04);
    --shadow-lg: 0 12px 40px rgba(15,23,42,0.1), 0 4px 12px rgba(15,23,42,0.05);
    --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.25);
    --shadow-card: 0 1px 3px rgba(15,23,42,0.04), 0 1px 2px rgba(15,23,42,0.02);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --font-main: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    --max-width: 1280px;
    --gradient-warm: linear-gradient(135deg, #f97316, #fb923c);
    --gradient-cool: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gradient-success: linear-gradient(135deg, #10b981, #34d399);
    --gradient-hero: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    --price-color: #f97316;
    --price-gradient: linear-gradient(135deg, #f97316, #fb923c);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4); }
    50% { box-shadow: 0 0 16px 4px rgba(249, 115, 22, 0.15); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

/* Scroll reveal classes */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

h1, h2, h3, h4, h5, h6 { color: var(--text-primary); }

select, input, textarea, button { color: var(--text-primary); }

select option { background: #ffffff; color: #0f172a; }

::placeholder { color: var(--text-muted) !important; opacity: 1; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #6366f1, #a78bfa); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }

/* ===== HEADER ===== */
.header {
    background: var(--bg-header);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 20px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s ease, background 0.3s ease;
}
.header.scrolled {
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
    background: rgba(255, 255, 255, 0.95);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}

.logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: transform var(--transition);
}
.logo:hover { color: var(--accent); transform: scale(1.03); }
.logo span { font-size: 1.4rem; animation: float 3s ease-in-out infinite; }

.nav {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav a {
    color: var(--text-secondary);
    padding: 0.5rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
    border-radius: var(--radius-sm);
}

.nav a:hover, .nav a.active { color: var(--accent); background: var(--accent-light); }

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}
.nav a:hover::after, .nav a.active::after {
    width: 60%;
}

.nav-icon { position: relative; display: inline-flex; align-items: center; }

.badge-count {
    position: absolute;
    top: -4px; right: -4px;
    background: var(--red);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 10px;
    min-width: 14px;
    text-align: center;
    line-height: 1.3;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-wallet-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    background: var(--gradient-warm);
    color: #fff !important;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.3);
    animation: pulseGlow 3s ease-in-out infinite;
}
.nav-wallet-btn:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 4px 16px rgba(249, 115, 22, 0.4); }

.user-menu { position: relative; }

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    transition: all var(--transition);
    font-size: 0.85rem;
    color: var(--text-primary);
    font-family: var(--font-main);
}
.user-menu-btn:hover { border-color: var(--accent); }

.user-avatar-sm {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 48px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
    min-width: 200px;
    padding: 0.5rem;
    display: none;
    z-index: 1001;
    animation: fadeInDown 0.2s ease;
    backdrop-filter: blur(20px);
}
.user-dropdown.show { display: block; }

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.7rem;
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}
.user-dropdown a:hover { background: var(--bg-body); color: var(--accent); }

.user-dropdown hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 0.3rem 0;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.3rem;
    color: var(--text-primary);
}

/* ===== TOP SEARCH BAR (아이템쿡 스타일) ===== */
.top-search {
    background: linear-gradient(135deg, #f5f3ff 0%, #fff 50%, #f0f9ff 100%);
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.top-search-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-toggle {
    display: flex;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.search-toggle label {
    padding: 0.45rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--bg-card);
    color: var(--text-secondary);
    transition: all var(--transition);
}

.search-toggle input { display: none; }
.search-toggle input:checked + label {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.search-form {
    display: flex;
    flex: 1;
    gap: 0.4rem;
}

.search-form input {
    flex: 1;
    padding: 0.5rem 0.8rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font-main);
    transition: all 0.3s ease;
}
.search-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12); }

.search-form button {
    padding: 0.5rem 1rem;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: var(--font-main);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}
.search-form button:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35); }

/* ===== CATEGORY NAV BAR ===== */
.category-nav {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.category-nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.category-nav-inner::-webkit-scrollbar { display: none; }

.category-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    text-decoration: none;
}
.category-nav-item:hover {
    color: var(--accent);
}
.category-nav-item.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ===== CONTAINER ===== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.main-content {
    flex: 1;
    padding: 1rem 0 2rem;
}

/* ===== HOME LAYOUT (3 columns) ===== */
.home-layout {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 1rem;
    align-items: start;
}

/* ===== SECTION BOX ===== */
.section-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.section-box:hover {
    box-shadow: var(--shadow-md);
}

.section-box-header {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(99,102,241,0.03) 0%, transparent 100%);
}

.section-box-header a {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
}

.section-box-body {
    padding: 0;
}

/* ===== RANKING LIST (실시간 검색어 순위) ===== */
.ranking-list {
    list-style: none;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.88rem;
}
.ranking-item:last-child { border-bottom: none; }
.ranking-item:hover { background: var(--bg-card-hover); padding-left: 1.2rem; }

.ranking-num {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-shrink: 0;
    border-radius: 6px;
}

.ranking-item:nth-child(-n+3) .ranking-num { 
    background: var(--accent-gradient); 
    color: #fff; 
    font-size: 0.72rem;
    border-radius: 6px;
}

.ranking-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.ranking-item:hover .ranking-icon { transform: scale(1.1); }

.ranking-name {
    flex: 1;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-change {
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
    min-width: 20px;
    text-align: right;
}
.ranking-change.up { color: var(--red); }
.ranking-change.down { color: var(--blue); }
.ranking-change.same { color: var(--text-muted); }

/* ===== MY PAGE PANEL ===== */
.mypage-panel {
    padding: 1rem;
}

.mypage-login-prompt {
    text-align: center;
    padding: 1.5rem 0;
}

.mypage-login-prompt .btn {
    margin-top: 0.75rem;
}

.mypage-user {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.75rem;
}

.mypage-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.mypage-info .name {
    font-weight: 600;
    font-size: 0.95rem;
}

.mypage-info .badge {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mypage-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    text-align: center;
}

.mypage-stat {
    padding: 0.5rem;
    background: linear-gradient(135deg, var(--bg-body), rgba(99, 102, 241, 0.04));
    border-radius: var(--radius-sm);
    transition: transform 0.2s ease;
}
.mypage-stat:hover { transform: scale(1.03); }

.mypage-stat .label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.mypage-stat .value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--price-color);
}

.mypage-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
}

.mypage-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--bg-body);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
}
.mypage-links a:hover { background: var(--accent-light); color: var(--accent); }

/* ===== TRENDING ITEMS (급상승 물품) ===== */
.trending-items {
    display: flex;
    flex-direction: column;
}

.trending-item {
    display: flex;
    gap: 0.7rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}
.trending-item:last-child { border-bottom: none; }
.trending-item:hover { background: var(--bg-card-hover); }

.trending-thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-body);
}

.trending-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.trending-game {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.15rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.trending-title {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.15rem;
}

.trending-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--price-color);
}

.trending-status {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    background: var(--green);
    color: #fff;
    font-weight: 600;
    display: inline-block;
    width: fit-content;
}
.trending-status.reserved { background: var(--yellow); color: #fff; }
.trending-status.sold { background: var(--text-muted); }

/* ===== GAME GRID ===== */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.6rem;
    padding: 1rem;
}

.game-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.7rem 0.3rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    color: var(--text-primary);
    text-align: center;
}

.game-chip:hover {
    background: var(--accent-light);
    color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.12);
}

.game-chip-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.game-chip-icon img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
}

.game-chip-name {
    font-size: 0.73rem;
    font-weight: 500;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Game badge icon (inline) */
.game-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 3px;
}
.game-badge-icon img {
    width: 100%; height: 100%;
    border-radius: 4px;
    object-fit: cover;
}

/* Game icon large */
.game-icon-lg {
    width: 64px; height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 auto 0.6rem;
}
.game-icon-lg img {
    width: 100%; height: 100%;
    border-radius: 14px;
    object-fit: cover;
}

/* ===== ITEM CARDS ===== */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.item-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: var(--shadow-card);
}
.item-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(99, 102, 241, 0.12), 0 4px 12px rgba(0,0,0,0.06);
    color: inherit;
}

.item-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--bg-body);
    transition: transform 0.5s ease;
}
.item-card:hover .item-card-img {
    transform: scale(1.05);
}

.item-card-body { padding: 0.8rem; overflow: hidden; }

.item-card-game {
    font-size: 0.73rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.item-card-title {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}

.item-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.4rem;
}

.item-card-price {
    font-size: 1.05rem;
    font-weight: 800;
    background: var(--price-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.item-card-seller {
    font-size: 0.73rem;
    color: var(--text-muted);
}

.item-card-tags {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.4rem;
    flex-wrap: wrap;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    background: var(--bg-body);
    border-radius: 4px;
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s ease;
}
.tag:hover { transform: translateY(-1px); }
.tag-urgent { background: rgba(239,68,68,0.1); color: var(--red); animation: pulse 2s infinite; }
.tag-featured { background: var(--accent-light); color: var(--accent); }
.tag-sell { background: rgba(59,130,246,0.1); color: #3b82f6; }
.tag-buy { background: rgba(16,185,129,0.1); color: #10b981; }

/* ===== ITEM LIST VIEW ===== */
.items-list {
    display: flex;
    flex-direction: column;
}

.item-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: background var(--transition);
}
.item-row:last-child { border-bottom: none; }
.item-row:hover { background: var(--bg-card-hover); }

.item-row-icon {
    width: 40px; height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.item-row-info {
    flex: 1;
    min-width: 0;
}

.item-row-game {
    font-size: 0.72rem;
    color: var(--accent);
    font-weight: 600;
}

.item-row-title {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-row-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--price-color);
    flex-shrink: 0;
}

.item-row-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ===== NOTICE & FAQ ===== */
.notice-list { list-style: none; }

.notice-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
}
.notice-item:last-child { border-bottom: none; }
.notice-item:hover { background: var(--bg-card-hover); color: var(--accent); }

.notice-date { font-size: 0.75rem; color: var(--text-muted); flex-shrink: 0; }

.notice-item::after { content: '+'; color: var(--text-muted); font-size: 1rem; flex-shrink: 0; margin-left: 0.5rem; transition: transform 0.2s; }
.notice-item.open::after { content: '−'; }
.notice-content { display: none; padding: 0.5rem 1rem 0.8rem; font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; background: var(--bg-body); }
.notice-item.open + .notice-content { display: block; }

.faq-item {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    cursor: pointer;
}
.faq-item:last-child { border-bottom: none; }
.faq-item:hover { background: var(--bg-card-hover); }

.faq-q { font-weight: 600; color: var(--text-primary); display: flex; align-items: center; justify-content: space-between; }
.faq-q::before { content: 'Q.'; color: var(--accent); margin-right: 0.3rem; font-weight: 700; flex-shrink: 0; }
.faq-q::after { content: '+'; color: var(--accent); font-size: 1.1rem; flex-shrink: 0; margin-left: 0.5rem; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.faq-item.open .faq-q::after { content: '−'; transform: rotate(180deg); }
.faq-a { display: none; padding: 0.6rem 0 0.2rem 1.5rem; font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; animation: fadeInUp 0.3s ease; }
.faq-item.open .faq-a { display: block; }

/* ===== GAME MONEY TOP ===== */
.game-money-tabs {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid var(--border-color);
}

.game-money-tab {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    background: none;
    border-top: none; border-left: none; border-right: none;
    font-family: var(--font-main);
}
.game-money-tab:hover, .game-money-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.game-money-content { display: none; padding: 0; }
.game-money-content.active { display: block; }

.money-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.82rem;
}
.money-item:last-child { border-bottom: none; }

.money-server { font-weight: 600; color: var(--blue); flex-shrink: 0; min-width: 50px; }
.money-desc { flex: 1; color: var(--text-secondary); line-height: 1.3; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.55rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    line-height: 1.4;
    font-family: var(--font-main);
    position: relative;
    overflow: hidden;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary { background: var(--accent-gradient); color: #fff; box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4); color: #fff; }

.btn-secondary { background: var(--bg-card); color: var(--text-primary); border: 1.5px solid var(--border-color); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 4px 12px rgba(0,0,0,0.06); }

.btn-success { background: var(--gradient-success); color: #fff; box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #f87171); color: #fff; box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3); }
.btn-warning { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #fff; box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3); }

.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.78rem; }
.btn-lg { padding: 0.7rem 1.5rem; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn-outline { background: transparent; border: 1.5px solid var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent-gradient); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.1rem; }

.form-label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-main);
    transition: border-color var(--transition);
    background: var(--bg-input);
    color: var(--text-primary);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.form-input::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 120px; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }
.form-error { font-size: 0.75rem; color: var(--red); margin-top: 0.2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.form-select { appearance: auto; }

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
}
.card:hover { border-color: rgba(0,0,0,0.12); box-shadow: var(--shadow-md); }

.card-body { padding: 1rem; }
.card-header {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ===== SEARCH SECTION ===== */
.search-section {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.search-bar {
    display: flex;
    gap: 0.5rem;
    max-width: 700px;
    margin: 0 auto;
}
.search-bar .form-input {
    flex: 1;
    border-radius: var(--radius-md);
    padding: 0.65rem 0.9rem;
}
.search-bar .btn { border-radius: var(--radius-md); padding: 0.65rem 1.2rem; }

/* ===== FILTERS ===== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 3px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-secondary);
    text-decoration: none;
    gap: 0.25rem;
}
.filter-chip:hover, .filter-chip.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
    transform: translateY(-1px);
}

/* ===== ITEM DETAIL ===== */
.item-detail {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1.5rem;
    align-items: start;
}

.item-images {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

.item-main-img {
    width: 100%;
    height: 380px;
    object-fit: contain;
    background: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-thumbs {
    display: flex;
    gap: 0.4rem;
    padding: 0.6rem;
    overflow-x: auto;
}

.item-thumb {
    width: 56px; height: 56px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--transition);
}
.item-thumb:hover, .item-thumb.active { border-color: var(--accent); }

.item-info-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    position: sticky;
    top: 60px;
}

.item-info-panel h1 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

.item-price-big {
    font-size: 1.6rem;
    font-weight: 800;
    background: var(--price-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.8rem;
}
.item-price-big .original {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: 400;
    margin-left: 0.4rem;
}

.item-meta-list { list-style: none; margin-bottom: 1rem; }

.item-meta-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}
.item-meta-list li:last-child { border-bottom: none; }
.item-meta-list .label { color: var(--text-muted); }
.item-meta-list .value { font-weight: 600; }

.seller-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem;
    background: var(--bg-body);
    border-radius: var(--radius-sm);
    margin-bottom: 0.8rem;
    text-decoration: none;
    color: inherit;
}
.seller-card:hover { color: inherit; }

.seller-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.seller-info .name { font-weight: 600; font-size: 0.9rem; }
.seller-info .rating { font-size: 0.75rem; color: var(--text-muted); }

.item-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.item-description {
    margin-top: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.2rem;
}

.item-description h3 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

.item-description .content {
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-secondary);
}

/* ===== SECTION TITLE ===== */
.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section-title a { font-size: 0.8rem; font-weight: 400; color: var(--text-muted); }

/* ===== AUTH PAGES ===== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 52px);
    padding: 2rem;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
    animation: fadeInUp 0.5s ease;
}
.auth-card h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.4rem; text-align: center; }
.auth-card .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.85rem; }
.auth-footer { text-align: center; margin-top: 1.2rem; font-size: 0.85rem; color: var(--text-muted); }

/* ===== ALERTS ===== */
.alert {
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    animation: fadeInDown 0.4s ease;
}
.alert-success { background: rgba(34,197,94,0.1); color: var(--green); border: 1px solid rgba(34,197,94,0.25); }
.alert-error { background: rgba(239,68,68,0.1); color: var(--red); border: 1px solid rgba(239,68,68,0.25); }
.alert-warning { background: rgba(234,179,8,0.1); color: #92700c; border: 1px solid rgba(234,179,8,0.3); }
.alert-info { background: rgba(59,130,246,0.1); color: var(--blue); border: 1px solid rgba(59,130,246,0.25); }

/* ===== TABLES ===== */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th, td { padding: 0.65rem 0.8rem; text-align: left; border-bottom: 1px solid var(--border-color); }
th { background: var(--bg-body); font-weight: 600; font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-card-hover); }

/* ===== STATUS BADGES ===== */
.status {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 600;
}
.status-active { background: rgba(34,197,94,0.1); color: var(--green); }
.status-pending { background: rgba(234,179,8,0.12); color: #92700c; }
.status-escrow { background: rgba(59,130,246,0.1); color: var(--blue); }
.status-sold { background: rgba(0,0,0,0.06); color: var(--text-muted); }
.status-cancelled { background: rgba(239,68,68,0.1); color: var(--red); }
.status-confirmed { background: rgba(34,197,94,0.1); color: var(--green); }

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    margin-top: 1.5rem;
}

.page-num, .page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px; height: 32px;
    padding: 0 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition);
}
.page-num:hover, .page-btn:hover { background: var(--bg-card); color: var(--accent); transform: scale(1.1); }
.page-num.active { background: var(--accent-gradient); color: #fff; box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3); }
.page-dots { padding: 0 0.2rem; color: var(--text-muted); }

/* ===== STARS ===== */
.stars { display: inline-flex; gap: 1px; }
.star { font-size: 0.9rem; line-height: 1; }
.star.filled { color: var(--yellow); }
.star.empty { color: var(--text-muted); }

/* ===== DASHBOARD ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 0 4px 4px 0;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.stat-card .label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.stat-card .value { font-size: 1.3rem; font-weight: 800; }
.stat-card .change { font-size: 0.75rem; margin-top: 0.2rem; }
.stat-card .change.up { color: var(--green); }
.stat-card .change.down { color: var(--red); }

/* ===== SIDEBAR LAYOUT ===== */
.page-with-sidebar {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.4rem;
    position: sticky;
    top: 60px;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.7rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}
.sidebar a:hover, .sidebar a.active {
    background: var(--accent-light);
    color: var(--accent);
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1rem;
    gap: 0;
}

.tab {
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    text-decoration: none;
}
.tab:hover { color: var(--accent); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-overlay.show { display: flex; animation: fadeIn 0.2s ease; }

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,0.2);
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal h3 { font-size: 1.1rem; margin-bottom: 0.8rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.4rem; margin-top: 1.2rem; }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}
.empty-state .icon { font-size: 2.5rem; margin-bottom: 0.8rem; }
.empty-state h3 { margin-bottom: 0.3rem; color: var(--text-primary); font-size: 1rem; }

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-footer);
    border-top: none;
    padding: 2.5rem 0 1.5rem;
    margin-top: auto;
    color: #94a3b8;
    position: relative;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #06b6d4, #10b981, #f97316);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 0.8rem;
}
.footer-links a { color: #94a3b8; font-size: 0.82rem; font-weight: 500; transition: color 0.2s; }
.footer-links a:hover { color: #a78bfa; }

.footer-info {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.6;
}
.footer-info strong {
    color: #cbd5e1;
}

.footer-cs {
    flex-shrink: 0;
    text-align: right;
}

.footer-cs .cs-label { font-size: 0.8rem; color: #64748b; margin-bottom: 0.3rem; }
.footer-cs .cs-desc { font-size: 0.9rem; font-weight: 700; color: #a78bfa; }
.footer-cs .cs-time { font-size: 0.75rem; color: #64748b; }

/* ===== MOBILE BOTTOM NAV ===== */
.mobile-only-link { display: none !important; }
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0; right: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(0,0,0,0.06);
    z-index: 999;
    padding: 0.4rem 0;
    padding-bottom: env(safe-area-inset-bottom, 0.4rem);
    box-shadow: 0 -2px 20px rgba(0,0,0,0.06);
}

.mobile-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    padding: 0.2rem 0.8rem;
    transition: color var(--transition);
}
.mobile-nav a .icon { font-size: 1.2rem; }
.mobile-nav a:hover, .mobile-nav a.active { color: var(--accent); }

/* ===== BANNER ===== */
.banner-placeholder {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 30%, #a78bfa 60%, #06b6d4 100%);
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    text-align: center;
    padding: 1rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.3);
}

/* Banner Slider */
.banner-slider {
    position: relative;
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1rem;
}
.banner-track {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 1;
    min-height: 100px;
}
.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.banner-slide.active {
    opacity: 1;
    z-index: 1;
}
.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--radius-md);
}
.banner-slide a {
    display: block;
    height: 100%;
}
.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(0,0,0,0.35);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.banner-arrow:hover { background: rgba(0,0,0,0.6); }
.banner-prev { left: 8px; }
.banner-next { right: 8px; }
.banner-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    gap: 6px;
}
.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.2s;
}
.banner-dot.active {
    background: #fff;
}

/* ===== QTY / IMAGE UPLOAD / LOADING ===== */
.qty-input {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    width: fit-content;
}
.qty-input button {
    width: 32px; height: 32px;
    border: none;
    background: var(--bg-body);
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-primary);
}
.qty-input input {
    width: 45px; height: 32px;
    border: none;
    text-align: center;
    font-weight: 600;
    font-family: var(--font-main);
    background: var(--bg-input);
    color: var(--text-primary);
}

.image-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-muted);
}
.image-upload-zone:hover { border-color: var(--accent); background: var(--accent-light); }

.image-preview-list { display: flex; gap: 0.4rem; margin-top: 0.6rem; flex-wrap: wrap; }
.image-preview {
    width: 72px; height: 72px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 2px solid var(--border-color);
    position: relative;
}
.image-preview .remove {
    position: absolute;
    top: -5px; right: -5px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .home-layout { grid-template-columns: 250px 1fr 250px; }
}

@media (max-width: 1024px) {
    .home-layout { grid-template-columns: 1fr; }
    .home-layout .left-panel { display: none; }
    .home-layout .right-panel { display: none; }
    .items-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 768px) {
    html { font-size: 13px; }
    .nav { display: none; }
    .mobile-menu-btn { display: block; }
    .mobile-nav { display: block; }
    body { padding-bottom: 60px; }

    .nav.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 52px;
        left: 0; right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-color);
        padding: 0.8rem;
        box-shadow: 0 8px 30px rgba(0,0,0,0.1);
        animation: fadeInDown 0.3s ease;
    }
    .nav.mobile-open a {
        border-radius: var(--radius-sm);
        padding: 0.65rem 0.9rem;
    }
    .nav.mobile-open .mobile-only-link { display: flex !important; }

    .items-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
    .item-detail { grid-template-columns: 1fr; }
    .item-info-panel { position: static; }
    .page-with-sidebar { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .form-row { grid-template-columns: 1fr; }
    .game-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 0.4rem; }
    .footer-top { flex-direction: column; gap: 1rem; }
    .footer-cs { text-align: left; }
    .auth-card { padding: 1.2rem; }
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
    .game-card-grid { grid-template-columns: repeat(2, 1fr); }
    .top-game-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
    .top-game-name { font-size: 0.75rem; padding: 0.4rem; }
    .top-game-badge span { font-size: 0.55rem; padding: 2px 5px; }
    .game-select-grid { grid-template-columns: repeat(2, 1fr); }
    .server-filter-bar { gap: 0.3rem; }
    .server-filter-bar .filter-chip { font-size: 0.75rem; padding: 0.25rem 0.6rem; }
}

@media (max-width: 480px) {
    .items-grid { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .item-card-img { height: 140px; }
    .search-toggle { display: none; }
    .game-card-grid { grid-template-columns: 1fr 1fr; }
    .top-game-grid { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; padding: 0.6rem; }
    .top-game-name { font-size: 0.7rem; padding: 0.35rem; }
    .top-game-badge span { font-size: 0.5rem; padding: 2px 4px; }
    .game-select-grid { grid-template-columns: 1fr; }
}

/* ===== GAME CARD GRID (메인 인기 게임) ===== */
.game-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
}

/* ===== TOP GAME GRID (거래 상위 게임 TOP 10) ===== */
.top-game-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    padding: 1rem;
}
.top-game-card {
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-primary);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
}
.top-game-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0,0,0,0.15), 0 0 0 1px var(--accent);
    border-color: var(--accent);
}
.top-game-img {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}
.top-game-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.top-game-img img.icon-fallback {
    width: 60%;
    height: 60%;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 16px;
}
.top-game-card:hover .top-game-img img:not(.icon-fallback) {
    transform: scale(1.05);
}
.top-game-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}
.top-game-badge span {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 6px;
    letter-spacing: -0.02em;
}
.top-game-name {
    padding: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
    line-height: 1.3;
}
.game-card-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition);
}
.game-card-item:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.game-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}
.game-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}
.game-card-info { min-width: 0; }
.game-card-name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.game-card-count {
    font-size: 0.73rem;
    color: var(--accent);
    font-weight: 500;
    margin-top: 0.1rem;
}

/* Game chip count badge */
.game-chip-count {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: -0.1rem;
}

/* Hot game chip */
.hot-game-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.hot-game-chip:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}
.hot-badge {
    font-size: 0.7rem;
    background: var(--accent-gradient);
    color: #fff;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
    animation: pulse 2s ease-in-out infinite;
}

/* Ranking count */
.ranking-count {
    font-size: 0.73rem;
    color: var(--text-muted);
    margin-left: auto;
    flex-shrink: 0;
}

/* ===== GAME SELECT GRID (items.php 게임 선택) ===== */
.game-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.6rem;
}
.game-select-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition);
}
.game-select-card:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.game-select-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}
.game-select-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}
.game-select-info { min-width: 0; }
.game-select-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.game-select-count {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 500;
}

/* ===== GAME HEADER (게임 상세 페이지) ===== */
.game-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.2rem;
    padding: 1rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}
.game-header-back {
    font-size: 1.4rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    transition: all var(--transition);
}
.game-header-back:hover {
    background: var(--bg-body);
    color: var(--accent);
}
.game-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}
.game-header-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}
.game-header-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}
.game-header-count {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ===== SERVER FILTER BAR ===== */
.server-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
}

/* ===== ENHANCED VISUAL EFFECTS ===== */

/* Glassmorphism cards */
.section-box, .card, .auth-card {
    backdrop-filter: blur(10px);
}

/* Staggered animation for grid items */
.top-game-grid .top-game-card,
.game-grid .game-chip,
.items-grid .item-card,
.game-card-grid .game-card-item {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}
.top-game-grid .top-game-card:nth-child(1), .items-grid .item-card:nth-child(1), .game-grid .game-chip:nth-child(1) { animation-delay: 0.05s; }
.top-game-grid .top-game-card:nth-child(2), .items-grid .item-card:nth-child(2), .game-grid .game-chip:nth-child(2) { animation-delay: 0.1s; }
.top-game-grid .top-game-card:nth-child(3), .items-grid .item-card:nth-child(3), .game-grid .game-chip:nth-child(3) { animation-delay: 0.15s; }
.top-game-grid .top-game-card:nth-child(4), .items-grid .item-card:nth-child(4), .game-grid .game-chip:nth-child(4) { animation-delay: 0.2s; }
.top-game-grid .top-game-card:nth-child(5), .items-grid .item-card:nth-child(5), .game-grid .game-chip:nth-child(5) { animation-delay: 0.25s; }
.top-game-grid .top-game-card:nth-child(6), .items-grid .item-card:nth-child(6), .game-grid .game-chip:nth-child(6) { animation-delay: 0.3s; }
.top-game-grid .top-game-card:nth-child(7), .items-grid .item-card:nth-child(7), .game-grid .game-chip:nth-child(7) { animation-delay: 0.35s; }
.top-game-grid .top-game-card:nth-child(8), .items-grid .item-card:nth-child(8), .game-grid .game-chip:nth-child(8) { animation-delay: 0.4s; }
.top-game-grid .top-game-card:nth-child(9), .items-grid .item-card:nth-child(9) { animation-delay: 0.45s; }
.top-game-grid .top-game-card:nth-child(10), .items-grid .item-card:nth-child(10) { animation-delay: 0.5s; }
.top-game-grid .top-game-card:nth-child(n+11), .items-grid .item-card:nth-child(n+11), .game-grid .game-chip:nth-child(n+9) { animation-delay: 0.55s; }

/* Gradient text utility */
.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Shimmer loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* Image zoom container */
.item-card .item-card-img {
    overflow: hidden;
}

/* Enhanced scrollbar for ranking list */
.ranking-list {
    max-height: 600px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.25) transparent;
}

/* Tab hover gradient underline */
.tab:hover::after, .tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
}
.tab { position: relative; }

/* Item row hover effect */
.item-row:hover {
    background: var(--bg-card-hover);
    padding-left: 1.2rem;
    transition: all 0.3s ease;
}

/* Enhanced banner slider */
.banner-slider {
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}
.banner-slide {
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.banner-arrow {
    opacity: 0;
    transition: all 0.3s ease;
}
.banner-slider:hover .banner-arrow {
    opacity: 1;
}
.banner-arrow:hover {
    background: rgba(99, 102, 241, 0.85) !important;
    transform: translateY(-50%) scale(1.1);
}

/* Toast animation */
@keyframes slideIn {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Image upload zone enhanced */
.image-upload-zone:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    transform: scale(1.01);
}

/* Enhanced status badges */
.status {
    transition: all 0.2s ease;
}
.status:hover {
    transform: scale(1.05);
}

/* Focus ring for accessibility */
.btn:focus-visible, .form-input:focus-visible, .form-select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Loading spinner enhanced */
.loading {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid rgba(99, 102, 241, 0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Smooth page transition feel */
.container {
    animation: fadeIn 0.4s ease;
}

/* Game select card hover improvement */
.game-select-card:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1);
}

/* Notice accordion animation */
.notice-content {
    animation: fadeInUp 0.3s ease;
}

/* User dropdown items hover */
.user-dropdown a {
    transition: all 0.2s ease;
}
.user-dropdown a:hover {
    background: var(--accent-light);
    color: var(--accent);
    padding-left: 1rem;
}

/* Mypage links hover */
.mypage-links a:hover {
    background: var(--accent-light);
    color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

/* Category nav item active indicator */
.category-nav-item.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: linear-gradient(to bottom, transparent, var(--accent-light));
}

/* Enhanced mobile nav */
.mobile-nav a.active {
    color: var(--accent);
    position: relative;
}
.mobile-nav a.active::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 3px;
}

/* Select all text on focus for number inputs */
input[type="number"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Sidebar active state */
.sidebar a.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
    position: relative;
}
.sidebar a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    bottom: 25%;
    width: 3px;
    background: var(--accent-gradient);
    border-radius: 0 3px 3px 0;
}

/* Table row hover with gradient */
tr:hover td {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.02) 0%, transparent 100%);
}
