@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");
@font-face {
  font-family: 'SchoolSafeLocker';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2402_keris@1.0/TTHakgyoansimSamulhamR.woff2') format('woff2');
  font-weight: normal;
  font-display: swap;
}

/* ================================ */
/* CSS Variables - shadcn/ui Style */
/* ================================ */
:root {
  /* Dark Theme (Default) - shadcn zinc palette */
  --bg-primary: #09090b;
  --bg-secondary: #18181b;
  --bg-tertiary: #27272a;
  --bg-elevated: #27272a;
  --bg-elevated-hover: #3f3f46;

  --text-primary: #fafafa;
  --text-secondary: #e4e4e7;
  --text-tertiary: #a1a1aa;
  --text-muted: #71717a;

  --border-primary: #3f3f46;
  --border-secondary: #27272a;
  --border-tertiary: #27272a;

  --accent-primary: #3b82f6;
  --accent-secondary: #2563eb;
  --accent-tertiary: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.3);

  --shadow-sm: rgba(0, 0, 0, 0.1);
  --shadow-md: rgba(0, 0, 0, 0.2);
  --shadow-lg: rgba(0, 0, 0, 0.3);

  --overlay-light: rgba(255, 255, 255, 0.03);
  --overlay-medium: rgba(255, 255, 255, 0.05);
  --overlay-heavy: rgba(255, 255, 255, 0.08);

  --blur-sm: 8px;
  --blur-md: 16px;
  --blur-lg: 24px;

  /* Layout */
  --header-height: 60px;
  --sidebar-width: 240px;
  --mobile-nav-height: 60px;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
}

[data-theme="light"] {
  /* Light Theme - shadcn zinc palette */
  --bg-primary: #ffffff;
  --bg-secondary: #fafafa;
  --bg-tertiary: #f4f4f5;
  --bg-elevated: #ffffff;
  --bg-elevated-hover: #f4f4f5;

  --text-primary: #09090b;
  --text-secondary: #18181b;
  --text-tertiary: #71717a;
  --text-muted: #a1a1aa;

  --border-primary: #e4e4e7;
  --border-secondary: #f4f4f5;
  --border-tertiary: #fafafa;

  --accent-primary: #3b82f6;
  --accent-secondary: #2563eb;
  --accent-tertiary: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.2);

  --shadow-sm: rgba(0, 0, 0, 0.05);
  --shadow-md: rgba(0, 0, 0, 0.1);
  --shadow-lg: rgba(0, 0, 0, 0.15);

  --overlay-light: rgba(0, 0, 0, 0.02);
  --overlay-medium: rgba(0, 0, 0, 0.04);
  --overlay-heavy: rgba(0, 0, 0, 0.06);
}

/* ================================ */
/* Reset & Base Styles */
/* ================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ================================ */
/* Accessibility - Screen Reader Only */
/* ================================ */
.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;
}

/* ================================ */
/* App Container - Grid Layout */
/* ================================ */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-secondary);
}

/* ================================ */
/* Header */
/* ================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-primary);
}

/* Header Left Section */
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.header-left:hover {
  opacity: 0.8;
}

/* Desktop Header Navigation */
.desktop-header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.desktop-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.desktop-nav-link:hover {
  background: var(--overlay-light);
  color: var(--text-primary);
}

.desktop-nav-link.active {
  background: var(--overlay-light);
  color: var(--accent-primary);
  border: 1px solid var(--border-tertiary);
}

.desktop-nav-link i {
  font-size: 1.1rem;
}

/* Header Right Section */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Desktop Header Theme Toggle (compact, icon only) */
.desktop-header-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--overlay-light);
  border: 1px solid var(--border-tertiary);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.desktop-header-theme-toggle:hover {
  background: var(--overlay-medium);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.desktop-header-theme-toggle i {
  font-size: 20px;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--overlay-light);
  border: 1px solid var(--border-tertiary);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-menu i {
  font-size: 24px;
}

.hamburger-menu:hover {
  background: var(--overlay-medium);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.header-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.header-brand {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--overlay-light);
  border: 1px solid var(--border-tertiary);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px var(--shadow-sm);
}

.theme-toggle:hover {
  background: var(--overlay-medium);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-md);
}

.theme-toggle i {
  font-size: 1.2rem;
}

/* ================================ */
/* Desktop Navigation Sidebar */
/* ================================ */
.desktop-nav {
  display: none; /* Hide sidebar completely */
  flex-direction: column;
}

.desktop-nav nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.desktop-nav-footer {
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--border-tertiary);
}

.desktop-nav-footer .theme-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--overlay-light);
  border: 1px solid var(--border-tertiary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s ease;
}

.desktop-nav-footer .theme-toggle:hover {
  background: var(--overlay-medium);
  border-color: var(--border-secondary);
}

.desktop-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--overlay-light);
  border: 1px solid var(--border-tertiary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.desktop-nav .nav-link i {
  font-size: 20px;
}

.desktop-nav .nav-link:hover {
  background: var(--overlay-medium);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateX(4px);
}

.desktop-nav .nav-link.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* ================================ */
/* Main Content Area */
/* ================================ */
.main-container {
  flex: 1;
  overflow-y: auto;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-header {
  margin-bottom: 32px;
  text-align: center;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 1.1rem;
  color: var(--text-tertiary);
}

/* Mobile Filter Bar and View Controls - Hidden on Desktop */
.filter-and-view-controls {
  display: none;
}

.mobile-filter-bar {
  display: none;
}

.view-toggle {
  display: none;
}

/* ================================ */
/* Hero Grid */
/* ================================ */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  padding: 24px;
}

.hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.hero-card:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-primary);
}

.hero-portrait-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 12px;
}

.hero-portrait {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid #5e5a53;
  box-sizing: border-box;
}

.hero-portrait.rarity-legendary-plus {
  background: url(/images/bg-legendary.png) center/cover no-repeat;
}
.hero-portrait.rarity-legendary {
  background: url(/images/bg-legendary.png) center/cover no-repeat;
}
.hero-portrait.rarity-rare {
  background: url(/images/bg-rare.png) center/cover no-repeat;
}

.hero-type-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 36px;
  height: 36px;
  object-fit: contain;
  z-index: 2;
}

/* Rarity border image (PNG) */
.rarity-border {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: auto;
  z-index: 1;
  pointer-events: none;
  object-fit: cover;
}

/* Legacy rarity-diamond-effect (deprecated) */
.rarity-diamond-effect {
  position: absolute;
  top: 0;
  right: 0;
  width: clamp(28px, 3vw, 48px);
  height: clamp(28px, 3vw, 48px);
  z-index: 5;
  pointer-events: none;
  display: none; /* Hidden by default, replaced by rarity-border */
}

.rarity-diamond-effect svg {
  overflow: visible;
  filter: drop-shadow(0 0 6px #ffcc80)
          drop-shadow(0 0 12px #f37225)
          drop-shadow(0 0 20px rgba(255, 180, 60, 0.6));
}

/* Purple variant for (구)세븐나이츠 */
.hero-card[data-group*="(구)세븐나이츠"] .rarity-diamond-effect svg {
  filter: drop-shadow(0 0 6px #d5a6ff)
          drop-shadow(0 0 12px #b57aff)
          drop-shadow(0 0 20px rgba(170, 90, 255, 0.6));
}

.hero-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  margin-top: 4px;
}

/* ================================ */
/* List View Styles */
/* ================================ */
.hero-grid.list-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-grid.list-view .hero-card {
  flex-direction: row;
  padding: 16px;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.hero-grid.list-view .hero-portrait-wrapper {
  width: 80px;
  min-width: 80px;
  height: 80px;
  margin-bottom: 0;
}

.hero-grid.list-view .hero-portrait {
  border-radius: var(--radius-sm);
}

.hero-grid.list-view .hero-type-badge {
  width: 28px;
  height: 28px;
  bottom: 4px;
  left: 4px;
}

.hero-grid.list-view .rarity-diamond-effect {
  width: 20px;
  height: 20px;
}

.hero-grid.list-view .hero-name {
  font-size: 1rem;
  text-align: left;
  margin-top: 0;
}

.hero-grid.list-view .hero-nickname {
  font-size: 0.85rem;
  text-align: left;
  margin-top: 4px;
}

/* ================================ */
/* Desktop Filters Sidebar */
/* ================================ */
.desktop-filters {
  display: none;
  width: 100%;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
}

@media (min-width: 769px) {
  .desktop-filters {
    display: block;
  }
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.filter-section-horizontal {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.filter-group-horizontal {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-group-horizontal .filter-label {
  white-space: nowrap;
  min-width: fit-content;
}

.filter-group-horizontal .filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.filter-chip input {
  display: none;
}

.filter-chip:hover {
  background: var(--overlay-medium);
  border-color: var(--accent-primary);
}

.filter-chip:has(input:checked) {
  background: rgba(100, 181, 246, 0.15);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(100, 181, 246, 0.2);
}

[data-theme="light"] .filter-chip:has(input:checked) {
  background: rgba(0, 122, 255, 0.12);
  color: var(--accent-primary);
}

.sort-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sort-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--overlay-light);
  border: 1px solid var(--border-tertiary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sort-option:hover {
  background: var(--overlay-medium);
  border-color: var(--accent-tertiary);
}

.sort-option input {
  accent-color: var(--accent-primary);
}

.sort-option:has(input:checked) {
  background: var(--overlay-medium);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* ================================ */
/* Mobile Menu Overlay */
/* ================================ */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.mobile-menu {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 80%;
  background: var(--bg-elevated);
  backdrop-filter: blur(var(--blur-lg)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(180%);
  border-left: 1px solid var(--border-primary);
  box-shadow: -4px 0 24px var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

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

.mobile-menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  border-bottom: 1px solid var(--border-primary);
  background: var(--overlay-light);
}

.mobile-menu-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.mobile-menu-header span {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.mobile-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--overlay-light);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  border: 1px solid var(--border-tertiary);
  border-radius: 8px;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.mobile-menu-close i {
  font-size: 20px;
}

.mobile-menu-close:active {
  background: var(--overlay-medium);
  transform: scale(0.95);
}

.mobile-menu-nav {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.mobile-menu-footer {
  padding: 16px;
  border-top: 1px solid var(--border-tertiary);
  background: var(--bg-tertiary);
}

.mobile-menu-footer .theme-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--overlay-light);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  border: 1px solid var(--border-tertiary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s ease;
}

.mobile-menu-footer .theme-toggle:active {
  background: var(--overlay-medium);
  transform: scale(0.98);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--overlay-light);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  border: 1px solid var(--border-tertiary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s ease;
}

.mobile-nav-link i {
  font-size: 20px;
}

.mobile-nav-link:active {
  background: var(--overlay-medium);
  transform: scale(0.98);
}

.mobile-nav-link.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* ================================ */
/* Mobile Bottom Navigation */
/* ================================ */
.mobile-bottom-nav {
  display: none;
}

/* ================================ */
/* Loading Overlay & Error Message */
/* ================================ */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.error-message {
  padding: 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-align: center;
  font-size: 1.1rem;
  box-shadow: 0 8px 32px var(--shadow-md);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 5px solid var(--overlay-medium);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

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

.loading-text {
  font-weight: 600;
  font-size: 18px;
  color: var(--text-primary);
  letter-spacing: 0.3em;
}

/* ================================ */
/* Scrollbar Styling */
/* ================================ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--overlay-light);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) var(--overlay-light);
}

/* ================================ */
/* Responsive - Tablet */
/* ================================ */
@media (max-width: 1024px) {
  .app-container {
    grid-template-columns: 1fr;
    grid-template-rows: var(--header-height) 1fr;
    grid-template-areas:
      "header"
      "main";
  }

  .desktop-nav,
  .desktop-filters {
    display: none;
  }

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

/* ================================ */
/* Responsive - Mobile */
/* ================================ */
@media (max-width: 768px) {
  .app-header {
    padding: 0 16px;
  }

  /* Show hamburger menu on mobile */
  .hamburger-menu {
    display: flex;
  }

  /* Hide desktop navigation on mobile */
  .desktop-header-nav {
    display: none;
  }

  /* Hide desktop theme toggle on mobile */
  .desktop-header-theme-toggle {
    display: none;
  }

  .header-brand {
    font-size: 0.95rem;
  }

  .header-logo {
    width: 28px;
    height: 28px;
  }

  .theme-toggle span {
    display: none;
  }

  .theme-toggle {
    padding: 10px;
  }

  .page-header {
    margin-bottom: 20px;
  }

  .page-title {
    font-size: 1.8rem;
  }

  .page-subtitle {
    font-size: 0.9rem;
  }

  /* Show Mobile Filter Bar and View Controls */
  .filter-and-view-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
  }

  .mobile-filter-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    flex: 1;
  }

  .view-toggle {
    display: flex;
    flex-direction: row;
    gap: 4px;
  }

  .view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--shadow-sm);
  }

  .view-btn i {
    font-size: 22px;
  }

  .view-btn:active {
    transform: scale(0.95);
  }

  .view-btn.active {
    background: rgba(100, 181, 246, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 2px 8px rgba(100, 181, 246, 0.2);
  }

  [data-theme="light"] .view-btn.active {
    background: rgba(0, 122, 255, 0.12);
  }

  .filter-select {
    padding: 10px 12px;
    background: var(--bg-tertiary);
    backdrop-filter: blur(var(--blur-sm));
    -webkit-backdrop-filter: blur(var(--blur-sm));
    border: 1px solid var(--border-tertiary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .filter-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-elevated-hover);
    box-shadow: 0 0 0 4px var(--accent-glow);
  }

  .hero-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .hero-card {
    padding: 8px;
  }

  .hero-type-badge {
    width: 24px;
    height: 24px;
    bottom: 4px;
    left: 4px;
  }

  .rarity-diamond-effect {
    width: 20px;
    height: 20px;
  }

  .hero-name {
    font-size: 0.8rem;
  }

  .hero-nickname {
    font-size: 0.7rem;
  }
}
.hero-detail-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 3rem;
  background: var(--bg-secondary);
  min-height: 100vh;
  padding: 0 16px;
  box-sizing: border-box;
  transition: background-color 0.3s ease;
}

/* Adjust container widths for desktop */
.hero-detail-container {
  flex: 1;
  width: 100%;
}

.hero-comments {
  flex: 0 0 360px;
  max-width: 360px;
}

/* Responsive fallback for mobile (under 1024px) */
@media (max-width: 1023px) {
  .hero-detail-page {
    flex-direction: column;
  }
  .hero-detail-container,
  .hero-comments {
    max-width: 100%;
  }

  .filter-select {
    min-width: 120px;
    font-size: 0.85rem;
    padding: 12px;
  }
}
.hero-header {
  width: 100%;
  height: 60px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--border-primary);
  box-sizing: border-box;
  box-shadow: 0 4px 24px var(--shadow-sm);
}
.hero-nav-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-button {
  background: transparent;
  color: var(--text-primary);
  border: none;
  font-size: 1rem;
  font-weight:500;
  cursor: pointer;
  transition: color 0.2s ease;
}
.back-button:hover {
  color: var(--accent-tertiary);
}
.back-button i {
  font-size:16px;
}

.hero-navigation {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-arrow {
  background: var(--overlay-light);
  border: 1px solid var(--border-tertiary);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-primary);
}

.nav-arrow:hover:not(:disabled) {
  background: var(--overlay-medium);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.nav-arrow i {
  font-size: 20px;
}

.hero-detail-container {
  margin: 0;
  text-align: left;
  padding: 32px 0;
  box-sizing: border-box;
}

/* Hero Carousel Navigation */
.hero-carousel-section {
  margin-bottom: 24px;
  padding: 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.hero-carousel::-webkit-scrollbar {
  height: 6px;
}

.hero-carousel::-webkit-scrollbar-track {
  background: var(--bg-elevated);
  border-radius: 3px;
}

.hero-carousel::-webkit-scrollbar-thumb {
  background: var(--border-primary);
  border-radius: 3px;
}

.hero-carousel::-webkit-scrollbar-thumb:hover {
  background: var(--border-secondary);
}

.carousel-item {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  padding:4px;
}

.carousel-item:hover {
  opacity: 0.8;
}

.carousel-item.active {
  box-shadow: 0 0 0 2px var(--accent-primary);
  z-index: 1;
  border-radius: var(--radius-sm);
}

.carousel-portrait {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-secondary);
}

.carousel-portrait.has-effect {
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
}

/* Carousel Navigation Buttons (Desktop only) */
.carousel-nav-btn {
  display: none;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-tertiary);
  border-radius: 50%;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 10;
}

.carousel-nav-btn:hover {
  background: var(--overlay-medium);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.carousel-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.carousel-nav-btn:disabled:hover {
  background: var(--bg-elevated);
  border-color: var(--border-tertiary);
  color: var(--text-primary);
}

/* Show carousel nav buttons on desktop */
@media (min-width: 769px) {
  .carousel-nav-btn {
    display: flex;
  }
}

/* Carousel portrait rarity backgrounds */
.carousel-portrait.rarity-legendary-plus {
  background: url(/images/bg-legendary.png) center/cover no-repeat;
}

.carousel-portrait.rarity-legendary {
  background: url(/images/bg-legendary.png) center/cover no-repeat;
}

.carousel-portrait.rarity-rare {
  background: url(/images/bg-rare.png) center/cover no-repeat;
}

.carousel-name {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70px;
  text-align: center;
}

/* Hero Top Section - Portrait and Basic Info */
.hero-top {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  text-align: center;
}

.hero-center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.hero-top .hero-portrait-wrap {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  position: relative;
}

.hero-top .hero-portrait {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  object-fit: cover;
}

/* Hero Navigation Side Buttons */
.hero-nav-side {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--overlay-light);
  border: 1px solid var(--border-tertiary);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.hero-nav-side .nav-arrow {
  font-size: 24px;
  flex-shrink: 0;
}

.hero-nav-side .nav-hero-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.hero-nav-side .nav-hero-portrait {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid var(--border-primary);
}

.hero-nav-side .nav-hero-name {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-primary);
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-nav-side:hover:not(:disabled) {
  background: var(--overlay-medium);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.hero-nav-side:active:not(:disabled) {
  transform: scale(1.05);
}

.hero-nav-side:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.hero-detail-portrait {
  width: 180px;
  height: 180px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 4px solid #c1b494;
  margin: 0;
}

.hero-basic-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

#hero-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0;
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero-nickname {
  font-size: 1rem;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: 0;
  margin-bottom: 0;
  font-weight: 400;
  line-height: 1.5;
}

.hero-group {
  font-size: 0.95rem;
  color: var(--text-tertiary);
  font-weight: 500;
  line-height: 1;
  height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: 8px;
}

.hero-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

#hero-type {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 4px;
  border-radius: 8px;
  height: 32px;
}

#hero-rarity {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 8px;
  border-radius: 8px;
  line-height: 1.1em;
  height: 32px;
  vertical-align: middle;
}

/* Type-specific colors */
#hero-type.type-attack {
  color: #ff5252;
  border-color: rgba(255, 82, 82, 0.3);
  background: rgba(255, 82, 82, 0.1);
}

#hero-type.type-magic {
  color: #448aff;
  border-color: rgba(68, 138, 255, 0.3);
  background: rgba(68, 138, 255, 0.1);
}

#hero-type.type-support {
  color: #d4a044;
  border-color: rgba(212, 160, 68, 0.3);
  background: rgba(212, 160, 68, 0.1);
}

#hero-type.type-versatile {
  color: #ab47bc;
  border-color: rgba(171, 71, 188, 0.3);
  background: rgba(171, 71, 188, 0.1);
}

#hero-type.type-defense {
  color: #8d6e63;
  border-color: rgba(141, 110, 99, 0.3);
  background: rgba(141, 110, 99, 0.1);
}

/* Rarity-specific colors */
#hero-rarity.rarity-legendary-plus {
  color: #eba22a;
  border-color: rgba(235, 162, 42, 0.3);
  background: rgba(235, 162, 42, 0.1);
}

#hero-rarity.rarity-legendary {
  color: #b68700;
  border-color: rgba(182, 135, 0, 0.3);
  background: rgba(182, 135, 0, 0.1);
}

#hero-rarity.rarity-rare {
  color: #a693ff;
  border-color: rgba(166, 147, 255, 0.3);
  background: rgba(166, 147, 255, 0.1);
}

/* Light theme adjustments */
[data-theme="light"] #hero-type.type-attack {
  color: #d32f2f;
  background: rgba(211, 47, 47, 0.08);
}

[data-theme="light"] #hero-type.type-magic {
  color: #1976d2;
  background: rgba(25, 118, 210, 0.08);
}

[data-theme="light"] #hero-type.type-support {
  color: #c08830;
  background: rgba(192, 136, 48, 0.08);
}

[data-theme="light"] #hero-type.type-versatile {
  color: #8e24aa;
  background: rgba(142, 36, 170, 0.08);
}

[data-theme="light"] #hero-type.type-defense {
  color: #6d4c41;
  background: rgba(109, 76, 65, 0.08);
}

[data-theme="light"] #hero-rarity.rarity-legendary-plus {
  color: #d88c1f;
  background: rgba(216, 140, 31, 0.08);
}

[data-theme="light"] #hero-rarity.rarity-legendary {
  color: #996a00;
  background: rgba(153, 106, 0, 0.08);
}

[data-theme="light"] #hero-rarity.rarity-rare {
  color: #7b68ee;
  background: rgba(123, 104, 238, 0.08);
}

#hero-description {
  font-size: 1rem;
  line-height: 1.6;
  color: #ccc;
  margin-bottom: 32px;
  white-space: pre-line;
}

/* Hero Tabs */
.hero-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-secondary);
  padding-bottom: 0;
}

.tab-btn {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  margin-bottom: -1px;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  font-weight: 600;
}

.tab-content {
  display: none;
  animation: fadeIn 0.2s ease;
}

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

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

/* Hero Stats Section */
/* 2단 레이아웃 컨테이너 */
.hero-stats-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 0;
}

@media (max-width: 768px) {
  .hero-stats-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.stats-left,
.stats-right {
  background: var(--bg-elevated);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.hero-stats {
  background: var(--bg-elevated);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.hero-stats h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin: 0 0 8px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-secondary);
}

.stats-info {
  font-size: 12px;
  color: var(--text-tertiary);
  margin: 0 0 16px 0;
}

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

.stats-table tr {
  border-bottom: 1px solid var(--border-tertiary);
}

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

.stats-table td {
  padding: 4px 0;
}

.stats-table td:first-child {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  width: 40%;
}

.stats-table td:last-child {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

/* 초월 레벨 스타일 */
.transcendence-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-secondary);
}

.transcendence-levels {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.transcendence-box {
  background: var(--bg-base);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-sm);
  padding: 12px;
  transition: all 0.2s ease;
}

.transcendence-box:hover {
  border-color: var(--accent-primary);
  background: var(--bg-elevated-hover);
}

.transcendence-level-number {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 6px;
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent-primary-alpha);
  border-radius: 4px;
}

.transcendence-content {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.transcendence-empty {
  font-size: 13px;
  color: var(--text-tertiary);
  text-align: center;
  padding: 24px;
}

/* Hero Skills Section */
.hero-skills h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-secondary);
}

.hero-skills .skill {
  background: var(--bg-elevated);
  backdrop-filter: blur(var(--blur-md)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(180%);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.hero-skills .skill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero-skills .skill:hover {
  border-color: var(--accent-primary);
  background: var(--bg-elevated-hover);
}

.hero-skills .skill:hover::before {
  opacity: 1;
}

.hero-skills .skill h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

.hero-skills .skill img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-tertiary);
  margin-bottom: 12px;
  float: left;
  margin-right: 16px;
  box-shadow: 0 2px 8px var(--shadow-sm);
}

.hero-skills .skill .skill-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: block;
}

.hero-skills .skill .skill-cooltime {
  display: inline-block;
  background: var(--overlay-light);
  border: 1px solid var(--border-tertiary);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 10px;
  margin-left: 6px;
}

.hero-skills .skill .skill-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  clear: both;
  padding-top: 8px;
}

/* Skill Transformation Styles */
.skill-transform-badge {
  font-size: 0.75rem;
  color: var(--accent-secondary);
  font-weight: 500;
  opacity: 0.8;
}

.skill-transform-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.skill-transform-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-transform-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-align: center;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.skill-transform-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent-primary);
  font-weight: bold;
  padding-top: 40px;
}

.skill-transform-item img {
  width: 100%;
  max-width: 80px;
  height: 80px;
  margin: 0 auto;
  float: none;
}

.skill-transform-item .skill-name {
  text-align: center;
  display: block;
  font-size: 1rem;
}

.skill-transform-item .skill-cooltime {
  display: block;
  text-align: center;
  margin: 4px auto;
}

.skill-transform-item .skill-desc {
  clear: both;
  padding-top: 8px;
  font-size: 0.85rem;
}

/* Mobile: Stack vertically */
@media (max-width: 768px) {
  .skill-transform-container {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .skill-transform-arrow {
    padding-top: 0;
    transform: rotate(90deg);
    font-size: 1.2rem;
  }
}

/* Markdown styling in skill descriptions */
.skill-desc strong {
  color: var(--accent-primary);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(100, 181, 246, 0.3);
}

.skill-desc em {
  color: var(--text-primary);
  font-style: italic;
}

.skill-desc code {
  background: var(--overlay-light);
  border: 1px solid var(--border-tertiary);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.85em;
  color: var(--accent-secondary);
}

.skill-desc a {
  color: var(--accent-primary);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.skill-desc a:hover {
  color: var(--accent-secondary);
  text-decoration: none;
}

.skill-desc br + br {
  display: block;
  content: "";
  margin-top: 0.5em;
}

/* Skill effect boxes */
.skill-box {
  display: inline-block;
  padding: 8px 12px;
  margin: 4px 0;
  border-radius: 6px;
  font-weight: 500;
  line-height: 1.5;
  border-left: 4px solid;
}

/* Skill enhancement box (청록색/cyan) */
.skill-box.skill-enhancement {
  background: linear-gradient(135deg, rgba(0, 206, 209, 0.15), rgba(32, 178, 170, 0.15));
  border-left-color: #00CED1;
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 206, 209, 0.2);
}

/* Light mode adjustment */
[data-theme="light"] .skill-box.skill-enhancement {
  background: linear-gradient(135deg, rgba(0, 206, 209, 0.12), rgba(32, 178, 170, 0.12));
  box-shadow: 0 2px 8px rgba(0, 206, 209, 0.15);
}

/* Awakening effect box (자주색/purple-magenta) */
.skill-box.awakening-effect {
  background: linear-gradient(135deg, rgba(147, 112, 219, 0.15), rgba(186, 85, 211, 0.15));
  border-left-color: #9370DB;
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(147, 112, 219, 0.2);
}

/* Light mode adjustment */
[data-theme="light"] .skill-box.awakening-effect {
  background: linear-gradient(135deg, rgba(147, 112, 219, 0.12), rgba(186, 85, 211, 0.12));
  box-shadow: 0 2px 8px rgba(147, 112, 219, 0.15);
}

/* Target type boxes */
.skill-target-box {
  display: block;
  padding: 12px 16px;
  margin: 8px 0;
  border-radius: 8px;
  font-weight: 400;
  line-height: 1.6;
  border-left: 4px solid;
  position: relative;
  padding-left: 48px;
}

.skill-target-box::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* 적군 단일 타겟 (빨강) */
.skill-target-box.target-enemy-single {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(220, 38, 38, 0.12));
  border-left-color: #ef4444;
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.skill-target-box.target-enemy-single::before {
  background-image: url('/images/target_enemy_single.png');
}

[data-theme="light"] .skill-target-box.target-enemy-single {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(220, 38, 38, 0.08));
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.12);
}

/* 적군 다중 타겟 (진한 빨강) */
.skill-target-box.target-enemy-multi {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(185, 28, 28, 0.15));
  border-left-color: #dc2626;
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.skill-target-box.target-enemy-multi::before {
  background-image: url('/images/target_enemy_multiple.png');
}

[data-theme="light"] .skill-target-box.target-enemy-multi {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(185, 28, 28, 0.1));
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
}

/* 아군 단일 타겟 (초록) */
.skill-target-box.target-ally-single {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(22, 163, 74, 0.12));
  border-left-color: #22c55e;
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.15);
}

.skill-target-box.target-ally-single::before {
  background-image: url('/images/target_friendly_single.png');
}

[data-theme="light"] .skill-target-box.target-ally-single {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(22, 163, 74, 0.08));
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.12);
}

/* 아군 다중 타겟 (진한 초록) */
.skill-target-box.target-ally-multi {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.15), rgba(21, 128, 61, 0.15));
  border-left-color: #16a34a;
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.2);
}

.skill-target-box.target-ally-multi::before {
  background-image: url('/images/target_friendly_multiple.png');
}

[data-theme="light"] .skill-target-box.target-ally-multi {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.1), rgba(21, 128, 61, 0.1));
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.15);
}

/* 스킬 효과 박스 (스킬 강화, 2초월, 6초월) */
.skill-effect-box {
  display: block;
  padding: 12px 16px;
  margin: 8px 0;
  border-radius: 8px;
  font-weight: 500;
  line-height: 1.6;
  border-left: 4px solid;
  position: relative;
  padding-left: 48px;
}

.skill-effect-box::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Container structure for effect boxes */
.skill-effect-box .effect-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 12px;
}

.skill-effect-box .effect-title .effect-icon {
  font-size: 20px;
  line-height: 1;
  position: static;
  width: auto;
  height: auto;
  transform: none;
}

.skill-effect-box .effect-desc {
  padding-left: 28px;
}

.skill-effect-box .effect-desc p {
  margin: 4px 0;
  line-height: 1.6;
  font-weight: 400;
}

/* Hide ::before when using container structure */
.skill-effect-box:has(.effect-title)::before {
  display: none;
}

/* Reset padding when using container structure */
.skill-effect-box:has(.effect-title) {
  padding-left: 16px;
}

/* 스킬 강화 (주황색) */
.skill-effect-box.skill-enhancement {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(234, 88, 12, 0.15));
  border-left-color: #f97316;
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.2);
}

.skill-effect-box.skill-enhancement::before {
  content: '⚡';
  color: #f97316;
}

.skill-effect-box.skill-enhancement .effect-icon {
  color: #f97316;
}

.skill-effect-box.skill-enhancement .effect-title {
  color: #f97316;
}

[data-theme="light"] .skill-effect-box.skill-enhancement {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(234, 88, 12, 0.1));
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.15);
}

/* 2초월 (파란색) */
.skill-effect-box.awakening-2 {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.15));
  border-left-color: #3b82f6;
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.skill-effect-box.awakening-2::before {
  content: '★★';
  color: #3b82f6;
  font-size: 16px;
}

.skill-effect-box.awakening-2 .effect-icon {
  color: #3b82f6;
  font-size: 16px;
}

.skill-effect-box.awakening-2 .effect-title {
  color: #3b82f6;
}

[data-theme="light"] .skill-effect-box.awakening-2 {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.1));
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

/* 6초월 (보라색) */
.skill-effect-box.awakening-6 {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(147, 51, 234, 0.15));
  border-left-color: #a855f7;
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.2);
}

.skill-effect-box.awakening-6::before {
  content: '★★★';
  color: #a855f7;
  font-size: 14px;
}

.skill-effect-box.awakening-6 .effect-icon {
  color: #a855f7;
  font-size: 14px;
}

.skill-effect-box.awakening-6 .effect-title {
  color: #a855f7;
}

[data-theme="light"] .skill-effect-box.awakening-6 {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(147, 51, 234, 0.1));
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.15);
}

/* ✅ 커스텀 효과 (녹색/청록색) */
.skill-effect-box.skill-effect-custom {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
  border-left-color: #10b981;
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.skill-effect-box.skill-effect-custom::before {
  content: '✦';
  color: #10b981;
  font-size: 18px;
}

[data-theme="light"] .skill-effect-box.skill-effect-custom {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

/* ✅ 효과 아이콘 */
.effect-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
}

/* 아이콘이 있을 때는 ::before 숨기기 */
.skill-effect-box.skill-effect-custom:has(.effect-icon)::before {
  display: none;
}

/* ✅ 효과를 찾지 못했을 때 (빨간색 경고) */
.skill-effect-box.skill-effect-unknown {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.15));
  border-left-color: #ef4444;
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.skill-effect-box.skill-effect-unknown::before {
  content: '⚠';
  color: #ef4444;
  font-size: 18px;
}

[data-theme="light"] .skill-effect-box.skill-effect-unknown {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

/* History Timeline */
.hero-history {
  padding: 24px;
}

.history-timeline {
  position: relative;
  padding-left: 40px;
}

.history-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-primary);
}

.history-entry {
  position: relative;
  display: grid;
  grid-template-columns: 100px auto 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 24px;
}

.history-date {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: right;
}

.history-dot {
  position: absolute;
  left: -36px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--accent-primary);
}

.history-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-type {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.history-type-신규 {
  background: rgba(76, 175, 80, 0.2);
  color: #4CAF50;
  border: 1px solid rgba(76, 175, 80, 0.4);
}

.history-type-상향 {
  background: rgba(33, 150, 243, 0.2);
  color: #2196F3;
  border: 1px solid rgba(33, 150, 243, 0.4);
}

.history-type-하향 {
  background: rgba(244, 67, 54, 0.2);
  color: #F44336;
  border: 1px solid rgba(244, 67, 54, 0.4);
}

.history-type-스킬변경 {
  background: rgba(156, 39, 176, 0.2);
  color: #9C27B0;
  border: 1px solid rgba(156, 39, 176, 0.4);
}

.history-type-default {
  background: rgba(158, 158, 158, 0.2);
  color: #9E9E9E;
  border: 1px solid rgba(158, 158, 158, 0.4);
}

.history-text {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.history-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .history-timeline {
    padding-left: 32px;
  }

  .history-entry {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .history-date {
    text-align: left;
  }

  .history-dot {
    left: -28px;
  }
}

#hero-skills {
  list-style: none;
  padding: 0;
  margin: 0;
}
#hero-skills li {
  background: var(--bg-elevated);
  border: 1px solid var(--border-tertiary);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
  color: var(--text-secondary);
  text-align: left;
}

/* ------------------------------------ */
/*  전설+ 및 체크박스 효과 다이아몬드 (업데이트 버전) */
/* ------------------------------------ */
/* .rarity-diamond-effect styles referencing old diamondPulse animation removed */

/* Red-Gold Gradient for SVG fill */
svg defs {
  /* Define the gradient once */
}
@supports (--css: variables) {
  /* For browsers supporting CSS variables, define the gradient */
  :root {
    --red-gold-gradient-start: #ffefb8;
    --red-gold-gradient-mid: #ffb07a;
    --red-gold-gradient-end: #ff6a5a;
    --red-gold-gradient-pink: #ff7f90;
  }
}

/* Inline SVG gradient definition */
.rarity-diamond-effect svg defs {
  /* This is just a placeholder; the actual gradient should be defined in the SVG element */
}

/* ------------------------------------ */
/*  전설+ 황금 스파크 효과 (Red-Gold Spark) */
/* ------------------------------------ */
/* ==== Spark star positioning & animation (SVG) ==== */
.hero-portrait-wrap { position: relative; }

.rarity-diamond-effect{
  position: absolute;
  top: 0px;
  right: 0px;
  width: clamp(24px, 2vw, 48px);
  height: clamp(24px, 2vw, 48px);
  z-index: 5;
  pointer-events: none;
}

/* Ensure UA rule doesn't clip the SVG effects */

/* (구)세븐나이츠 제외 일반 영웅 스파크 */
.hero-card:not([data-group="(구)세븐나이츠"]) .rarity-diamond-effect svg,
.related-hero-card:not([data-group="(구)세븐나이츠"]) .rarity-diamond-effect svg {
  overflow: visible;
  filter: drop-shadow(0 0 6px #ffcc80)
        drop-shadow(0 0 12px #f37225)
        drop-shadow(0 0 20px rgba(255, 180, 60, 0.6));
}

/* (구)세븐나이츠 전용 보랏빛 황금 스파크 */
.hero-card[data-group="(구)세븐나이츠"] .rarity-diamond-effect svg,
.related-hero-card[data-group="(구)세븐나이츠"] .rarity-diamond-effect svg {
  filter: drop-shadow(0 0 6px #d5a6ff)
          drop-shadow(0 0 12px #b57aff)
          drop-shadow(0 0 20px rgba(170, 90, 255, 0.6));
}

/* ================================ */
/* Related Heroes Section */
/* ================================ */
.related-heroes {
  margin-top: 48px;
  margin-bottom: 48px;
}

.related-heroes h2 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.related-hero-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.related-hero-card {
  max-width: 140px;
}

.related-hero-card .hero-portrait-wrap {
  width: 100%;
  padding-bottom: 100%;
  position: relative;
}

.related-hero-card .hero-portrait {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-hero-card .hero-name {
  font-size: 0.85rem;
  margin-top: 8px;
}

@media (max-width: 768px) {
  .related-hero-list {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
  }

  .related-hero-card {
    max-width: 120px;
  }
}

/* (구)세븐나이츠 제외 일반 영웅 스파크 (상단 초상화) */
.hero-detail-page:not([data-group="(구)세븐나이츠"]) .hero-top .rarity-diamond-effect svg {
  overflow: visible;
  filter: drop-shadow(0 0 6px #ffcc80)
          drop-shadow(0 0 12px #f37225)
          drop-shadow(0 0 20px rgba(255, 180, 60, 0.6));
}

/* (구)세븐나이츠 전용 보랏빛 황금 스파크 (상단 초상화) */
.hero-detail-page[data-group="(구)세븐나이츠"] .hero-top .rarity-diamond-effect svg {
  filter: drop-shadow(0 0 6px #d5a6ff)
          drop-shadow(0 0 12px #b57aff)
          drop-shadow(0 0 20px rgba(170, 90, 255, 0.6));
}

/* Removed outdated box-shadow keyframe animations: diamondPulse, starPulse, starSparkEnhanced */

.hero-portrait.has-effect {
  position: relative;
  background-clip: padding-box;
}

/* ------------------------------------ */
/*  hero.html 댓글 섹션                 */
/* ------------------------------------ */
.hero-comments {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-sizing: border-box;
}

.hero-comments h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin: 0 0 24px 0;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-secondary);
}

#comment-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

#comment-form input,
#comment-form textarea {
  background: var(--overlay-light);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  color: var(--text-primary);
  border: 1px solid var(--border-tertiary);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: "Pretendard", sans-serif;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#comment-form input:focus,
#comment-form textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--overlay-medium);
  box-shadow: 0 0 0 4px rgba(100, 181, 246, 0.15);
}

#comment-form input::placeholder,
#comment-form textarea::placeholder {
  color: var(--text-muted);
}

#comment-form textarea {
  min-height: 100px;
  resize: vertical;
}

#comment-form button {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(100, 181, 246, 0.4);
}

#comment-form button:hover {
  opacity: 0.9;
}

#comment-form button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(100, 181, 246, 0.3);
}

/* Rating Input */
.rating-input-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rating-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.rating-label i {
  color: var(--accent-primary);
  font-size: 1.1rem;
}

.star-rating-input {
  display: flex;
  gap: 4px;
  font-size: 2rem;
}

.star-rating-input .star {
  cursor: pointer;
  color: var(--border-secondary);
  transition: all 0.2s ease;
  user-select: none;
}

.star-rating-input .star:hover,
.star-rating-input .star.hovered {
  color: #FFD700;
  transform: scale(1.1);
}

.star-rating-input .star.selected {
  color: #FFD700;
}

/* Hero Rating Display */
.hero-rating-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 12px;
  background: var(--overlay-light);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  border: 1px solid var(--border-tertiary);
  border-radius: 8px;
  width: fit-content;
}

.rating-stars {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #FFD700;
  font-weight: 600;
  font-size: 1.1rem;
}

.rating-stars i {
  font-size: 1.2rem;
}

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

.rating-count {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Comment Rating Display */
.comment-rating {
  display: flex;
  gap: 2px;
  margin-top: 4px;
  font-size: 0.9rem;
}

.comment-rating .star {
  color: #FFD700;
}

.comment-rating .star.empty {
  color: var(--border-secondary);
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-list li {
  background: var(--overlay-light);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  border: 1px solid var(--border-tertiary);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.comment-list li:hover {
  background: var(--overlay-medium);
  border-color: var(--accent-primary);
}

.comment-list li strong {
  color: var(--accent-primary);
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 600;
}

.comment-list li p {
  color: var(--text-secondary);
  margin: 0 0 8px 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.comment-list li span {
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

.filter-container {
  padding: 24px;
  color: var(--text-primary);
  font-size: 0.9rem;
}
.filter-container h3 {
  font-size: 1.1rem;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--accent-primary);
}
.filter-group {
  margin-bottom: 20px;
}
.filter-title {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-buttons label {
  background: var(--overlay-light);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  border: 1px solid var(--border-tertiary);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  color: var(--text-primary);
  box-shadow: 0 2px 6px var(--shadow-sm);
}
.filter-buttons label:hover {
  background: var(--overlay-medium);
  border-color: var(--accent-primary);
}
.filter-buttons input {
  display: none;
}
.filter-buttons input:checked + label,
.filter-buttons label:has(input:checked) {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(100, 181, 246, 0.4);
}
.sort-buttons label {
  display: block;
  margin-bottom: 6px;
  cursor: pointer;
  color: var(--text-primary);
}
.sort-buttons input {
  margin-right: 6px;
  accent-color: var(--accent-primary);
}
/* ------------------------------------ */
/*  반응형 레이아웃 */
/* ------------------------------------ */

/* ================================ */
/* Deck Page Styles */
/* ================================ */
.deck-content {
  display: flex;
  flex-direction: column;
  padding: 32px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  height: calc(100vh - 80px);
  overflow-y: auto;
  overflow-x: hidden;
  align-items: center;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) var(--overlay-light);
}

.deck-content::-webkit-scrollbar {
  width: 12px;
}

.deck-content::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
}

.deck-content::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 6px;
  border: 3px solid var(--bg-tertiary);
}

.deck-content::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

.deck-content h1 {
  position: static !important;
  width: 100%;
  max-width: 1200px;
  height: auto;
  padding: 0;
  margin: 0 0 8px 0;
  overflow: visible;
  clip: auto;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.deck-content .subtitle {
  position: static !important;
  width: 100%;
  max-width: 1200px;
  height: auto;
  padding: 0;
  margin: 0 0 24px 0;
  overflow: visible;
  clip: auto;
  color: var(--text-tertiary);
  font-size: 1rem;
}

/* 중앙 레이아웃 */
.deck-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: 100%;
  max-width: 1200px;
  height: 100%;
}

/* 덱 배치 영역 (왼쪽) */
.deck-left {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

/* 진형 선택기 */
.formation-selector {
  border-radius: var(--radius-md);
  padding: 12px;
}

.formation-selector h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin: 0 0 12px 0;
}

.formation-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.formation-option {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  user-select: none;
  box-shadow: 0 2px 8px var(--shadow-sm);
}

.formation-option input {
  display: none;
}

.formation-option:hover {
  border-color: var(--accent-tertiary);
  background: var(--bg-elevated-hover);
}

.formation-option.active {
  border-color: var(--accent-primary);
  background: rgb(0 122 255 / 10%);
}

.formation-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.formation-detail {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* 우측: 영웅 선택 (숨김) */
.deck-right {
  display: none;
}

/* 덱 디스플레이 영역 */
.deck-display {
  background: var(--bg-elevated);
  border: 1px solid var(--border-tertiary);
  border-radius: var(--radius-md);
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 100%;
  box-sizing: border-box;
  box-shadow: 0 4px 24px var(--shadow-sm);
}

.deck-display h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin: 0 0 12px 0;
}

/* 진형 배치 */
.deck-formation {
  display: flex;
  gap: 16px;
  margin-bottom: auto;
  align-items: center;
}

.formation-line {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.line-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-align: center;
  margin-bottom: 4px;
}

.formation-slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

/* 앞줄 (파란색) */
.front-line {}

.front-slot {
  border-color: #4a90e2 !important;
  background: rgba(74, 144, 226, 0.05);
}

.front-slot:hover {
  border-color: #5fa3ff !important;
  background: rgba(74, 144, 226, 0.1);
}

.front-slot .slot-indicator {
  background: #4a90e2;
}

/* 뒷줄 (빨간색) */
.back-line {}

.back-slot {
  border-color: #e25c5c !important;
  background: rgba(226, 92, 92, 0.05);
}

.back-slot:hover {
  border-color: #ff7070 !important;
  background: rgba(226, 92, 92, 0.1);
}

.back-slot .slot-indicator {
  background: #e25c5c;
}

/* 덱 슬롯 */
.deck-slot {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg-tertiary);
  border: 2px dashed var(--border-secondary);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  gap: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  cursor: pointer;
}

.deck-slot:hover {
  border-color: var(--accent-tertiary);
  background: var(--bg-elevated-hover);
}

/* F/B 인디케이터 */
.slot-indicator {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 28px;
  height: 28px;
  background: var(--border-secondary);
  color: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 1;
}

.slot-placeholder {
  font-size: 1.5rem;
  color: var(--text-muted);
  font-weight: 300;
  flex: 1;
  text-align: center;
}

.slot-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 4px;
  position: relative;
}

.slot-hero-portrait {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid #5e5a53;
  flex-shrink: 0;
}

/* Deck slot portrait rarity backgrounds */
.slot-hero-portrait.rarity-legendary-plus {
  background: url(/images/bg-legendary.png) center/cover no-repeat;
}

.slot-hero-portrait.rarity-legendary {
  background: url(/images/bg-legendary.png) center/cover no-repeat;
}

.slot-hero-portrait.rarity-rare {
  background: url(/images/bg-rare.png) center/cover no-repeat;
}

.slot-hero-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.slot-remove {
  display: none;
}

.slot-remove:hover {
  background: #ff6666;
}

/* 펫 슬롯 */
.pet-slot-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 100px;
}

.pet-slot {
  border-color: #9b59b6 !important;
  background: rgba(155, 89, 182, 0.05);
}

.pet-slot:hover {
  border-color: #c39bd3 !important;
  background: rgba(155, 89, 182, 0.1);
}

.pet-slot .slot-indicator {
  background: #9b59b6;
}

/* 초월 별 */
.transcendence-stars {
  display: flex;
  gap: 2px;
  justify-content: center;
  margin-top: 4px;
  cursor: pointer;
  user-select: none;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.transcendence-stars:hover {
  background: rgba(255, 215, 0, 0.1);
}

.transcendence-stars .star {
  font-size: 0.85rem;
  color: #ffd700;
  text-shadow: 0 0 2px rgba(255, 215, 0, 0.5);
  transition: all 0.2s ease;
}

.transcendence-stars .star.highlighted {
  color: #64b5f6;
  text-shadow: 0 0 4px rgba(100, 181, 246, 0.8),
               0 0 2px rgba(100, 181, 246, 0.6);
  transform: scale(1.1);
}

/* 덱 액션 버튼 */
.deck-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Pretendard", sans-serif;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
  border: 1px solid transparent;
}

.btn-primary:hover {
  background: var(--accent-secondary);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
}

/* Primary button large variant */
.btn-large {
  padding: 16px 32px;
  font-size: 1.1rem;
  justify-content: center;
  width: 100%;
}

/* Secondary actions group */
.deck-actions-secondary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.deck-actions-secondary .btn-secondary {
  font-size: 0.95rem;
  padding: 10px 20px;
}

/* Tab Navigation */
.deck-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border-secondary);
  padding-bottom: 0;
}

.deck-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Pretendard", sans-serif;
  position: relative;
  bottom: -2px;
}

.deck-tab:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.deck-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.deck-tab i {
  font-size: 1.2rem;
}

/* Tab Content */
.deck-tab-content {
  display: none;
}

.deck-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Shared Decks Container */
.shared-decks-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.shared-decks-header {
  margin-bottom: 32px;
  text-align: center;
}

.shared-decks-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.shared-decks-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
}

.shared-decks-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.shared-decks-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.shared-decks-empty p {
  margin: 8px 0;
  font-size: 1.1rem;
}

.empty-subtitle {
  font-size: 0.95rem;
  opacity: 0.7;
}

/* Shared Deck Card */
.shared-deck-card {
  background: var(--bg-elevated);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 4px 16px var(--shadow-md);
  transition: all 0.3s ease;
}

.shared-deck-card:hover {
  background: var(--bg-elevated-hover);
}

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

.shared-deck-author {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-weight: 600;
}

.shared-deck-date {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.shared-deck-image {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  background: var(--bg-secondary);
}

.shared-deck-comment {
  color: var(--text-primary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Deck Preview Section */
.deck-preview-section {
  margin-bottom: 24px;
}

.deck-preview-section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.deck-preview-placeholder {
  width: 100%;
  height: 200px;
  background: var(--bg-secondary);
  border: 2px dashed var(--border-secondary);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

#deck-preview-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* Form Groups */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-secondary);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: "Pretendard", sans-serif;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.char-counter {
  text-align: right;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
  flex: 1;
  justify-content: center;
}

/* 영웅 선택 영역 헤더 */
.hero-selection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.hero-selection-header h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin: 0;
}

.selection-info {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
}

.selection-info span {
  color: var(--accent-primary);
  font-size: 1.2rem;
}

/* 컴팩트 가로 필터 */
.filters-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  align-items: center;
}

.filter-select {
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: "Pretendard", sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 140px;
}

.filter-select:hover {
  border-color: var(--border-tertiary);
  background: var(--bg-elevated-hover);
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-elevated-hover);
}

.filter-select option {
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 8px;
}

/* 가로 필터 (구버전 - 제거 예정) */
.filters-horizontal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-tertiary);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-label {
  font-weight: 600;
  color: var(--accent-primary);
  min-width: 60px;
  font-size: 0.9rem;
}

.search-input {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-tertiary);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: "Pretendard", sans-serif;
  transition: border-color 0.2s ease;
}

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

.search-input::placeholder {
  color: var(--text-muted);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.chip {
  display: inline-flex;
  align-items: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  font-size: 0.85rem;
}

.chip input {
  display: none;
}

.chip span {
  color: var(--text-secondary);
}

.chip:hover {
  background: var(--bg-elevated-hover);
  border-color: var(--border-tertiary);
}

.chip:has(input:checked) {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.chip:has(input:checked) span {
  color: var(--bg-primary);
  font-weight: 600;
}

/* 덱 페이지 영웅 그리드 - 메인 페이지 #heroes 스타일 적용 */
#heroes-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-tertiary);
  border-radius: 8px;
  overflow-y: auto;
  flex: 1;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) var(--bg-tertiary);
}

#heroes-list::-webkit-scrollbar {
  width: 8px;
}

#heroes-list::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

#heroes-list::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 4px;
}

#heroes-list::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

/* 덱 패시브 효과 섹션 */
.deck-passives-section {
  margin-top: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-tertiary);
  border-radius: 8px;
  padding: 16px;
  max-height: 400px;
  overflow-y: auto;
}

.passives-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}

.passives-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.passives-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 20px;
  font-size: 0.9rem;
}

.passive-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: 8px;
  padding: 12px;
  transition: all 0.2s ease;
}

.passive-item:hover {
  border-color: var(--accent-primary);
  background: var(--bg-elevated-hover);
}

.passive-hero-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.passive-hero-portrait {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid #c1b494;
}

.passive-hero-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.passive-hero-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.passive-transcendence {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.passive-skill-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 4px;
}

.passive-skill-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* 효과 요약 */
.effects-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.effect-category {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: 8px;
  padding: 12px;
  transition: all 0.2s ease;
}

.effect-category.ally-effects {
  border-left: 3px solid #4caf50;
}

.effect-category.enemy-effects {
  border-left: 3px solid #f44336;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.category-header i {
  font-size: 1.2rem;
}

.ally-effects .category-header {
  color: #4caf50;
}

.enemy-effects .category-header {
  color: #f44336;
}

.effects-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.effects-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 12px;
  font-size: 0.85rem;
}

.effect-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-tertiary);
  border-radius: 6px;
  padding: 10px;
  transition: all 0.2s ease;
}

.effect-item:hover {
  border-color: var(--accent-primary);
  background: var(--bg-elevated-hover);
}

.effect-hero-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.effect-hero-portrait {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-secondary);
}

.effect-hero-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
}

.effect-transcendence {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-left: auto;
}

.effect-skill-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 4px;
  padding-left: 4px;
}

.effect-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  padding-left: 4px;
}

.effect-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 3px;
}

.effect-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.effect-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  padding-left: 4px;
}

/* 패시브 상세 토글 */
.passives-detail-toggle {
  margin-bottom: 12px;
}

.btn-toggle-detail {
  width: 100%;
  padding: 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-toggle-detail:hover {
  background: var(--bg-elevated-hover);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.btn-toggle-detail i {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

/* 선택 가능한 영웅 카드 */
.hero-card.selectable {
  position: relative;
  opacity: 1;
  transition: all 0.2s ease;
}

.hero-card.selectable.selected {
  opacity: 0.6;
  transform: scale(0.95);
}

.hero-card.selectable.selected::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 213, 106, 0.95);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  z-index: 10;
}

.hero-nickname {
  font-size: 1rem;
  font-weight:600;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: 4px;
}


/* 모달 공통 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* 영웅 선택 모달 */
#hero-select-modal .modal-content {
  max-width: 90%;
  width: 1200px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

#hero-select-modal .modal-body {
  overflow-y: auto;
  max-height: calc(90vh - 120px);
}

#hero-select-modal .hero-select-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

#hero-select-modal .hero-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
  max-height: 500px;
  overflow-y: auto;
  padding: 8px;
  background: var(--bg-tertiary);
  border-radius: 8px;
}

#hero-select-modal .hero-card {
  cursor: pointer;
  transition: all 0.2s ease;
}

#hero-select-modal .hero-card:hover {
  filter: brightness(1.1);
}

.modal-content {
  background: var(--bg-elevated);
  backdrop-filter: blur(var(--blur-lg)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(180%);
  border: 1px solid var(--border-tertiary);
  border-radius: var(--radius-md);
  width: 90%;
  max-width: 600px;
  padding: 0;
  box-shadow: 0 16px 64px var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--border-tertiary);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--accent-primary);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 2rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  line-height: 1;
}

.modal-close:hover {
  color: var(--accent-primary);
}

.modal-body {
  padding: 24px;
}

.modal-body p {
  color: var(--text-secondary);
  margin: 0 0 16px 0;
}

/* 공유 옵션 버튼들 */
.share-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.share-option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-option-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.share-option-btn i {
  font-size: 24px;
}

.share-url-container {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.share-url-container input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-tertiary);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: "Pretendard", sans-serif;
}

.share-url-container button {
  padding: 12px 24px;
}

.success-message {
  color: #4caf50;
  font-weight: 600;
  text-align: center;
  padding: 8px;
  background: rgba(76, 175, 80, 0.1);
  border-radius: 6px;
}

/* 덱 페이지 모바일 (768px 이하) */
@media (max-width: 768px) {
  .deck-content {
    padding: 16px;
    height: auto;
    overflow: visible;
  }

  .deck-content h1 {
    font-size: 1.5rem;
    text-align: center;
  }

  .deck-content .subtitle {
    font-size: 0.9rem;
    text-align: center;
  }

  .deck-layout {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 100%;
    height: auto;
  }

  .deck-left {
    width: 100%;
  }

  /* 진형 선택기 */
  .formation-selector {
    padding: 0;
  }

  .formation-selector h3 {
    font-size: 1rem;
    margin-bottom: 12px;
  }

  .formation-options {
    gap: 4px;
  }

  .formation-option {
    padding: 10px 8px;
  }

  .formation-name {
    font-size: 0.85rem;
  }

  /* 덱 디스플레이 */
  .deck-display {
    padding: 16px;
  }

  .deck-display h2 {
    font-size: 1.1rem;
  }

  .deck-formation {
    flex-direction: row;
    gap: 8px;
    align-items: center;
  }

  .formation-line {
    flex: 1;
  }

  .line-label {
    font-size: 0.7rem;
    margin-bottom: 2px;
  }

  .deck-slot {
    min-height: 70px;
    padding: 6px;
    gap: 6px;
    border-radius: 8px;
  }

  .slot-indicator {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
  }

  .slot-hero-portrait {
    width: 48px;
    height: 48px;
    border-radius: 8px;
  }

  .slot-hero-name {
    font-size: 0.7rem;
  }

  .slot-remove {
    display: none;
  }

  /* 덱 액션 버튼 */
  .deck-actions {
    flex-direction: column;
    gap: 8px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
    font-size: 0.9rem;
    padding: 12px 16px;
  }

  /* 영웅 선택 모달 */
  #hero-select-modal .modal-content {
    max-width: 95%;
    width: 100%;
  }

  #hero-select-modal .hero-select-filters {
    flex-direction: column;
    gap: 8px;
  }

  .search-input,
  .filter-select {
    width: 100%;
    min-width: 0;
  }

  #hero-select-modal .hero-select-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-height: 400px;
  }

  /* 모달 내 영웅 카드 아이콘 조정 */
  #hero-select-modal .hero-type-badge {
    width: 24px;
    height: 24px;
    bottom: 4px;
    left: 4px;
  }

  #hero-select-modal .rarity-diamond-effect {
    width: 20px;
    height: 20px;
    top: 2px;
    right: 2px;
  }

  #hero-select-modal .hero-name {
    font-size: 0.8rem;
  }

  #hero-select-modal .hero-nickname {
    font-size: 0.7rem;
  }

  /* 공유 모달 */
  .modal-content {
    max-width: 95%;
    width: 100%;
    padding: 0;
  }

  .modal-header {
    padding: 16px;
  }

  .modal-header h3 {
    font-size: 1.2rem;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-body p {
    font-size: 0.9rem;
  }

  .share-options {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .share-option-btn {
    flex-direction: row;
    justify-content: center;
    padding: 14px 16px;
  }

  .share-option-btn i {
    font-size: 20px;
  }

  .share-url-container {
    flex-direction: column;
    gap: 8px;
  }

  .share-url-container input {
    font-size: 0.85rem;
  }

  .share-url-container button {
    width: 100%;
  }
}

/* 덱 페이지 반응형 (1023px 이하) */
@media (max-width: 1023px) {
  .deck-content {
    padding: 16px;
    height: auto;
    overflow: visible;
  }

  .deck-layout {
    flex-direction: column;
    gap: 16px;
  }

  .deck-left {
    flex: 0 0 auto;
  }

  .deck-display {
    padding: 16px;
  }

  .deck-slot {
    min-height: 110px;
  }

  .deck-actions {
    flex-direction: row;
    gap: 8px;
  }

  .btn-primary,
  .btn-secondary {
    flex: 1;
    justify-content: center;
    font-size: 0.9rem;
    padding: 10px 16px;
  }

  /* 컴팩트 필터 모바일 */
  .filters-compact {
    gap: 8px;
  }

  .search-input {
    width: 100%;
    font-size: 0.85rem;
  }

  .filter-select {
    flex: 1;
    min-width: 120px;
    font-size: 0.85rem;
    padding: 8px 12px;
  }
}

/* 데스크톱 크기별 최적화 */
@media (min-width: 1024px) and (max-width: 1439px) {
  .deck-left {
    flex: 0 0 350px;
  }

  #heroes-list {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
}

@media (min-width: 1440px) {
  #heroes-list {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}/* ------------------------------------ */
/*  모바일 필터 (드롭다운 스타일)        */
/* ------------------------------------ */
.mobile-filters {
  display: none;
}

@media (max-width: 768px) {
  .mobile-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-elevated);
    backdrop-filter: blur(var(--blur-md)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-md)) saturate(180%);
    border-bottom: 1px solid var(--border-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 16px var(--shadow-sm);
  }

  .mobile-filter-select {
    padding: 10px 12px;
    background: var(--bg-tertiary);
    backdrop-filter: blur(var(--blur-sm));
    -webkit-backdrop-filter: blur(var(--blur-sm));
    border: 1px solid var(--border-tertiary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: "Pretendard", sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px var(--shadow-sm);
  }

  .mobile-filter-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-elevated-hover);
    box-shadow: 0 0 0 4px rgba(100, 181, 246, 0.15);
  }

  /* 데스크톱 필터 숨기기 */
  .sidebar-right {
    display: none !important;
  }
}

/* ------------------------------------ */
/*  모바일 바텀 네비게이션               */
/* ------------------------------------ */
.bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    backdrop-filter: blur(var(--blur-md)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-md)) saturate(180%);
    border-top: 1px solid var(--border-primary);
    z-index: 1000;
    box-shadow: 0 -4px 24px var(--shadow-sm);
  }

  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: all 0.2s ease;
    gap: 4px;
  }

  .bottom-nav-item i {
    font-size: 24px;
  }

  .bottom-nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
  }

  .bottom-nav-item.active {
    color: var(--accent-primary);
  }

  .bottom-nav-item:hover {
    background: var(--overlay-light);
  }

  /* 바텀 네비게이션 공간 확보 */
  body {
    padding-bottom: 70px;
  }

  .layout {
    padding-bottom: 70px;
  }
}

/* ------------------------------------ */
/*  영웅 상세 - 좌우 네비게이션 위치     */
/* ------------------------------------ */
.hero-top {
  position: relative;
}

.hero-top .hero-nav-side {
  /* Grid layout에서는 absolute positioning 불필요 */
}

.prev-hero-side {
  /* Grid layout에서는 left positioning 불필요 */
}

.next-hero-side {
  /* Grid layout에서는 right positioning 불필요 */
}

@media (max-width: 1440px) {
  .hero-nav-side {
    position: static;
    transform: none;
    max-width: none;
    flex-direction: row;
    padding: 12px 16px;
  }

  .hero-nav-side:hover {
    transform: scale(1.02);
  }

  .hero-nav-side i {
    font-size: 24px;
  }

  .prev-hero-side {
    left: auto;
    margin-right: auto;
  }

  .next-hero-side {
    right: auto;
    margin-left: auto;
  }

  .hero-top {
    position: relative;
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .hero-nav-side {
    padding: 10px 12px;
    flex: 0 0 auto;
  }

  .nav-hero-name {
    font-size: 0.75rem;
  }

  .hero-nav-side i {
    font-size: 20px;
  }

  .hero-top {
    gap: 12px;
  }

  .prev-hero-side {
    order: -1;
  }

  .next-hero-side {
    order: 3;
  }

  .hero-portrait-wrap {
    order: 1;
  }

  .hero-basic-info {
    order: 2;
    flex: 1 0 100%;
  }
}

/* =================================
   Tier List Page Styles
   ================================= */

.tier-list-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.update-info {
  background: var(--card-bg);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  margin-bottom: 32px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.update-info p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.update-info i {
  color: var(--accent-primary);
}

/* Tier Guide Section */
.tier-guide {
  background: var(--card-bg);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-bottom: 32px;
}

.tier-guide h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.tier-explanation {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tier-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.tier-badge.tier-s {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.tier-badge.tier-a {
  background: linear-gradient(135deg, #ffd93d 0%, #ffe66d 100%);
  color: #1a1a1a;
  box-shadow: 0 4px 12px rgba(255, 217, 61, 0.3);
}

.tier-badge.tier-b {
  background: linear-gradient(135deg, #64b5f6 0%, #90caf9 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(100, 181, 246, 0.3);
}

.tier-badge.tier-c {
  background: linear-gradient(135deg, #81c784 0%, #a5d6a7 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(129, 199, 132, 0.3);
}

.tier-badge.tier-d {
  background: linear-gradient(135deg, #bdbdbd 0%, #e0e0e0 100%);
  color: #1a1a1a;
  box-shadow: 0 4px 12px rgba(189, 189, 189, 0.3);
}

.tier-item p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Tier Tabs */
.tier-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--border-primary);
  overflow-x: auto;
}

.tier-tab {
  background: transparent;
  border: none;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.tier-tab:hover {
  color: var(--text-primary);
  background: var(--overlay-light);
}

.tier-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.tier-tab i {
  font-size: 1.2rem;
}

/* Tier Content */
.tier-content {
  display: none;
}

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

.tier-description {
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.6;
}

.tier-hero-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tier-section {
  background: var(--card-bg);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.tier-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-primary);
}

.tier-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.tier-hero-card {
  background: var(--card-secondary);
  border: 1px solid var(--border-secondary);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tier-hero-card:hover {
  background: var(--bg-elevated-hover);
  border-color: var(--accent-primary);
}

.tier-hero-portrait {
  margin-bottom: 8px;
}

.tier-hero-portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

.tier-hero-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tier-hero-type {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Tier FAQ */
.tier-faq {
  background: var(--card-bg);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-top: 48px;
}

.tier-faq h2 {
  margin-top: 0;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.faq-item {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-secondary);
}

.faq-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.faq-item h3 {
  color: var(--accent-primary);
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 12px;
}

.faq-item p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Responsive Design for Tier List */
@media (max-width: 768px) {
  .tier-list-page {
    padding: 16px;
  }

  .tier-tabs {
    gap: 8px;
  }

  .tier-tab {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .tier-hero-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
  }

  .tier-badge {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .update-info {
    flex-direction: column;
    gap: 12px;
  }
}

/* =================================
   FAQ Page Styles
   ================================= */

.faq-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px;
}

/* FAQ Search */
.faq-search {
  position: relative;
  margin-bottom: 32px;
}

.faq-search input {
  width: 100%;
  padding: 16px 50px 16px 20px;
  font-size: 1rem;
  background: var(--card-bg);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.faq-search input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.1);
}

.faq-search i {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--text-secondary);
  pointer-events: none;
}

/* FAQ Categories */
.faq-categories {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.faq-category {
  padding: 10px 20px;
  background: var(--card-secondary);
  border: 2px solid var(--border-secondary);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.faq-category:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.faq-category.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

/* FAQ List */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.faq-question {
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-question h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.faq-question i {
  font-size: 1.5rem;
  color: var(--text-secondary);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-question h3 {
  color: var(--accent-primary);
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
  color: var(--accent-primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding: 0 24px 20px 24px;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.8;
}

.faq-answer a {
  color: var(--accent-primary);
  text-decoration: underline;
}

.faq-answer a:hover {
  color: var(--accent-secondary);
}

/* FAQ Help Section */
.faq-help {
  background: var(--card-bg);
  border: 2px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  padding: 32px;
  margin-top: 48px;
  text-align: center;
}

.faq-help h2 {
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--accent-primary);
}

.faq-help p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.faq-help a {
  color: var(--accent-primary);
  text-decoration: underline;
  font-weight: 600;
}

.faq-help a:hover {
  color: var(--accent-secondary);
}

/* Responsive */
@media (max-width: 768px) {
  .faq-page {
    padding: 16px;
  }

  .faq-question {
    padding: 16px 20px;
  }

  .faq-question h3 {
    font-size: 1rem;
  }

  .faq-answer p {
    padding: 0 20px 16px 20px;
  }

  .faq-categories {
    gap: 8px;
  }

  .faq-category {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
}

/* ============================================
   가이드 탭 스타일 (Hero Guide Tab Styles)
   ============================================ */

.hero-guide {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px;
}

.guide-section {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}

.guide-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  color: var(--accent-primary);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.guide-section-title i {
  font-size: 1.8rem;
}

/* 한눈에 보기 */
.guide-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.overview-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--bg-primary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.overview-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.overview-value {
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 600;
}

/* 장비 빌드 */
.equipment-build {
  margin-bottom: 32px;
}

.equipment-build:last-child {
  margin-bottom: 0;
}

.build-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.build-badge {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.build-badge.build-pvp {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.equipment-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  transition: all 0.3s ease;
}

.equipment-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: var(--accent-primary);
}

.equipment-slot {
  display: inline-block;
  background: var(--accent-primary);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.equipment-details p {
  margin: 8px 0;
  line-height: 1.6;
}

.equipment-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.equipment-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.equipment-reason {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  font-style: italic;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
}

.build-summary {
  background: var(--bg-primary);
  border-left: 4px solid var(--accent-primary);
  padding: 16px;
  border-radius: 6px;
  margin-top: 16px;
}

.build-summary p {
  margin: 8px 0;
  line-height: 1.6;
  color: var(--text-secondary);
}

.build-summary strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* 스킬 빌드 */
.skill-priority h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.priority-list {
  list-style: none;
  counter-reset: priority;
  padding-left: 0;
  margin: 16px 0;
}

.priority-list li {
  counter-increment: priority;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: var(--bg-primary);
  border-radius: 6px;
  border-left: 4px solid var(--accent-primary);
  position: relative;
  padding-left: 50px;
}

.priority-list li::before {
  content: counter(priority);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent-primary);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.priority-list li strong {
  color: var(--accent-primary);
  font-weight: 700;
}

.skill-reason {
  background: var(--bg-primary);
  padding: 12px 16px;
  border-radius: 6px;
  margin-top: 16px;
  border-left: 3px solid var(--accent-secondary);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 파티 조합 */
.party-composition {
  display: grid;
  gap: 24px;
}

.synergy-group h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.synergy-heroes,
.counter-heroes {
  padding: 16px;
  background: var(--bg-primary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.guide-placeholder {
  color: var(--text-tertiary);
  font-style: italic;
  text-align: center;
  padding: 20px;
}

/* 육성 가이드 */
.growth-guide h3 {
  font-size: 1.1rem;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.growth-guide h3:first-child {
  margin-top: 0;
}

.growth-steps,
.awakening-priority {
  background: var(--bg-primary);
  padding: 16px 20px 16px 40px;
  border-radius: 8px;
  border-left: 4px solid var(--accent-primary);
  margin: 12px 0;
}

.growth-steps li,
.awakening-priority li {
  margin: 8px 0;
  line-height: 1.6;
  color: var(--text-secondary);
}

.investment-rating {
  margin-top: 16px;
  padding: 20px;
  background: var(--bg-primary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.investment-rating > p {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--accent-primary);
}

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
}

.pros h4,
.cons h4 {
  font-size: 1rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pros h4 {
  color: #10b981;
}

.pros h4::before {
  content: "✓";
  display: inline-block;
  width: 24px;
  height: 24px;
  background: #10b981;
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 24px;
  font-weight: 700;
}

.cons h4 {
  color: #ef4444;
}

.cons h4::before {
  content: "✗";
  display: inline-block;
  width: 24px;
  height: 24px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 24px;
  font-weight: 700;
}

.pros ul,
.cons ul {
  list-style: none;
  padding-left: 0;
}

.pros li,
.cons li {
  padding: 6px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pros li::before {
  content: "•";
  position: absolute;
  left: 8px;
  color: #10b981;
  font-weight: 700;
}

.cons li::before {
  content: "•";
  position: absolute;
  left: 8px;
  color: #ef4444;
  font-weight: 700;
}

/* FAQ */
.hero-faq {
  display: grid;
  gap: 16px;
}

.faq-item {
  background: var(--bg-primary);
  border-radius: 8px;
  padding: 16px 20px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.faq-question {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}

.faq-answer {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
  padding-left: 20px;
}

/* 가이드 푸터 */
.guide-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid var(--border-color);
  text-align: center;
}

.guide-update-info,
.guide-disclaimer {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  margin: 8px 0;
  line-height: 1.6;
}

.guide-update-info i {
  margin-right: 6px;
  color: var(--accent-primary);
}

.guide-disclaimer {
  font-style: italic;
  color: var(--text-quaternary);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .hero-guide {
    padding: 16px;
  }

  .guide-section {
    padding: 16px;
  }

  .guide-section-title {
    font-size: 1.2rem;
  }

  .guide-section-title i {
    font-size: 1.4rem;
  }

  .guide-overview {
    grid-template-columns: 1fr;
  }

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

  .pros-cons {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .build-title {
    font-size: 1.1rem;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* 다크 모드 최적화 */
@media (prefers-color-scheme: dark) {
  .equipment-item:hover {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
  }

  .faq-item:hover {
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
  }
}

/* ============================================
   가이드 페이지 공통 스타일 (Guide Page Common Styles)
   ============================================ */

.guide-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* Breadcrumb Navigation */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

.breadcrumb i {
  font-size: 0.8rem;
}

/* Page Header Large */
.page-header-large {
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 2px solid var(--border-color);
}

.page-title-large {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 16px 0;
  color: var(--text-primary);
}

.page-title-large i {
  font-size: 2.8rem;
  color: var(--accent-primary);
}

.page-subtitle-large {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto 16px auto;
}

.guide-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 20px;
  font-size: 0.95rem;
  color: var(--text-tertiary);
}

.guide-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.guide-meta i {
  color: var(--accent-primary);
}

/* Quick Navigation */
.quick-nav {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
  border: 1px solid var(--border-color);
}

.quick-nav h2 {
  margin: 0 0 20px 0;
  font-size: 1.3rem;
  color: var(--text-primary);
}

.quick-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.quick-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  transition: all 0.3s ease;
}

.quick-nav-item:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quick-nav-item i {
  font-size: 1.5rem;
  color: var(--accent-primary);
}

/* Info Boxes */
.info-box {
  padding: 20px 24px;
  border-radius: 10px;
  margin-bottom: 24px;
  border-left: 5px solid;
}

.info-box h3 {
  margin: 0 0 12px 0;
  font-size: 1.2rem;
}

.info-box p {
  margin: 12px 0;
  line-height: 1.6;
}

.info-box ul {
  margin: 12px 0;
  padding-left: 24px;
}

.info-box li {
  margin: 8px 0;
  line-height: 1.5;
}

.info-primary {
  background: rgba(59, 130, 246, 0.1);
  border-left-color: #3b82f6;
}

.info-warning {
  background: rgba(251, 191, 36, 0.1);
  border-left-color: #fbbf24;
}

.info-success {
  background: rgba(16, 185, 129, 0.1);
  border-left-color: #10b981;
}

.info-danger {
  background: rgba(239, 68, 68, 0.1);
  border-left-color: #ef4444;
}

/* Concept Grid */
.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.concept-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.concept-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border-color: var(--accent-primary);
}

.concept-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.concept-card h4 {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  color: var(--accent-primary);
}

.concept-card p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Step List */
.step-list {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.step-list li {
  counter-increment: step-counter;
  position: relative;
  padding: 20px 20px 20px 70px;
  margin-bottom: 16px;
  background: var(--bg-secondary);
  border-radius: 10px;
  border-left: 4px solid var(--accent-primary);
}

.step-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 20px;
  top: 20px;
  width: 36px;
  height: 36px;
  background: var(--accent-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.step-list strong {
  display: block;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.step-list p {
  margin: 8px 0 0 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Hero Recommendation Grid */
.hero-recommendation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.hero-rec-card {
  background: var(--bg-secondary);
  border: 2px solid;
  border-radius: 12px;
  padding: 24px;
}

.hero-rec-card.tier-ss {
  border-color: #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, var(--bg-secondary) 100%);
}

.hero-rec-card.tier-s {
  border-color: #10b981;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, var(--bg-secondary) 100%);
}

.tier-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.tier-ss .tier-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.tier-s .tier-badge {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.hero-rec-card h4 {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.hero-rec-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hero-rec-card li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
  color: var(--text-secondary);
  line-height: 1.5;
}

.hero-rec-card li:last-child {
  border-bottom: none;
}

/* Tip Box */
.tip-box {
  background: var(--bg-secondary);
  border-left: 4px solid var(--accent-secondary);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 24px 0;
}

.tip-box h4 {
  margin: 0 0 12px 0;
  color: var(--accent-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tip-box ul {
  margin: 8px 0;
  padding-left: 24px;
}

.tip-box li {
  margin: 8px 0;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 40px;
  margin: 24px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
}

.timeline-marker {
  position: absolute;
  left: -40px;
  top: 0;
  width: 70px;
  height: 32px;
  background: var(--accent-primary);
  color: white;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  z-index: 2;
}

.timeline-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  margin-left: 20px;
}

.timeline-content h4 {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.timeline-content ul {
  margin: 12px 0;
  padding-left: 24px;
}

.timeline-content li {
  margin: 8px 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.timeline-tip {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
  color: var(--text-tertiary);
  font-size: 0.9rem;
  font-style: italic;
}

/* Checklist */
.checklist {
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 24px;
  margin: 24px 0;
}

.checklist h4 {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: var(--bg-primary);
  border-radius: 6px;
  cursor: default;
  transition: background 0.2s;
}

.checklist-item:hover {
  background: var(--bg-tertiary);
}

.checklist-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: default;
}

.checklist-item span {
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Party Example */
.party-example {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.party-slot {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.party-slot:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
}

.party-role {
  display: inline-block;
  background: var(--accent-primary);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.party-slot p {
  margin: 12px 0;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.party-slot small {
  display: block;
  color: var(--text-tertiary);
  font-size: 0.85rem;
  margin-top: 8px;
}

/* Priority Table */
.priority-table {
  margin: 24px 0;
}

.priority-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 20px;
  padding: 20px;
  margin-bottom: 12px;
  border-radius: 10px;
  border-left: 5px solid;
}

.priority-row.priority-high {
  background: rgba(239, 68, 68, 0.1);
  border-left-color: #ef4444;
}

.priority-row.priority-medium {
  background: rgba(251, 191, 36, 0.1);
  border-left-color: #fbbf24;
}

.priority-row.priority-low {
  background: rgba(148, 163, 184, 0.1);
  border-left-color: #94a3b8;
}

.priority-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: white;
  background: var(--accent-primary);
  border-radius: 8px;
  padding: 8px;
}

.priority-row.priority-high .priority-label {
  background: #ef4444;
}

.priority-row.priority-medium .priority-label {
  background: #fbbf24;
}

.priority-row.priority-low .priority-label {
  background: #94a3b8;
}

.priority-content h4 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.priority-content p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Tips Grid */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.tip-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 24px;
}

.tip-card i {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.tip-card i.ph-check-circle {
  color: #10b981;
}

.tip-card i.ph-x-circle {
  color: #ef4444;
}

.tip-card h4 {
  margin: 0 0 16px 0;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.tip-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tip-card li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tip-card li::before {
  content: "•";
  position: absolute;
  left: 8px;
  font-weight: 700;
}

/* Mistake List */
.mistake-list {
  margin: 24px 0;
}

.mistake-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 20px;
  padding: 20px;
  margin-bottom: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.mistake-icon {
  font-size: 2.5rem;
  text-align: center;
}

.mistake-content h4 {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.mistake-content p {
  margin: 0;
  line-height: 1.6;
  color: var(--text-secondary);
}

.mistake-content strong {
  color: var(--text-primary);
}

/* Roadmap */
.roadmap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.roadmap-phase {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.roadmap-phase:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.roadmap-header {
  padding: 20px;
  color: white;
  text-align: center;
}

.roadmap-header.phase-1 {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.roadmap-header.phase-2 {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.roadmap-header.phase-3 {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.roadmap-header.phase-4 {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.roadmap-header h3 {
  margin: 0 0 4px 0;
  font-size: 1.5rem;
}

.roadmap-header span {
  font-size: 0.9rem;
  opacity: 0.9;
}

.roadmap-phase ul {
  list-style: none;
  padding: 20px;
  margin: 0;
}

.roadmap-phase li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text-secondary);
  line-height: 1.5;
}

.roadmap-phase li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: 700;
}

/* Help Box */
.help-box {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 2px solid var(--accent-primary);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  margin: 32px 0;
}

.help-box h3 {
  margin: 0 0 16px 0;
  font-size: 1.5rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.help-box h3 i {
  color: var(--accent-primary);
  font-size: 1.8rem;
}

.help-box p {
  margin: 0 0 24px 0;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.help-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.help-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  transition: all 0.3s ease;
}

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

.help-link i {
  font-size: 1.5rem;
  color: var(--accent-primary);
}

/* Responsive */
@media (max-width: 768px) {
  .guide-page {
    padding: 16px;
  }

  .page-title-large {
    font-size: 1.8rem;
    flex-direction: column;
    gap: 8px;
  }

  .page-title-large i {
    font-size: 2rem;
  }

  .page-subtitle-large {
    font-size: 1rem;
  }

  .quick-nav-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-recommendation-grid {
    grid-template-columns: 1fr;
  }

  .timeline {
    padding-left: 20px;
  }

  .timeline-marker {
    width: 60px;
    height: 28px;
    font-size: 0.75rem;
    left: -30px;
  }

  .timeline-content {
    margin-left: 10px;
  }

  .party-example {
    grid-template-columns: 1fr;
  }

  .priority-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

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

  .mistake-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mistake-icon {
    text-align: left;
  }

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

  .help-links {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   관련 영웅 섹션 (Related Heroes Section)
   ============================================ */

.related-heroes-section {
  max-width: 1200px;
  margin: 48px auto 32px auto;
  padding: 32px 24px;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

.related-heroes-section .section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--text-primary);
}

.related-heroes-section .section-title i {
  color: var(--accent-primary);
  font-size: 2rem;
}

.related-heroes-section .section-subtitle {
  color: var(--text-secondary);
  margin: 0 0 24px 0;
  font-size: 1.05rem;
}

.related-heroes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.related-hero-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.3s ease;
}

.related-hero-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border-color: var(--accent-primary);
}

.related-hero-portrait-wrap {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 aspect ratio */
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

.related-hero-portrait {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-hero-card:hover .related-hero-portrait {
  transform: scale(1.1);
}

.related-hero-portrait-wrap .rarity-border {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.related-hero-portrait-wrap .hero-type-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  z-index: 3;
}

.related-hero-info {
  padding: 16px;
}

.related-hero-name {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
}

.related-hero-meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.related-hero-meta .hero-type,
.related-hero-meta .hero-rarity {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .related-heroes-section {
    margin: 24px 16px;
    padding: 24px 16px;
  }

  .related-heroes-section .section-title {
    font-size: 1.4rem;
  }

  .related-heroes-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }

  .related-hero-info {
    padding: 12px;
  }

  .related-hero-name {
    font-size: 1rem;
  }
}
