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

/* 테마 전환 애니메이션 */
html {
    transition: background-color 0.3s ease, color 0.3s ease;
}

body,
.card,
.navbar,
.footer,
button,
input,
textarea,
select {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 화이트 테마 (기본) */
[data-theme="white"] {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --text-on-dark: #ffffff;
    --text-on-light: #1e293b;
    --text-muted: rgba(15, 23, 42, 0.6);
    --bg-muted: rgba(148, 163, 184, 0.08);
    --bg-card-light: rgba(241, 245, 249, 0.7);
    --accent-gold: #f59e0b;
    --accent-orange: #f97316;
    --accent-blue: #1d4ed8;
}

/* 블랙 테마 */
[data-theme="black"] {
    --primary-color: #6366f1;
    --primary-hover: #818cf8;
    --secondary-color: #94a3b8;
    --success-color: #22c55e;
    --error-color: #f87171;
    --warning-color: #fbbf24;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-color: #f1f5f9;
    --text-light: #cbd5e1;
    --border-color: #334155;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --text-on-dark: #ffffff;
    --text-on-light: #f1f5f9;
    --text-muted: rgba(203, 213, 225, 0.7);
    --bg-muted: rgba(51, 65, 85, 0.3);
    --bg-card-light: rgba(30, 41, 59, 0.5);
    --accent-gold: #fbbf24;
    --accent-orange: #fb923c;
    --accent-blue: #60a5fa;
}

/* 다크블랙 테마 */
[data-theme="darkblack"] {
    --primary-color: #818cf8;
    --primary-hover: #a5b4fc;
    --secondary-color: #64748b;
    --success-color: #34d399;
    --error-color: #fb7185;
    --warning-color: #fcd34d;
    --bg-color: #000000;
    --card-bg: #0a0a0a;
    --text-color: #ffffff;
    --text-light: #a1a1aa;
    --border-color: #1f1f1f;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.5), 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -2px rgba(0, 0, 0, 0.5);
    --text-on-dark: #ffffff;
    --text-on-light: #ffffff;
    --text-muted: rgba(161, 161, 170, 0.8);
    --bg-muted: rgba(31, 31, 31, 0.5);
    --bg-card-light: rgba(20, 20, 20, 0.6);
    --accent-gold: #fcd34d;
    --accent-orange: #fdba74;
    --accent-blue: #7dd3fc;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-color) 0%, rgba(241, 245, 249, 0.8) 100%);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1;
    font-kerning: normal;
    margin: 0;
    padding: 0;
    position: relative;
}

[data-theme="black"] body,
[data-theme="darkblack"] body {
    background: linear-gradient(135deg, var(--bg-color) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* 1080P 최적화는 responsive.css에서 처리 */

/* 1440p (2560x1440) 해상도 최적화 */
@media screen and (min-width: 2560px) {
    .container {
        max-width: 1800px;
        padding: 0 2.5rem;
    }
}

/* 태블릿 가로 (1024px - 1919px) */
@media screen and (max-width: 1919px) {
    .container {
        max-width: 1400px;
    }
}

/* 태블릿 가로 (1024px - 1365px) */
@media screen and (max-width: 1365px) {
    .container {
        max-width: 1200px;
    }
}

/* 태블릿 세로 (768px - 1023px) */
@media screen and (max-width: 1023px) {
    .container {
        max-width: 100%;
        padding: 0 1.5rem;
    }
}

/* 모바일 가로 (481px - 767px) */
@media screen and (max-width: 768px) {
    body {
        font-size: 15px;
    }
    
    .container {
        padding: 0 1rem;
    }
}

/* 모바일 세로 (480px 이하) */
@media screen and (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0 0.75rem;
    }
}

/* Sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, var(--card-bg) 0%, rgba(255, 255, 255, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12), 2px 0 8px rgba(0, 0, 0, 0.08);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    overflow-y: auto;
    overflow-x: hidden;
}

@media screen and (min-width: 1024px) {
    .sidebar.active {
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12), 2px 0 8px rgba(0, 0, 0, 0.08);
    }
}

[data-theme="black"] .sidebar,
[data-theme="darkblack"] .sidebar {
    background: linear-gradient(180deg, var(--card-bg) 0%, rgba(30, 41, 59, 0.98) 100%);
    border-right-color: rgba(255, 255, 255, 0.1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5), 2px 0 8px rgba(0, 0, 0, 0.3);
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(79, 70, 229, 0.05) 100%);
}

[data-theme="black"] .sidebar-header,
[data-theme="darkblack"] .sidebar-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    background: linear-gradient(135deg, var(--text-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-close {
    width: 2rem;
    height: 2rem;
    border: none;
    background: rgba(79, 70, 229, 0.1);
    color: var(--text-color);
    border-radius: 0.5rem;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sidebar-close:hover {
    background: rgba(79, 70, 229, 0.2);
    transform: rotate(90deg);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    position: relative;
    width: 100%;
}

.sidebar-link:hover {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.1) 0%, rgba(79, 70, 229, 0.05) 100%);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateX(4px);
}

[data-theme="black"] .sidebar-link:hover,
[data-theme="darkblack"] .sidebar-link:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.1) 100%);
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.15) 0%, rgba(79, 70, 229, 0.1) 100%);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

[data-theme="black"] .sidebar-link.active,
[data-theme="darkblack"] .sidebar-link.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.15) 100%);
}

.sidebar-icon {
    font-size: 1.25rem;
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-text {
    font-size: 0.9375rem;
    font-weight: 500;
    flex: 1;
}

.sidebar-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    color: var(--text-light);
    margin-left: auto;
}

.sidebar-menu-item.has-submenu.open .sidebar-arrow {
    transform: rotate(180deg);
}

.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.2s ease;
    padding: 0;
    opacity: 0;
    background: rgba(79, 70, 229, 0.03);
    border-left: 2px solid rgba(79, 70, 229, 0.1);
    margin-left: 1.25rem;
}

[data-theme="black"] .sidebar-submenu,
[data-theme="darkblack"] .sidebar-submenu {
    background: rgba(99, 102, 241, 0.05);
    border-left-color: rgba(99, 102, 241, 0.2);
}

.sidebar-menu-item.has-submenu.open .sidebar-submenu,
.sidebar-menu-item.has-submenu:hover .sidebar-submenu {
    max-height: 1000px;
    padding: 0.5rem 0;
    opacity: 1;
}

/* 호버 시 화살표 회전 */
.sidebar-menu-item.has-submenu:hover .sidebar-arrow {
    transform: rotate(180deg);
}

/* 데스크톱에서만 호버 작동 */
@media screen and (min-width: 1024px) {
    .sidebar-menu-item.has-submenu:hover .sidebar-submenu {
        max-height: 1000px;
        padding: 0.5rem 0;
        opacity: 1;
    }
    
    .sidebar-menu-item.has-submenu:hover .sidebar-arrow {
        transform: rotate(180deg);
    }
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    padding-left: 2.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    position: relative;
}

.sidebar-sublink:hover {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.08) 0%, rgba(79, 70, 229, 0.04) 100%);
    color: var(--primary-color);
    transform: translateX(2px);
}

[data-theme="black"] .sidebar-sublink:hover,
[data-theme="darkblack"] .sidebar-sublink:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.12) 0%, rgba(99, 102, 241, 0.08) 100%);
}

.sidebar-sublink.active {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.12) 0%, rgba(79, 70, 229, 0.08) 100%);
    color: var(--primary-color);
    font-weight: 600;
}

.sidebar-sublink-icon {
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-sublink-text {
    flex: 1;
}

.sidebar-toggle {
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(79, 70, 229, 0.05));
    color: var(--text-color);
    border-radius: 0.625rem;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

.sidebar-toggle:hover {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.2), rgba(79, 70, 229, 0.15));
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.sidebar-toggle:active {
    transform: scale(0.95);
}

@media screen and (max-width: 1024px) {
    .sidebar {
        width: 260px;
    }
    
    .sidebar-header {
        padding: 1.25rem 1rem;
    }
    
    .sidebar-link {
        padding: 0.75rem 1rem;
    }
}

@media screen and (max-width: 768px) {
    .sidebar {
        width: 240px;
    }
    
    .sidebar-title {
        font-size: 1.125rem;
    }
    
    .sidebar-text {
        font-size: 0.875rem;
    }
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    width: 100%;
    margin: 0;
    left: 0;
    right: 0;
}

[data-theme="black"] .navbar,
[data-theme="darkblack"] .navbar {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(30, 41, 59, 0.98) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
}

.navbar .container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.navbar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    width: 100%;
    position: relative;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
    max-width: 800px;
    min-width: 0;
}

.nav-menu {
    width: 100%;
    justify-content: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

[data-theme="black"] .nav-menu,
[data-theme="darkblack"] .nav-menu {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.nav-search {
    flex: 1;
    max-width: 700px;
    min-width: 300px;
}

.search-form {
    width: 100%;
}

.search-input-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(79, 70, 229, 0.2);
    border-radius: 0.75rem;
    padding: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

[data-theme="black"] .search-input-wrapper,
[data-theme="darkblack"] .search-input-wrapper {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.search-input-wrapper:hover {
    border-color: rgba(79, 70, 229, 0.4);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}

.search-input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15), 0 4px 16px rgba(79, 70, 229, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transform: translateY(-1px);
    outline: none;
}

[data-theme="black"] .search-input-wrapper:focus-within,
[data-theme="darkblack"] .search-input-wrapper:focus-within {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25), 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.search-input {
    flex: 1;
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 1rem;
    border-radius: 0.375rem;
    outline: none;
    min-width: 0;
}

.search-input::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.search-btn {
    flex-shrink: 0;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    min-width: fit-content;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.search-btn:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.search-btn:hover::before {
    left: 100%;
}

.search-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.search-btn-text {
    display: inline-block;
    white-space: nowrap;
}

@media screen and (max-width: 1024px) {
    .navbar .container {
        gap: 0.875rem;
    }
    
    .navbar-top {
        gap: 1rem;
    }
    
    .nav-center {
        width: 100%;
        max-width: 100%;
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-search {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    
    .user-info {
        width: 100%;
        justify-content: center;
        gap: 0.625rem;
        padding: 0.4rem 0.75rem;
        padding-left: 0.75rem;
    }
    
    .nav-menu {
        padding-top: 0.875rem;
        margin-top: 0.5rem;
        gap: 0.75rem;
        flex-wrap: wrap;
    }
    
    .nav-menu a {
        padding: 0.4rem 0.6rem;
        font-size: 0.875rem;
    }
    
    .user-info-text .user-name {
        max-width: 120px;
        font-size: 0.875rem;
    }
    
    .points {
        font-size: 0.75rem;
    }
    
    .btn-logout {
        padding: 0.4rem 0.875rem;
        font-size: 0.8125rem;
    }
}

@media screen and (max-width: 768px) {
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar .container {
        gap: 0.75rem;
    }
    
    .navbar-top {
        gap: 0.75rem;
    }
    
    .nav-brand a {
        font-size: 1.25rem;
    }
    
    .search-input-wrapper {
        gap: 0.375rem;
        padding: 0.2rem;
    }
    
    .search-input {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .search-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .nav-menu {
        gap: 0.5rem;
        padding-top: 0.75rem;
        margin-top: 0.5rem;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .nav-menu > li {
        flex-shrink: 0;
    }
    
    .nav-menu a {
        padding: 0.375rem 0.5rem;
        font-size: 0.8125rem;
    }
    
    .user-info {
        gap: 0.5rem;
        padding: 0.4rem 0.75rem;
        padding-left: 0.75rem;
        border-left: none;
        border-image: none;
        justify-content: flex-start;
    }
    
    .theme-selector {
        padding-right: 0.5rem;
        border-right: 1px solid var(--border-color);
    }
    
    .user-info-text .user-name {
        max-width: 100px;
        font-size: 0.8125rem;
    }
    
    .points {
        font-size: 0.7rem;
    }
    
    .user-menu-trigger {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }
    
    .btn-logout {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
}

@media screen and (max-width: 480px) {
    .nav-brand a {
        font-size: 1.125rem;
    }
    
    .nav-menu {
        gap: 0.375rem;
    }
    
    .nav-menu a {
        padding: 0.3rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .user-info-text .user-name {
        max-width: 80px;
    }
}

.nav-brand {
    flex-shrink: 0;
    min-width: fit-content;
    display: flex;
    align-items: center;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    padding: 0.5rem 0;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    letter-spacing: -0.02em;
    position: relative;
}

.nav-brand a::after {
    content: '';
    position: absolute;
    bottom: 0.25rem;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.nav-brand a:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.nav-brand a:hover::after {
    width: 100%;
}

[data-theme="black"] .nav-brand a,
[data-theme="darkblack"] .nav-brand a {
    background: linear-gradient(135deg, #818cf8 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.nav-menu > li {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.625rem 1rem;
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    position: relative;
    background: transparent;
    border: 1px solid transparent;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    bottom: 0.25rem;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    border-radius: 2px;
    opacity: 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 0.625rem;
    padding: 1px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12) 0%, rgba(79, 70, 229, 0.08) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2), 0 2px 4px rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.2);
}

.nav-menu a:hover::before {
    width: 70%;
    opacity: 1;
}

.nav-menu a:hover::after {
    opacity: 0.3;
}

[data-theme="black"] .nav-menu a:hover,
[data-theme="darkblack"] .nav-menu a:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(99, 102, 241, 0.15) 100%);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3), 0 2px 4px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
}

.nav-menu a:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.15);
}

/* 활성 메뉴 스타일 */
.nav-menu a.active,
.nav-menu a[aria-current="page"] {
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.15) 0%, rgba(79, 70, 229, 0.1) 100%);
    border-color: rgba(79, 70, 229, 0.3);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-menu a.active::before,
.nav-menu a[aria-current="page"]::before {
    width: 80%;
    opacity: 1;
}

[data-theme="black"] .nav-menu a.active,
[data-theme="darkblack"] .nav-menu a.active,
[data-theme="black"] .nav-menu a[aria-current="page"],
[data-theme="darkblack"] .nav-menu a[aria-current="page"] {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(99, 102, 241, 0.15) 100%);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* 네비게이션 드롭다운 메뉴 */
.nav-menu-item.has-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
}

.nav-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
}

.nav-menu-item.has-dropdown:hover .nav-arrow {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 220px;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 255, 255, 0.98) 100%);
    border-radius: 0.75rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
    list-style: none;
    padding: 0.75rem 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
}

.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover), var(--primary-color));
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

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

[data-theme="black"] .nav-dropdown-menu,
[data-theme="darkblack"] .nav-dropdown-menu {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 8px 16px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.nav-menu-item.has-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.nav-dropdown-menu li {
    margin: 0;
    padding: 0;
    position: relative;
}

.nav-dropdown-menu li:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.25rem;
    right: 1.25rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

[data-theme="black"] .nav-dropdown-menu li:not(:last-child)::after,
[data-theme="darkblack"] .nav-dropdown-menu li:not(:last-child)::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    background: transparent;
}

.nav-dropdown-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.1), rgba(79, 70, 229, 0.05));
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.nav-dropdown-menu a::after {
    display: none;
}

.nav-dropdown-menu a > * {
    position: relative;
    z-index: 1;
}

.nav-dropdown-menu a:hover {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.15) 0%, rgba(79, 70, 229, 0.08) 100%);
    color: var(--primary-color);
    transform: translateX(6px);
    box-shadow: inset 4px 0 0 var(--primary-color);
    padding-left: 1.75rem;
}

.nav-dropdown-menu a:hover::before {
    width: 100%;
}

[data-theme="black"] .nav-dropdown-menu a:hover,
[data-theme="darkblack"] .nav-dropdown-menu a:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.12) 100%);
    box-shadow: inset 4px 0 0 var(--primary-color);
}

.nav-dropdown-menu a:first-child {
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
    margin-top: 0.25rem;
}

.nav-dropdown-menu a:last-child {
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
    margin-bottom: 0.25rem;
}

/* ========================================
   향상된 네비게이션 메뉴 스타일
   모든 기능 포함: 배지, 애니메이션, 모바일, 검색
   ======================================== */

/* 메뉴 배지 스타일 */
.nav-menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.375rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 9999px;
    margin-left: 0.375rem;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    animation: pulse-badge 2s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4); }
    50% { transform: scale(1.15); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.6); }
}

.nav-menu-badge.new {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
    animation: pulse-badge-green 2s ease-in-out infinite;
}

@keyframes pulse-badge-green {
    0%, 100% { transform: scale(1); box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4); }
    50% { transform: scale(1.15); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.6); }
}

/* 메뉴 아이콘 스타일 */
.nav-menu-icon {
    font-size: 1.125rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.nav-menu a:hover .nav-menu-icon {
    transform: scale(1.1);
}

/* 모바일 햄버거 메뉴 */
.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1.5px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
    margin-left: auto;
}

.mobile-menu-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.mobile-menu-toggle.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 모바일 메뉴 */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.mobile-menu.active {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 255, 255, 0.98) 100%);
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

[data-theme="black"] .mobile-menu-content,
[data-theme="darkblack"] .mobile-menu-content {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.95) 100%);
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.6);
}

.mobile-menu.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-menu-close {
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 0.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg) scale(1.1);
}

.mobile-menu-body {
    flex: 1;
    padding: 1.5rem 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.mobile-menu-search {
    padding: 0 1.5rem 1rem;
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.mobile-menu-search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 1.5px solid var(--border-color);
    border-radius: 0.625rem;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.9375rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.mobile-menu-search-icon {
    position: absolute;
    left: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.125rem;
    pointer-events: none;
}

/* 메뉴 필터링 (검색 결과 숨김) */
.nav-menu li.menu-hidden,
.mobile-menu-body li.menu-hidden {
    display: none !important;
}

/* 키보드 네비게이션 */
.nav-menu a:focus,
.nav-dropdown-menu a:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 0.625rem;
}

.nav-menu a[tabindex="-1"] {
    opacity: 0.4;
    pointer-events: none;
}


/* 로딩 애니메이션 */
.nav-menu-loading {
    display: inline-block;
    width: 0.875rem;
    height: 0.875rem;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* 메뉴 그룹 헤더 */
.nav-menu-group-header {
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 0.1em;
    margin-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.nav-dropdown-menu .nav-menu-group-header {
    padding: 0.5rem 1.5rem;
    margin-top: 0.25rem;
    border-top: 1px solid var(--border-color);
}

.nav-dropdown-menu .nav-menu-group-header:first-child {
    border-top: none;
    margin-top: 0;
}

/* 모바일 반응형 */
@media screen and (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        display: none !important;
    }
    
    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        margin: 0;
        padding: 0;
        background: var(--bg-color);
        border-left: 3px solid var(--primary-color);
        margin-left: 1.5rem;
        margin-top: 0.5rem;
        min-width: auto;
    }
    
    .nav-dropdown-menu::before {
        display: none;
    }
    
    .nav-menu-item.has-dropdown {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav-dropdown-toggle {
        width: 100%;
    }
    
    .nav-dropdown-menu a {
        padding-left: 2rem;
    }
}

/* 접근성 개선 */
@media (prefers-reduced-motion: reduce) {
    .nav-menu a,
    .nav-dropdown-menu,
    .nav-menu-badge {
        animation: none !important;
        transition: none !important;
    }
}

/* 고대비 모드 */
@media (prefers-contrast: high) {
    .nav-menu a {
        border: 2px solid currentColor;
    }
    
    .nav-dropdown-menu {
        border: 2px solid var(--text-color);
    }
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.5rem 1rem;
    padding-left: 1rem;
    border-left: 2px solid transparent;
    border-image: linear-gradient(180deg, var(--primary-color), var(--primary-hover)) 1;
    flex-shrink: 0;
    min-width: fit-content;
    background: rgba(79, 70, 229, 0.05);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

[data-theme="black"] .user-info,
[data-theme="darkblack"] .user-info {
    background: rgba(99, 102, 241, 0.1);
    border-image: linear-gradient(180deg, #818cf8, #a5b4fc) 1;
}

.user-info:hover {
    background: rgba(79, 70, 229, 0.1);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

[data-theme="black"] .user-info:hover,
[data-theme="darkblack"] .user-info:hover {
    background: rgba(99, 102, 241, 0.15);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.theme-selector {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding-right: 0.75rem;
    border-right: 1px solid var(--border-color);
}

.theme-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.375rem 0.625rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.6;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.theme-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.theme-btn:hover {
    opacity: 0.9;
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.theme-btn:hover::before {
    width: 100px;
    height: 100px;
}

.theme-btn.active {
    opacity: 1;
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.user-info-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
    gap: 0.125rem;
    min-width: 0;
}

.user-info-text .user-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    background: linear-gradient(135deg, var(--text-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-level {
    color: #f59e0b;
    font-weight: 700;
    font-size: 0.8125rem;
    margin: 0 0.25rem;
    padding: 0.125rem 0.375rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%);
    border-radius: 0.25rem;
    border: 1px solid rgba(245, 158, 11, 0.3);
    white-space: nowrap;
    display: inline-block;
}

.points {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.8125rem;
    white-space: nowrap;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: brightness(1.1);
}

.user-menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1.5px solid var(--border-color);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.user-menu-trigger::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.user-menu-trigger:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: var(--text-on-dark);
    border-color: var(--primary-color);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.user-menu-trigger:hover::before {
    width: 100px;
    height: 100px;
}

.btn-logout {
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, var(--error-color) 0%, #dc2626 100%);
    color: var(--text-on-dark) !important;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-logout::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-logout:hover {
    background: linear-gradient(135deg, #dc2626 0%, var(--error-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-logout:hover::before {
    left: 100%;
}

.btn-logout:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.allow-context-menu {
    touch-action: manipulation;
}

/* User Menu Modal */
.user-menu-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: modalFadeIn 0.2s ease;
}

.user-menu-modal.active {
    display: flex;
}

.user-menu-modal[style*="display: block"] {
    display: flex !important;
}

.user-menu-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    animation: overlayFadeIn 0.2s ease;
}

.user-menu-modal-content {
    position: relative;
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    width: min(520px, 90vw);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.user-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: none;
    background: transparent;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.2s;
}

.user-menu-close:hover {
    color: var(--text-color);
}

.user-menu-header {
    padding-top: 0.5rem;
}

.user-menu-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    background: var(--bg-color);
    border-radius: 9999px;
    padding: 0.25rem;
    gap: 0.25rem;
}

.user-menu-tab {
    border: none;
    background: transparent;
    border-radius: 9999px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
}

.user-menu-tab.active {
    background: #fff;
    color: var(--primary-color);
    box-shadow: var(--shadow);
}

.user-menu-body {
    flex: 1;
    overflow: auto;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    background: var(--bg-color);
}

.user-modal-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.user-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.user-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.user-modal-header .current-points {
    font-size: 0.95rem;
    color: var(--text-light);
}

.user-modal-header .current-points strong {
    color: var(--primary-color);
}

.user-modal-search {
    min-width: 180px;
}

.user-modal-body {
    flex: 1;
    overflow: auto;
}

.user-modal-table {
    width: 100%;
    border-collapse: collapse;
}

.user-modal-table thead {
    background: rgba(148, 163, 184, 0.12);
}

.user-modal-table th,
.user-modal-table td {
    padding: 0.75rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.user-modal-table tbody tr:last-child td {
    border-bottom: none;
}

.user-modal-table .empty {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-earn {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success-color);
}

.badge-spend {
    background: rgba(239, 68, 68, 0.12);
    color: var(--error-color);
}

.amount.plus {
    color: var(--success-color);
    font-weight: 600;
}

.amount.minus {
    color: var(--error-color);
    font-weight: 600;
}

.user-menu-loading,
.user-menu-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--text-light);
    height: 100%;
    text-align: center;
}

.user-menu-error {
    color: var(--error-color);
    font-weight: 500;
}

.spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(79, 70, 229, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.user-modal-form .form-group {
    margin-bottom: 1rem;
}

.user-modal-alert {
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.user-modal-alert.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.user-modal-alert.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.user-modal-alert.info {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(79, 70, 229, 0.2);
}

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

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

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

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

/* Attendance */
.attendance-card {
    max-width: 760px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    padding: 1.75rem;
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    position: relative !important;
}

.attendance-card > .attendance-calendar {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    flex-shrink: 1 !important;
}

.attendance-card > .attendance-card-header,
.attendance-card > .attendance-info {
    flex-shrink: 0 !important;
}

.attendance-card > .attendance-actions {
    order: 999 !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0 !important;
    flex-shrink: 0 !important;
}

.attendance-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.attendance-subtitle {
    color: var(--text-light);
    margin-top: 0.375rem;
    font-size: 0.95rem;
}

.attendance-month-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.attendance-month-nav button {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    cursor: pointer;
    transition: all 0.2s;
}

.attendance-month-nav button:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.attendance-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-color);
    border-radius: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.attendance-info span {
    font-weight: 600;
    color: var(--primary-color);
}

.attendance-calendar {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    min-height: 480px !important;
    width: 100% !important;
    max-width: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 1 1 auto !important;
}

.attendance-calendar-row {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 0.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    position: relative !important;
    min-width: 0 !important;
    align-items: stretch !important;
    justify-items: stretch !important;
}

.attendance-calendar-row.header {
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    font-size: 0.8rem;
}

.attendance-calendar-row.header .attendance-calendar-cell {
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    padding: 0.5rem !important;
    font-size: 0.875rem !important;
}

.attendance-calendar-cell {
    border-radius: 0.75rem !important;
    background: var(--card-bg) !important;
    height: 70px !important;
    max-height: 70px !important;
    position: relative !important;
    padding: 0.5rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.25rem !important;
    transition: all 0.2s !important;
    border: 1px solid var(--border-color) !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    min-width: 0 !important;
    align-self: stretch !important;
    justify-self: stretch !important;
}

.attendance-calendar-cell.day {
    cursor: default;
}

.attendance-calendar-cell.day:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.attendance-calendar-cell.empty {
    background: transparent !important;
    border: 1px solid transparent !important;
    height: 70px !important;
    max-height: 70px !important;
    visibility: visible !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    min-width: 0 !important;
    align-self: stretch !important;
    justify-self: stretch !important;
    position: relative !important;
}

.attendance-calendar-cell.today {
    border: 2px solid var(--primary-color);
}

.attendance-calendar-cell.future {
    opacity: 0.6;
}

.attendance-calendar-cell.attended {
    background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.3);
}

.attendance-calendar-cell.attended .day-number {
    color: var(--primary-color);
}

.attendance-calendar-cell .day-number {
    font-weight: 600 !important;
    font-size: 1rem !important;
    color: var(--text-color) !important;
    display: block !important;
    visibility: visible !important;
}

.attendance-badge {
    align-self: flex-start;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    background: rgba(79, 70, 229, 0.18);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
}

.attendance-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    order: 999;
    margin-top: auto;
}

#checkInBtn[disabled] {
    background: var(--secondary-color);
    cursor: not-allowed;
    opacity: 0.7;
}

.attendance-message {
    min-height: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.attendance-message.success {
    color: var(--success-color);
}

.attendance-message.error {
    color: var(--error-color);
}

.attendance-message.info {
    color: var(--primary-color);
}

/* 모바일 최적화 - 추가 개선 */
@media screen and (max-width: 768px) {
    /* 터치 친화적인 버튼 크기 */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }
    
    .btn-sm {
        min-height: 36px;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    /* 테이블 모바일 최적화 */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
        white-space: nowrap;
    }
    
    /* 카드 패딩 조정 */
    .card {
        margin: 0.5rem;
        border-radius: 0.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* 폼 요소 터치 최적화 */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    input[type="file"],
    textarea,
    select {
        min-height: 44px;
        font-size: 16px; /* iOS 줌 방지 */
    }
    
    /* 모달 모바일 최적화 */
    .user-menu-modal-content {
        width: 95vw;
        max-height: 95vh;
        padding: 1rem;
    }
    
    /* 사이드바 모바일 최적화 */
    .sidebar {
        width: 100vw;
        max-width: 320px;
    }
    
    /* 네비게이션 모바일 최적화 */
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        width: 100%;
        text-align: center;
        padding: 0.75rem;
    }
    
    /* 검색창 모바일 최적화 */
    .search-input-wrapper {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-input {
        width: 100%;
        font-size: 16px; /* iOS 줌 방지 */
    }
    
    .search-btn {
        width: 100%;
        min-height: 44px;
    }
    
    /* 게시글 목록 모바일 최적화 */
    .post-item {
        padding: 1rem;
    }
    
    .post-title {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .post-meta {
        font-size: 0.75rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    /* 댓글 모바일 최적화 */
    .comment-item {
        padding: 0.75rem;
    }
    
    .comment-content {
        font-size: 0.9375rem;
        line-height: 1.6;
    }
    
    /* 관리자 페이지 모바일 최적화 */
    .admin-card {
        padding: 1rem;
    }
    
    .admin-card h2 {
        font-size: 1.125rem;
    }
    
    /* 파일 관리 테이블 모바일 최적화 */
    .table-responsive table {
        min-width: 800px;
    }
}

@media screen and (max-width: 480px) {
    /* 매우 작은 화면 최적화 */
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    h3 {
        font-size: 1.125rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    /* 버튼 스택 레이아웃 */
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        margin: 0.25rem 0;
    }
    
    /* 폼 그리드 모바일 최적화 */
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    /* 통계 카드 모바일 최적화 */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* 페이지네이션 모바일 최적화 */
    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .pagination a,
    .pagination span {
        min-width: 36px;
        min-height: 36px;
        padding: 0.5rem;
    }
}

/* 터치 디바이스 최적화 */
@media (hover: none) and (pointer: coarse) {
    /* 터치 디바이스에서 호버 효과 제거 */
    .btn:hover {
        transform: none;
    }
    
    /* 터치 영역 확대 */
    a, button, input, select, textarea {
        min-height: 44px;
    }
    
    /* 터치 스크롤 최적화 */
    * {
        -webkit-overflow-scrolling: touch;
    }
}

/* 가로 모드 최적화 */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .navbar {
        padding: 0.5rem 0;
    }
    
    .main-content {
        padding: 1rem 0.5rem;
    }
    
    .card {
        margin: 0.5rem 0;
    }
}

/* 고해상도 디스플레이 최적화 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* 선명한 텍스트 렌더링 */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

@media (max-width: 768px) {
    .attendance-calendar {
        gap: 0.375rem !important;
    }
    
    .attendance-calendar-row {
        gap: 0.375rem !important;
    }
    
    .attendance-calendar-cell {
        min-height: 60px !important;
        padding: 0.5rem !important;
        font-size: 0.875rem !important;
    }
    
    .attendance-calendar-cell.empty {
        min-height: 60px !important;
        padding: 0 !important;
    }
    
    .attendance-calendar-cell .day-number {
        font-size: 0.875rem !important;
    }
    
    .attendance-card {
        padding: 1.25rem !important;
        max-width: 100% !important;
    }
    
    .games-wrapper {
        grid-template-columns: 1fr !important;
    }
    
    .games-content {
        padding: 1.25rem !important;
    }
    
    .game-panel {
        gap: 1rem !important;
    }
    
    .game-panel-body.cards-body,
    .game-panel-body.wheel-body,
    .game-panel-body.slots-body {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 600px) {
    .attendance-calendar-cell {
        min-height: 50px !important;
        padding: 0.375rem !important;
        font-size: 0.8rem !important;
    }
    
    .attendance-calendar-cell.empty {
        min-height: 50px !important;
        padding: 0 !important;
    }
    
    .attendance-calendar-cell .day-number {
        font-size: 0.8rem !important;
    }
    
    .attendance-badge {
        font-size: 0.65rem !important;
        padding: 0.2rem 0.4rem !important;
    }
}

/* Games layout */
.games-wrapper {
    display: grid !important;
    grid-template-columns: minmax(220px, 280px) 1fr !important;
    gap: 1.5rem !important;
    width: 100% !important;
    position: relative !important;
}

.games-sidebar {
    background: var(--card-bg);
    box-shadow: var(--shadow);
    border-radius: 1rem;
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 6rem;
    height: fit-content;
}

.games-sidebar-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.games-sidebar-header p {
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.games-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.games-nav-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.games-nav-item .icon {
    font-size: 1.2rem;
}

.games-nav-item .label {
    font-weight: 600;
}

.games-nav-item .desc {
    font-size: 0.8rem;
    color: var(--text-light);
}

.games-nav-item:hover:not(.disabled):not(:disabled),
.games-nav-item.active {
    border-color: rgba(79, 70, 229, 0.35);
    box-shadow: var(--shadow);
    background: rgba(79, 70, 229, 0.07);
}

.games-nav-item.disabled,
.games-nav-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.02);
    border-color: var(--border-color);
}

.games-nav-item.disabled:hover,
.games-nav-item:disabled:hover {
    border-color: var(--border-color);
    box-shadow: none;
    background: rgba(0, 0, 0, 0.02);
}

.games-content {
    background: var(--card-bg) !important;
    border-radius: 1rem !important;
    box-shadow: var(--shadow) !important;
    padding: 2rem !important;
    min-height: 520px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
    position: relative !important;
    box-sizing: border-box !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.games-content-inner {
    min-height: 480px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
    position: relative !important;
    box-sizing: border-box !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.games-placeholder {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    color: var(--text-light);
}

.games-placeholder h3 {
    color: var(--text-color);
}

.games-placeholder ul {
    list-style: disc;
    padding-left: 1.25rem;
}

.games-loading,
.games-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--text-light);
    min-height: 320px;
    text-align: center;
}

.games-error strong {
    font-size: 1.1rem;
    color: var(--error-color);
}

.game-panel {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.25rem !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
    overflow: visible !important;
    transform: none !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    background: var(--card-bg) !important;
}

.game-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.game-panel-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.game-panel-header p {
    margin: 0.4rem 0 0;
    color: var(--text-light);
}

.game-panel-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.game-panel-meta .meta-item span {
    color: var(--primary-color);
    font-weight: 600;
}

.game-panel-body.placeholder,
.game-panel-body.wheel-body {
    border: 1px dashed var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    background: var(--bg-muted);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    color: var(--text-color);
}

.game-panel-body.placeholder ul,
.game-panel-body.wheel-body ul {
    list-style: disc;
    padding-left: 1.5rem;
}

.wheel-body {
    display: grid;
    grid-template-columns: minmax(300px, 1.2fr) minmax(220px, 1fr);
    gap: 1.5rem;
    border: none;
    background: transparent;
}

.wheel-area {
    background: rgba(79, 70, 229, 0.08);
    border-radius: 1rem;
    border: 1px solid rgba(79, 70, 229, 0.2);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
}

.wheel-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    box-shadow: 
        0 0 0 8px rgba(255, 255, 255, 0.8),
        0 0 0 10px rgba(156, 39, 176, 0.3),
        var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wheel-slices {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    border-radius: 50%;
    overflow: hidden;
}

.wheel-slices svg {
    width: 100%;
    height: 100%;
}

.wheel-segment {
    transition: opacity 0.2s;
}

.wheel-segment:hover {
    opacity: 0.8;
}

.wheel-text {
    pointer-events: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wheel-pointer {
    position: absolute;
    top: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--accent-gold);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.wheel-center {
    position: relative;
    z-index: 5;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: var(--text-on-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 
        0 0 0 4px rgba(255, 255, 255, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    border: 3px solid rgba(139, 69, 19, 0.5);
}

.wheel-center::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #87CEEB;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.wheel-center::after {
    content: 'START';
    position: absolute;
    z-index: 2;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.wheel-center:hover {
    background: linear-gradient(135deg, #A0522D 0%, #8B4513 100%);
    transform: scale(1.08);
    box-shadow: 
        0 0 0 4px rgba(255, 255, 255, 0.4),
        0 6px 16px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.wheel-center:active {
    transform: scale(0.95);
}

.wheel-info {
    background: rgba(15, 23, 42, 0.04);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wheel-result {
    font-size: 1.1rem;
    color: var(--text-color);
}

.wheel-result.positive {
    color: var(--success-color);
}

.wheel-result.negative {
    color: var(--error-color);
}

.wheel-status {
    min-height: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.wheel-status.success {
    color: var(--success-color);
}

.wheel-status.error {
    color: var(--error-color);
}

.wheel-log {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.85rem;
    color: var(--text-light);
}

.wheel-log-entry.success {
    color: var(--success-color);
}

.wheel-log-entry.error {
    color: var(--error-color);
}

/* 카드 뒤집기 게임 스타일 */
.game-panel-body.cards-body {
    display: grid;
    grid-template-columns: minmax(300px, 1.2fr) minmax(220px, 1fr);
    gap: 1.5rem;
    border: none;
    background: transparent;
}

.cards-area {
    background: var(--bg-muted);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
    color: var(--text-color);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 400px;
}

.card-item {
    aspect-ratio: 2 / 3;
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.2s;
}

.card-item:hover:not(.flipped) {
    transform: translateY(-5px);
}

.card-item.flipped {
    cursor: default;
}

.card-item.selected {
    outline: 4px solid #FFD700;
    outline-offset: 4px;
    border-radius: 0.5rem;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        outline-width: 4px;
    }
    50% {
        outline-width: 6px;
    }
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.card-item.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.card-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: rotateY(0deg);
}

.card-back {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    transform: rotateY(180deg);
}

.card-back-pattern {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-on-light);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.card-reward {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    padding: 0.5rem;
}

.card-reward.positive {
    color: var(--success-color);
}

.card-reward.negative {
    color: var(--error-color);
}

.card-reward.neutral {
    color: var(--text-light);
}

.cards-info {
    background: rgba(15, 23, 42, 0.04);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cards-result {
    font-size: 1.1rem;
    color: var(--text-color);
}

.cards-result.positive {
    color: var(--success-color);
}

.cards-result.negative {
    color: var(--error-color);
}

.cards-result.neutral {
    color: var(--text-light);
}

.cards-status {
    min-height: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-light);
    text-align: center;
}

.cards-status.success {
    color: var(--success-color);
}

.cards-status.error {
    color: var(--error-color);
}

.cards-log {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.85rem;
    color: var(--text-light);
}

.cards-log-entry.success {
    color: var(--success-color);
}

.cards-log-entry.error {
    color: var(--error-color);
}

/* 사다리 게임 스타일 */
.game-panel-body.ladder-body {
    display: grid;
    grid-template-columns: minmax(320px, 1.4fr) minmax(260px, 1fr);
    gap: 1.5rem;
    border: none;
    background: transparent;
}

.ladder-main {
    background: var(--bg-muted);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    color: var(--text-color);
}

.ladder-round-card {
    background: var(--bg-card-light);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.ladder-round-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ladder-round-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ladder-timer {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 0.08em;
}

.ladder-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

.stat-item {
    background: var(--bg-card-light);
    border-radius: 0.75rem;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border: 1px solid var(--border-color);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
}

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

.ladder-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.ladder-btn {
    flex: 1;
    min-height: 3rem;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ladder-status {
    min-height: 1.5rem;
    font-size: 0.95rem;
    text-align: center;
    color: var(--text-light);
}

.ladder-status.success {
    color: var(--success-color);
}

.ladder-status.error {
    color: var(--error-color);
}

.ladder-status.warning {
    color: var(--warning-color);
}

.ladder-user-info {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-light);
}

.ladder-user-info .info-line {
    background: var(--bg-card-light);
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.ladder-log {
    background: var(--bg-card-light);
    border-radius: 0.75rem;
    padding: 0.75rem;
    max-height: 160px;
    overflow-y: auto;
    font-size: 0.85rem;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ladder-log-entry.success {
    color: var(--success-color);
}

.ladder-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ladder-info-card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ladder-info-card h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
}

.ladder-history {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-empty {
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
}

.history-item {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem 0.75rem;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--bg-card-light);
    border-radius: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-color);
}

.history-time {
    font-weight: 600;
    color: var(--text-color);
}

.history-result {
    text-align: right;
    font-weight: 700;
}

.history-result.odd {
    color: var(--accent-orange);
}

.history-result.even {
    color: var(--accent-blue);
}

.history-pool,
.history-winners {
    grid-column: span 2;
    color: var(--text-light);
}

.ladder-guide {
    margin: 0;
    padding-left: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* 검 강화 게임 스타일 */
.game-panel-body.forge-body {
    display: grid;
    grid-template-columns: minmax(360px, 1.4fr) minmax(260px, 1fr);
    gap: 1.75rem;
    border: none;
    background: transparent;
    align-items: stretch;
}

.forge-main {
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.85) 40%, rgba(30, 41, 59, 0.55) 100%);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 1.25rem;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.35);
}

.forge-main::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.25), transparent 55%),
                radial-gradient(circle at bottom left, rgba(96, 165, 250, 0.2), transparent 40%);
}

.forge-round-card {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.forge-round-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 10%, rgba(251, 191, 36, 0.22), transparent 60%);
    pointer-events: none;
}

.forge-round-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.forge-round-label {
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.forge-pool {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-shadow: 0 0 15px rgba(250, 204, 21, 0.65);
}

.forge-progress {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.75rem;
}

.forge-step {
    position: relative;
    height: 140px;
    border-radius: 1rem;
    overflow: hidden;
    background: radial-gradient(circle at center, rgba(17, 24, 39, 0.95) 30%, rgba(30, 41, 59, 0.85) 100%);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25), 0 12px 25px rgba(2, 6, 23, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.forge-step::before {
    content: '';
    position: absolute;
    inset: 10% 15%;
    background: radial-gradient(circle, rgba(248, 250, 252, 0.08), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.forge-step img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    filter: drop-shadow(0 12px 18px rgba(15, 23, 42, 0.8)) grayscale(45%) brightness(0.75);
    transition: filter 0.35s ease;
    pointer-events: none;
}

.forge-step.completed img {
    filter: drop-shadow(0 14px 22px rgba(250, 204, 21, 0.45));
}

.forge-step.completed::before {
    opacity: 0.45;
}

.forge-step.next img {
    filter: drop-shadow(0 18px 30px rgba(250, 204, 21, 0.6)) grayscale(0%) brightness(1.1);
}

.forge-step.next::before {
    opacity: 0.7;
}

.forge-step-label {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-muted);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: var(--text-color);
    text-transform: uppercase;
}

.forge-step.completed .forge-step-label {
    background: rgba(250, 204, 21, 0.22);
    border-color: rgba(250, 204, 21, 0.55);
    color: var(--text-on-light);
}

.forge-step.next .forge-step-label {
    background: rgba(250, 204, 21, 0.35);
    border-color: rgba(250, 204, 21, 0.7);
    color: var(--text-on-light);
}

.forge-probability {
    margin-top: 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-color);
}

.forge-probability .prob-label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.forge-probability .prob-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-shadow: 0 0 12px rgba(250, 204, 21, 0.35);
}

.forge-actions {
    display: flex;
    justify-content: center;
}

.forge-btn {
    min-width: 240px;
    min-height: 3.1rem;
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    box-shadow: 0 18px 35px rgba(14, 165, 233, 0.35);
}

.forge-status {
    min-height: 1.5rem;
    font-size: 0.95rem;
    text-align: center;
    color: rgba(226, 232, 240, 0.85);
}

.forge-status.success {
    color: #4ade80;
}

.forge-status.error {
    color: #f87171;
}

.forge-status.warning {
    color: #facc15;
}

.forge-user-info {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: rgba(203, 213, 225, 0.9);
}

.forge-user-info .info-line {
    background: rgba(15, 23, 42, 0.65);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.forge-log {
    background: rgba(15, 23, 42, 0.65);
    border-radius: 0.85rem;
    padding: 0.85rem 1rem;
    max-height: 180px;
    overflow-y: auto;
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.85);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.forge-log-entry.success {
    color: #86efac;
}

.forge-log-entry.fail {
    color: #fda4af;
}

.forge-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.forge-info-card {
    background: rgba(15, 23, 42, 0.78);
    border-radius: 1.1rem;
    padding: 1.25rem;
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.forge-info-card h4 {
    margin: 0;
    font-size: 1rem;
    color: #f8fafc;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.forge-leaders,
.forge-attempts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.leader-item {
    background: rgba(31, 41, 55, 0.7);
    border-radius: 0.85rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.leader-name {
    font-weight: 600;
    color: #e2e8f0;
}

.leader-stats {
    color: rgba(148, 163, 184, 0.85);
}

.leaders-empty,
.attempts-empty {
    font-size: 0.85rem;
    color: rgba(148, 163, 184, 0.75);
    text-align: center;
}

.attempt-item {
    background: rgba(17, 24, 39, 0.75);
    border-radius: 0.85rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.4rem 0.6rem;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.attempt-item.success {
    border-left: 4px solid rgba(134, 239, 172, 0.9);
}

.attempt-item.fail {
    border-left: 4px solid rgba(248, 113, 113, 0.85);
}

.attempt-user {
    font-weight: 600;
    color: #f8fafc;
}

.attempt-desc {
    color: rgba(226, 232, 240, 0.8);
}

.attempt-time {
    color: rgba(148, 163, 184, 0.7);
    font-size: 0.75rem;
}

.forge-guide {
    margin: 0;
    padding-left: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: rgba(203, 213, 225, 0.85);
}

@media (max-width: 900px) {
    .game-panel-body.forge-body {
        grid-template-columns: 1fr;
    }

    .forge-main {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .game-panel-body.forge-body {
        grid-template-columns: 1fr;
    }

    .forge-progress {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

/* 슬롯머신 게임 스타일 */
.game-panel-body.slots-body {
    display: grid;
    grid-template-columns: minmax(300px, 1.2fr) minmax(220px, 1fr);
    gap: 1.5rem;
    border: none;
    background: transparent;
}

.slots-area {
    background: rgba(79, 70, 229, 0.08);
    border-radius: 1rem;
    border: 1px solid rgba(79, 70, 229, 0.2);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
}

.slots-machine {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 
        0 0 0 4px rgba(255, 255, 255, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.slots-reels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.5rem;
    padding: 0.5rem;
}

.slots-reel {
    position: relative;
    height: 300px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0.5rem;
    border: 2px solid rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.reel-strip {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0s;
}

.reel-symbol {
    flex: 0 0 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    height: 100px;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.slots-payline {
    position: absolute;
    left: 1.5rem;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    height: 110px;
    border-radius: 0.75rem;
    background: linear-gradient(180deg,
        rgba(253, 224, 71, 0.1) 0%,
        rgba(253, 224, 71, 0.18) 35%,
        rgba(253, 224, 71, 0.18) 65%,
        rgba(253, 224, 71, 0.1) 100%);
    box-shadow:
        inset 0 0 0 1px rgba(253, 224, 71, 0.35),
        inset 0 12px 24px rgba(253, 224, 71, 0.08),
        inset 0 -12px 24px rgba(253, 224, 71, 0.08);
    pointer-events: none;
    z-index: 1;
}

.slots-spin-btn {
    font-size: 1.1rem;
    padding: 0.75rem 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.slots-info {
    background: rgba(15, 23, 42, 0.04);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.slots-result {
    font-size: 1.1rem;
    color: var(--text-color);
    text-align: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0.5rem;
}

.slots-result.positive {
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.slots-result.neutral {
    color: var(--text-light);
}

.slots-paytable {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0.5rem;
    padding: 1rem;
}

.slots-paytable h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    color: var(--text-color);
}

.paytable-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
}

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

.paytable-item .symbol {
    font-size: 1.2rem;
}

.slots-status {
    min-height: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-light);
    text-align: center;
}

.slots-status.success {
    color: var(--success-color);
}

.slots-status.error {
    color: var(--error-color);
}

.slots-log {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.85rem;
    color: var(--text-light);
}

.slots-log-entry.success {
    color: var(--success-color);
}

.slots-log-entry.error {
    color: var(--error-color);
}

@media (max-width: 768px) {
    .cards-body {
        grid-template-columns: 1fr;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }

    .wheel-body {
        grid-template-columns: 1fr;
    }

    .wheel-wrapper {
        width: 240px;
        height: 240px;
    }

    .slots-body {
        grid-template-columns: 1fr;
    }

    .slots-machine {
        max-width: 100%;
    }

    .slots-reel {
        height: 150px;
    }

    .reel-symbol {
        flex: 0 0 75px;
        height: 75px;
        font-size: 2rem;
    }

    .ladder-body {
        grid-template-columns: 1fr;
    }

    .ladder-main {
        padding: 1rem;
    }

    .ladder-actions {
        flex-direction: column;
    }

    .ladder-info-card {
        width: 100%;
    }
}

@media (max-width: 992px) {
    .games-wrapper {
        grid-template-columns: 1fr;
    }

    .games-sidebar {
        position: static;
    }
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 1.25rem 0;
    min-height: calc(100vh - 200px);
    width: 100%;
    position: relative;
    z-index: 1;
}

/* 1080P 최적화는 responsive.css에서 처리 (80% 축소) */

/* 1440p (2560x1440) 해상도 최적화 */
@media screen and (min-width: 2560px) {
    .main-content {
        padding: 2rem 0;
    }
    
    .content-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2rem;
    }
}

/* 1080P (1920px) 이상 해상도 최적화 */
@media screen and (min-width: 1920px) {
    .main-content {
        padding: 1.5rem 0;
    }
    
    /* 1080P에서는 더 넓은 그리드 레이아웃 사용 가능 */
    .content-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    /* 카드 간격 조정 */
    .card {
        margin-bottom: 1.5rem;
    }
}

/* 1440p (2560x1440) 해상도 최적화 */
@media screen and (min-width: 2560px) {
    .main-content {
        padding: 2rem 0;
    }
    
    .content-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2rem;
    }
}

/* 1080P (1366px - 1919px) 해상도 최적화 */
@media screen and (min-width: 1366px) and (max-width: 1919px) {
    .main-content {
        padding: 1.25rem 0;
    }
}

@media screen and (max-height: 900px) {
    .main-content {
        padding: 1rem 0;
    }
    
    .home-hero {
        padding: 1.5rem;
        gap: 1.5rem;
        margin-bottom: 1.25rem;
    }
    
    .home-hero-content h1 {
        font-size: 1.875rem;
        margin: 0.375rem 0 0.625rem;
    }
    
    .home-hero-content p {
        font-size: 0.875rem;
    }
    
    .home-hero-actions {
        margin-top: 1.25rem;
    }
    
    .home-stats {
        margin-bottom: 1.25rem;
    }
    
    .section-header {
        margin: 1.25rem 0 0.875rem;
    }
    
    .top-boards {
        margin-bottom: 1.25rem;
    }
    
    .board-highlights {
        margin-bottom: 1.25rem;
    }
}

@media screen and (max-width: 768px) {
    .main-content {
        padding: 1.5rem 0;
    }
}

@media screen and (max-width: 480px) {
    .main-content {
        padding: 1rem 0;
    }
}

/* Cards */
.card {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* 1080P 이상 해상도에서 카드 패딩 조정 */
@media screen and (min-width: 1920px) {
    .card {
        padding: 2.5rem;
        margin-bottom: 2.5rem;
    }
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card:hover::before {
    opacity: 1;
}

[data-theme="black"] .card,
[data-theme="darkblack"] .card {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(30, 41, 59, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="black"] .card:hover,
[data-theme="darkblack"] .card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
}

.card-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    border-radius: 2px;
}

.card-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin: 0;
    text-rendering: optimizeLegibility;
}

@media screen and (max-width: 768px) {
    .card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        border-radius: 0.75rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
}

@media screen and (max-width: 480px) {
    .card {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }
    
    .card-title {
        font-size: 1.125rem;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: var(--text-on-dark);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #475569 100%);
    color: var(--text-on-dark);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #475569 0%, var(--secondary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(100, 116, 139, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: var(--text-on-dark);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, var(--success-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--error-color) 0%, #dc2626 100%);
    color: var(--text-on-dark);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, var(--error-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
    box-shadow: none;
}

.btn-outline:hover {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(79, 70, 229, 0.05) 100%);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    border-radius: 0.5rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    border-radius: 0.75rem;
    font-weight: 700;
}

@media screen and (max-width: 768px) {
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }
}

/* Forms */
.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    display: block;
    margin-bottom: 0.625rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1.125rem;
    border: 2px solid var(--border-color);
    border-radius: 0.625rem;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-control:hover {
    border-color: rgba(79, 70, 229, 0.4);
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.1);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1), 0 2px 8px rgba(79, 70, 229, 0.15);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

[data-theme="black"] .form-control,
[data-theme="darkblack"] .form-control {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="black"] .form-control:focus,
[data-theme="darkblack"] .form-control:focus {
    background: rgba(30, 41, 59, 0.8);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2), 0 2px 8px rgba(0, 0, 0, 0.3);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
}

@media screen and (max-width: 768px) {
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .form-control {
        padding: 0.75rem 1rem;
        font-size: 0.9375rem;
    }
}

@media screen and (max-width: 480px) {
    .form-control {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check input[type="checkbox"] {
    width: auto;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="black"] .table,
[data-theme="darkblack"] .table {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(30, 41, 59, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
}

.table thead {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(79, 70, 229, 0.05) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.table th {
    padding: 1.25rem 1rem;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-color);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(79, 70, 229, 0.05) 100%);
}

.table td {
    padding: 1.125rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(79, 70, 229, 0.02) 100%);
    transform: scale(1.01);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

@media screen and (max-width: 768px) {
    .table {
        font-size: 0.875rem;
        border-radius: 0.75rem;
    }
    
    .table th,
    .table td {
        padding: 0.875rem 0.75rem;
    }
    
    .table th {
        font-size: 0.75rem;
    }
}

@media screen and (max-width: 480px) {
    .table {
        font-size: 0.8125rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }
}

/* Alerts */
.alert {
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    font-weight: 500;
    line-height: 1.6;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
    opacity: 0.3;
}

.alert-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    color: var(--error-color);
    border-left-color: var(--error-color);
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: var(--success-color);
    border-left-color: var(--success-color);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    color: var(--warning-color);
    border-left-color: var(--warning-color);
}

.alert-info {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(79, 70, 229, 0.05) 100%);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

@media screen and (max-width: 768px) {
    .alert {
        padding: 1rem 1.25rem;
        font-size: 0.9375rem;
    }
}

@media screen and (max-width: 480px) {
    .alert {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }
}

/* Board List */
.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.board-card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-color);
    display: block;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.board-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.board-card::after {
    display: none;
}

.board-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.02) 0%, var(--card-bg) 100%);
}

.board-card:hover::before {
    opacity: 1;
}

.board-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    transition: color 0.2s ease;
    position: relative;
    z-index: 1;
    letter-spacing: -0.01em;
}

.board-card:hover .board-card-title {
    color: var(--primary-color);
    transform: none;
}

.board-card-description {
    color: var(--text-light);
    font-size: 0.875rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Post List - Notion/Medium 스타일 */
.post-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 0;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

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

.post-item-link:hover {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.03) 0%, transparent 100%);
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0.75rem;
}

.post-item {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    transition: none;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: visible;
}

.post-item::before {
    display: none;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.625rem;
    color: var(--text-color);
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    line-height: 1.5;
    transition: color 0.2s ease;
    letter-spacing: -0.02em;
}

.post-item-link:hover .post-title {
    color: var(--primary-color);
}

.post-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: var(--bg-color);
    color: var(--text-light);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0;
    box-shadow: none;
    flex-shrink: 0;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    margin-top: 0.125rem;
}

.post-item-link:hover .post-number {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: none;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.2);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.875rem;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding-top: 0;
    border-top: none;
}

.post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.post-meta span::before {
    display: none;
}

.post-meta .meta-separator {
    color: var(--border-color);
    margin: 0 0.25rem;
}

.post-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 0;
    border-top: none;
}

/* 다크 모드 지원 */
[data-theme="black"] .post-item-link:hover,
[data-theme="darkblack"] .post-item-link:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 0%, transparent 100%);
}

[data-theme="black"] .board-card,
[data-theme="darkblack"] .board-card {
    background: var(--card-bg);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-theme="black"] .board-card:hover,
[data-theme="darkblack"] .board-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
    border-color: rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, var(--card-bg) 100%);
}

/* Homepage */
.home-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.15) 0%, rgba(14, 165, 233, 0.12) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(79, 70, 229, 0.2);
    border-radius: 1.25rem;
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.home-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

[data-theme="black"] .home-hero,
[data-theme="darkblack"] .home-hero {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.15) 100%);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.home-hero-content h1 {
    font-size: 2rem;
    line-height: 1.25;
    font-weight: 700;
    margin: 0.5rem 0 0.75rem;
    color: var(--text-color);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-color) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-rendering: optimizeLegibility;
}

.home-hero-content p {
    color: var(--text-light);
    font-size: 0.9375rem;
    line-height: 1.6;
    font-weight: 400;
}

.home-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.15) 0%, rgba(79, 70, 229, 0.1) 100%);
    color: var(--primary-color);
    font-weight: 700;
    border-radius: 999px;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid rgba(79, 70, 229, 0.2);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

.home-hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.home-hero-meta {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.hero-meta-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0.875rem;
    padding: 1.25rem;
    border: 1px solid rgba(79, 70, 229, 0.15);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.hero-meta-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border-color: rgba(79, 70, 229, 0.3);
}

[data-theme="black"] .hero-meta-card,
[data-theme="darkblack"] .hero-meta-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hero-meta-label {
    font-size: 0.8125rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
}

.hero-meta-value {
    font-size: 1.375rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
    text-rendering: optimizeLegibility;
}

@media screen and (max-width: 768px) {
    .home-hero {
        padding: 2rem;
        gap: 2rem;
        border-radius: 1.25rem;
    }
    
    .home-hero-content h1 {
        font-size: 2rem;
    }
    
    .home-hero-content p {
        font-size: 1rem;
    }
    
    .home-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media screen and (max-width: 480px) {
    .home-hero {
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .home-hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-meta-card {
        padding: 1.25rem;
    }
}

.home-stats {
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0.875rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--primary-hover));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: rgba(79, 70, 229, 0.3);
}

.stat-card:hover::before {
    opacity: 1;
}

[data-theme="black"] .stat-card,
[data-theme="darkblack"] .stat-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(30, 41, 59, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    font-size: 1.75rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-info .stat-label {
    font-size: 0.8125rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.stat-info .stat-value {
    font-size: 1.375rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
    text-rendering: optimizeLegibility;
}

@media screen and (max-width: 768px) {
    .stat-card {
        padding: 1.25rem;
        gap: 1rem;
    }
    
    .stat-icon {
        font-size: 1.75rem;
    }
    
    .stat-info .stat-value {
        font-size: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        font-size: 1.5rem;
    }
    
    .stat-info .stat-value {
        font-size: 1.375rem;
    }
}

.section-header {
    margin: 1.5rem 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    line-height: 1.3;
    text-rendering: optimizeLegibility;
}

.section-header p {
    color: var(--text-light);
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

.top-boards {
    margin-bottom: 1.5rem;
}

.top-boards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.top-board-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0.875rem;
    padding: 1.5rem;
    border: 2px solid transparent;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.top-board-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.top-board-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 28px rgba(79, 70, 229, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: rgba(79, 70, 229, 0.4);
}

.top-board-card:hover::before {
    transform: scaleX(1);
}

[data-theme="black"] .top-board-card,
[data-theme="darkblack"] .top-board-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(30, 41, 59, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.3);
}

.top-board-rank {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.top-board-desc {
    color: var(--text-light);
    flex: 1;
    line-height: 1.5;
}

.top-board-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.top-board-meta span strong {
    color: var(--text-color);
}

.board-highlights {
    margin-bottom: 1.5rem;
}

.board-section-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.board-section {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0.875rem;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 0;
    transition: all 0.3s ease;
}

.board-section:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

[data-theme="black"] .board-section,
[data-theme="darkblack"] .board-section {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(30, 41, 59, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.3);
}

.board-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.board-section-header h3 {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.3;
    text-rendering: optimizeLegibility;
}

.board-section-header p {
    margin: 0.25rem 0 0;
    color: var(--text-light);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.board-empty {
    color: var(--text-light);
    font-size: 0.95rem;
    padding: 0.5rem 0;
}

.board-post-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.board-post-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

/* 게시글 카드 그리드 */
.board-post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* 게시글 카드 */
.board-post-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.board-post-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.board-post-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.board-post-card-body {
    flex: 1;
    margin-bottom: 0.75rem;
}

.board-post-card-footer {
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.rank-badge {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.12);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.board-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.board-post-snippet {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.board-post-title {
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.board-post-title:hover {
    color: var(--primary-color);
}

.board-post-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    color: var(--text-light);
    align-items: center;
}

.board-post-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

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

@media (min-width: 769px) and (max-width: 1024px) {
    .board-post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span,
.pagination button {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    text-decoration: none;
    color: var(--text-color);
    background: var(--card-bg);
    cursor: pointer;
}

.pagination a:hover,
.pagination button:not(:disabled):hover {
    background-color: var(--bg-color);
}

.pagination .active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .disabled,
.pagination button:disabled {
    color: var(--text-light);
    opacity: 0.6;
    cursor: default;
    background: rgba(148, 163, 184, 0.1);
}

.pagination .page-summary {
    padding: 0.5rem 0;
    border: none;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Footer */
.footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    color: var(--text-light);
    width: 100%;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .home-hero {
        grid-template-columns: 1fr;
    }

    .home-hero-meta {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

@media (max-width: 640px) {
    .home-hero {
        padding: 1.75rem;
    }

    .home-hero-content h1 {
        font-size: 2rem;
    }

    .home-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .top-board-meta {
        flex-direction: column;
        gap: 0.35rem;
    }

    .board-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .board-section-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }

    .user-info {
        border-left: none;
        padding-left: 0;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border-color);
    }

    .board-grid {
        grid-template-columns: 1fr;
    }

    .board-section-grid {
        grid-template-columns: 1fr;
    }

    .table {
        font-size: 0.875rem;
    }

    .table th,
    .table td {
        padding: 0.75rem;
    }
}

@media (min-width: 960px) {
    .top-boards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .board-section-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.forge-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.forge-sword-frame {
    position: relative;
    width: 200px;
    height: 270px;
    border-radius: 1rem;
    border: 1px solid rgba(251, 191, 36, 0.3);
    background: radial-gradient(circle at 50% 30%, rgba(250, 204, 21, 0.2), rgba(17, 24, 39, 0.94) 72%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.1), 0 12px 28px rgba(2, 6, 23, 0.4);
    overflow: hidden;
}

.forge-sword-frame::before {
    content: '';
    position: absolute;
    inset: 12% 18%;
    background: radial-gradient(circle, rgba(248, 250, 252, 0.12), transparent 70%);
    filter: blur(10px);
}

.forge-sword-frame img {
    position: relative;
    width: 82%;
    height: 82%;
    object-fit: contain;
    filter: drop-shadow(0 12px 20px rgba(250, 204, 21, 0.35));
    transition: transform 0.35s ease;
}

.forge-stage-label {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.7);
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(251, 191, 36, 0.45);
    color: #fef9c3;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(2, 6, 23, 0.3);
}

.forge-stage-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.5rem;
    position: relative;
}

.stage-node {
    position: relative;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.35);
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.25);
}

.stage-node::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -120%;
    width: 120%;
    height: 2px;
    background: rgba(148, 163, 184, 0.25);
    transform: translateY(-50%);
    z-index: -1;
}

.stage-node:first-child::before {
    display: none;
}

.stage-node--done {
    background: #fbbf24;
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.7);
}

.stage-node--done::before {
    background: rgba(250, 204, 21, 0.45);
}

.stage-node--current {
    background: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.55);
}

.stage-node--next {
    animation: forgeNextPulse 1.3s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.0);
}

@keyframes forgeNextPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.0);
        background: rgba(56, 189, 248, 0.35);
    }
    100% {
        box-shadow: 0 0 0 10px rgba(56, 189, 248, 0.0);
        background: rgba(56, 189, 248, 0.55);
    }
}

.forge-celebration {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 5;
}

.forge-celebration.active {
    opacity: 1;
}

.confetti-piece {
    position: absolute;
    top: -10%;
    width: 10px;
    height: 18px;
    border-radius: 2px;
    left: var(--confetti-left);
    animation: confetti-fall 3.2s linear var(--confetti-delay) forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translate3d(0, 0, 0) rotate(var(--confetti-rotation));
        opacity: 1;
    }
    100% {
        transform: translate3d(40px, 120vh, 0) rotate(calc(var(--confetti-rotation) + 360deg));
        opacity: 0;
    }
}

/* 포인트 시세 게임 스타일 */
.game-panel-body.market-body {
    display: grid;
    grid-template-columns: minmax(360px, 1.5fr) minmax(260px, 1fr);
    gap: 1.75rem;
    align-items: stretch;
}

.market-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.market-price-card {
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.9) 0%, rgba(56, 189, 248, 0.35) 100%);
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(56, 189, 248, 0.25);
    display: grid;
    gap: 0.75rem;
}

.market-symbol {
    font-size: 0.9rem;
    letter-spacing: 0.16em;
    color: rgba(148, 210, 255, 0.85);
    text-transform: uppercase;
}

.market-price {
    font-size: 2.4rem;
    font-weight: 700;
    color: #f8fafc;
}

.market-change {
    font-size: 1rem;
    font-weight: 600;
}

.market-change.up {
    color: #4ade80;
}

.market-change.down {
    color: #f87171;
}

.market-countdown {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: rgba(226, 232, 240, 0.85);
}

.market-countdown strong {
    color: #fef9c3;
}

.market-chart-card {
    position: relative;
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#marketChart {
    width: 100%;
    height: 240px;
    display: block;
}

.market-chart-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: rgba(148, 163, 184, 0.9);
}

.market-trade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.market-trade-card,
.market-holdings-card,
.market-log-card {
    background: rgba(15, 23, 42, 0.85);
    border-radius: 1.1rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.35);
}

.market-trade-card h4,
.market-holdings-card h4,
.market-log-card h4 {
    margin: 0 0 1rem;
    font-size: 1rem;
    color: #f1f5f9;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.market-trade-summary {
    margin: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: rgba(226, 232, 240, 0.85);
}

.market-status {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    min-height: 1.4rem;
    color: rgba(226, 232, 240, 0.85);
}

.market-status.success {
    color: #4ade80;
}

.market-status.error {
    color: #f87171;
}

.market-status.info {
    color: #38bdf8;
}

.market-holdings-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
    font-size: 0.9rem;
    color: rgba(226, 232, 240, 0.85);
}

.market-holdings-list span {
    color: #facc15;
    font-weight: 600;
}

.market-log {
    max-height: 210px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.market-log-entry {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.85rem;
    background: rgba(17, 24, 39, 0.75);
    border-radius: 0.75rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid rgba(56, 189, 248, 0.18);
}

.market-log-entry.buy {
    border-left: 3px solid #38bdf8;
}

.market-log-entry.sell {
    border-left: 3px solid #f97316;
}

.market-log-entry.empty {
    text-align: center;
    color: rgba(148, 163, 184, 0.75);
    border-left: none;
}

.market-log-entry .log-time {
    color: rgba(148, 163, 184, 0.75);
    font-size: 0.75rem;
}

.market-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.market-info-card {
    background: rgba(15, 23, 42, 0.82);
    border-radius: 1.1rem;
    padding: 1.25rem;
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 18px 34px rgba(2, 6, 23, 0.35);
}

.market-info-card h4 {
    margin: 0 0 0.9rem;
    font-size: 1rem;
    color: #e2e8f0;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.market-leaders,
.market-recent-trades,
.market-guide {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-size: 0.85rem;
}

.leader-item,
.recent-trade {
    background: rgba(17, 24, 39, 0.7);
    border-radius: 0.8rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.leader-name,
.recent-user {
    font-weight: 600;
    color: #f8fafc;
}

.leader-stats,
.recent-info {
    color: rgba(148, 163, 184, 0.85);
}

.recent-trade.buy {
    border-left: 3px solid #38bdf8;
}

.recent-trade.sell {
    border-left: 3px solid #f97316;
}

.recent-time {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.7);
}

.leaders-empty,
.recent-empty {
    text-align: center;
    color: rgba(148, 163, 184, 0.75);
}

.market-guide li {
    color: rgba(186, 198, 216, 0.85);
}

@media (max-width: 1100px) {
    .game-panel-body.market-body {
        grid-template-columns: 1fr;
    }

    .market-info {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .market-info-card {
        flex: 1 1 280px;
    }
}

@media (max-width: 768px) {
    #marketChart {
        height: 200px;
    }

    .market-countdown {
        gap: 1rem;
    }

    .market-trade-grid {
        grid-template-columns: 1fr;
    }

    .market-info {
        flex-direction: column;
    }
}

.market-symbol-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.market-symbol-tab {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.4);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    transition: all 0.2s ease;
    cursor: pointer;
}

.market-symbol-tab:hover {
    color: var(--text-primary);
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.15);
}

.market-symbol-tab.active {
    color: #0f172a;
    background: linear-gradient(135deg, #22d3ee, #38bdf8);
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(56, 189, 248, 0.35);
}

.market-symbol-tab:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.5);
}

@media (max-width: 992px) {
    .market-body {
        flex-direction: column;
    }
}

+.market-chart-tooltip {
    position: absolute;
    top: 0;
    left: 0;
    display: none;
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    border-radius: 0.5rem;
    padding: 0.45rem 0.6rem;
    font-size: 0.8rem;
    line-height: 1.4;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.38);
    pointer-events: none;
    border: 1px solid rgba(148, 163, 184, 0.3);
    min-width: 120px;
}

+.market-chart-tooltip strong {
    display: block;
    font-weight: 700;
    color: #fde68a;
    margin-bottom: 0.15rem;
}

+.market-chart-tooltip span {
    display: block;
    font-weight: 600;
}

+.market-chart-point {
    transition: r 0.15s ease, fill 0.15s ease, opacity 0.15s ease;
}

.slots-payline::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg,
        rgba(253, 224, 71, 0) 0%,
        rgba(253, 224, 71, 0.95) 50%,
        rgba(253, 224, 71, 0) 100%);
    box-shadow:
        0 0 12px rgba(253, 224, 71, 0.6),
        0 0 28px rgba(253, 224, 71, 0.4);
}

/* Admin dashboard */
.admin-dashboard {
    padding: 2rem 0;
}

.admin-dashboard .page-title {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
}

.admin-dashboard .page-subtitle {
    color: var(--text-light);
    margin-bottom: 1.75rem;
    font-size: 1rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.admin-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
}

.admin-card-icon {
    font-size: 2rem;
    background: rgba(79, 70, 229, 0.12);
    color: #4338ca;
    border-radius: 0.75rem;
    padding: 0.75rem;
    flex-shrink: 0;
}

.admin-card-body h2 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
}

.admin-card-body p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.5;
}

@media (max-width: 600px) {
    .admin-dashboard {
        padding: 1.5rem 0;
    }

    .admin-card {
        padding: 1.25rem;
    }
}

+.user-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.user-modal-summary {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* 사용자 메뉴 드롭다운 */
.username-link {
    position: relative;
    display: inline-block;
}

.user-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: var(--card-bg);
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    z-index: 1000;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    animation: slideDown 0.2s ease;
}

[data-theme="black"] .user-menu-dropdown,
[data-theme="darkblack"] .user-menu-dropdown {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.user-menu-item:hover {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.1) 0%, rgba(79, 70, 229, 0.05) 100%);
    color: var(--primary-color);
}

[data-theme="black"] .user-menu-item:hover,
[data-theme="darkblack"] .user-menu-item:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.1) 100%);
}

.user-menu-item span {
    font-size: 1rem;
}

/* 고대비 모드 */
body.high-contrast {
    --bg-color: #000000;
    --card-bg: #1a1a1a;
    --text-color: #ffffff;
    --text-light: #cccccc;
    --border-color: #666666;
    filter: contrast(1.2);
}

body.high-contrast * {
    border-color: var(--border-color) !important;
}

/* 이미지 지연 로딩 */
img.lazy-loading {
    opacity: 0.3;
    transition: opacity 0.3s;
    background: var(--bg-muted);
}

img.lazy-loaded {
    opacity: 1;
}

img.lazy-error {
    opacity: 0.5;
    background: var(--error-color);
}

/* 무한 스크롤 로딩 */
.infinite-scroll-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.infinite-scroll-end {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-style: italic;
}

/* 스크린 리더 전용 (접근성) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* 포커스 표시 개선 (접근성) */
*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* 다크 모드 개선 */
[data-theme="darkblack"] {
    --primary-color: #818cf8;
    --primary-hover: #6366f1;
    --bg-color: #0a0a0a;
    --card-bg: #1a1a1a;
    --text-color: #f5f5f5;
    --text-light: #a3a3a3;
    --border-color: #404040;
    --bg-muted: rgba(255, 255, 255, 0.05);
}

[data-theme="darkblack"] .card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="darkblack"] .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
}

[data-theme="darkblack"] .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.4);
}

/* 다크 모드 개선 - 추가 스타일 */
[data-theme="darkblack"] input,
[data-theme="darkblack"] textarea,
[data-theme="darkblack"] select {
    background: #2a2a2a;
    color: #f5f5f5;
    border-color: #404040;
}

[data-theme="darkblack"] input:focus,
[data-theme="darkblack"] textarea:focus,
[data-theme="darkblack"] select:focus {
    background: #333333;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1);
}

[data-theme="darkblack"] .card {
    background: #1a1a1a;
    border: 1px solid #404040;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="darkblack"] .table {
    background: #1a1a1a;
}

[data-theme="darkblack"] .table thead {
    background: #2a2a2a;
}

[data-theme="darkblack"] .table tbody tr:hover {
    background: #2a2a2a;
}

/* 키보드 단축키 안내 */
.keyboard-shortcuts {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    max-width: 300px;
    z-index: 9999;
    display: none;
}

.keyboard-shortcuts.show {
    display: block;
}

.keyboard-shortcuts h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.keyboard-shortcut-item {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    font-size: 0.875rem;
}

.keyboard-shortcut-key {
    background: var(--bg-muted);
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.75rem;
}

/* 접근성 개선 - 스크린 리더 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* 포커스 표시 개선 */
*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ARIA 라이브 영역 */
[aria-live] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

