/* ===== CSS Variables & Reset ===== */
:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1a1f2e;
  --bg-card-hover: #222840;
  --bg-input: #1e2436;
  --border-color: #2a3045;
  --border-light: #3a4060;
  --text-primary: #e8eaed;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-yellow: #f59e0b;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --gradient-primary: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --gradient-gold: linear-gradient(135deg, #f59e0b, #d97706);
  --gradient-green: linear-gradient(135deg, #10b981, #059669);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--accent-blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-blue-hover); }

img { max-width: 100%; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}
.btn-primary:hover { box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}
.btn-outline:hover { border-color: var(--accent-blue); color: var(--accent-blue); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-card); }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-full { width: 100%; justify-content: center; }

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo i { font-size: 24px; }
.logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-card); }
.nav-link.active { color: var(--accent-blue); background: rgba(59, 130, 246, 0.1); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn-auth-mobile {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-auth-mobile:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.1);
}

#auth-buttons { display: flex; gap: 8px; }

.user-menu-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s;
}
.user-menu-toggle:hover { background: var(--bg-card-hover); }

.user-avatar-small {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: white;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  min-width: 180px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: none;
}
.user-dropdown.show { display: block; }
.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.2s;
}
.user-dropdown a:hover { background: var(--bg-card-hover); color: var(--text-primary); }

#user-menu { position: relative; }

/* ===== Main Content ===== */
.main-content {
  margin-top: 64px;
  min-height: calc(100vh - 64px);
}

.page { display: none; }
.page.active { display: block; }

.page-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  padding-top: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-title i { color: var(--accent-blue); }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 100px 24px 80px;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 48px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 20px;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Hero Banner ===== */
.hero-banner {
  text-align: center;
  margin-top: 16px;
}

.hero-banner + .hero-banner {
  margin-top: 10px;
}

.hero-banner img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* ===== Ticker (TradingView Widget) ===== */
.ticker-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.ticker-section .tradingview-widget-container {
  height: auto;
}

/* ===== 투자 인사이트 위젯 ===== */
.invest-widgets-section {
  padding: 32px 0 24px;
}
.fear-greed-card-wrap {
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.fear-greed-card-wrap .invest-widget-card {
  width: 100%;
}
.invest-widget-header .fear-greed-refresh {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-green);
  background: rgba(34, 197, 94, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
}
.fear-greed-desc-wrap {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}
.fear-greed-explanation {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}
.fear-greed-explanation strong { color: var(--text-secondary); }
.invest-widget-vix .invest-widget-header i { color: #f97316; }
.invest-widgets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.invest-widget-card.invest-widget-btcd .invest-widget-header i { color: #f7931a; }
.invest-widget-card.invest-widget-mktcap .invest-widget-header i { color: var(--accent-blue); }
.invest-widget-card.invest-widget-ethd .invest-widget-header i { color: #627eea; }
.text-green { color: #22c55e !important; }
.text-red { color: #ef4444 !important; }
.invest-widget-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}
.invest-widget-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.invest-widget-header i {
  color: var(--accent-purple);
  font-size: 18px;
}
.invest-widget-body { min-height: 80px; }
.invest-widget-error { font-size: 13px; color: var(--text-muted); }
.spinner-small {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.fear-greed-value { }
.fear-greed-bar {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}
.fear-greed-fill {
  height: 100%;
  width: var(--filler, 50%);
  background: linear-gradient(90deg, #ef4444, #eab308, #22c55e);
  border-radius: 4px;
  transition: width 0.5s ease;
}
.fear-greed-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.fear-greed-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}
.fear-greed-label {
  font-size: 13px;
  color: var(--text-secondary);
}
.fear-greed-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.calendar-hotlist-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.economic-calendar-wrap,
.hotlist-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  overflow: hidden;
}
.hotlist-wrap .calendar-title i { color: var(--accent-yellow); }
#hotlist-widget-home { min-height: 400px; }
.calendar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.calendar-title i { color: var(--accent-blue); }
#tv-econ-calendar { min-height: 400px; }

/* ===== Section Titles ===== */
.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title i { color: var(--accent-blue); }

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

/* ===== Mini Charts Grid ===== */
.mini-charts-section {
  padding: 60px 0;
}

.mini-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

.mini-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.3s;
}
.mini-chart-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.mini-chart-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px solid var(--border-color);
}

.market-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.market-badge.stock { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.market-badge.nasdaq { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.market-badge.crypto { background: rgba(245, 158, 11, 0.15); color: var(--accent-yellow); }
.market-badge.gold { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.market-badge.forex { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }

.tradingview-widget-container {
  height: 220px;
}

/* ===== Crypto Table ===== */
.crypto-table-section {
  padding: 0 0 60px;
}

.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.crypto-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.crypto-table th {
  background: var(--bg-secondary);
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.crypto-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.crypto-table tr:hover {
  background: var(--bg-card-hover);
}

.crypto-table .coin-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.crypto-table .coin-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.crypto-table .coin-name { font-weight: 600; }
.crypto-table .coin-symbol { color: var(--text-muted); font-size: 12px; text-transform: uppercase; }

.price-up { color: var(--accent-green); }
.price-down { color: var(--accent-red); }

.sparkline-canvas {
  width: 120px;
  height: 40px;
}

.loading-cell {
  text-align: center;
  padding: 40px !important;
  color: var(--text-muted);
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-light);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

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

/* ===== Recent Posts ===== */
.recent-posts-section {
  padding: 0 0 80px;
}

.posts-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

@media (max-width: 768px) {
  .posts-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
    justify-items: center !important;
  }
  .posts-grid .ant-egg-wrap {
    flex: unset !important;
    transform: none !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }
  .posts-grid .ant-egg { width: 100px !important; height: 135px !important; }
  .posts-grid .ant-egg-title { font-size: 10px !important; }
  .posts-grid .ant-egg-cat { font-size: 8px !important; }
  .posts-grid .ant-egg-meta { font-size: 8px !important; }
  .posts-grid .ant-egg-stats { font-size: 8px !important; gap: 4px !important; }
  .posts-grid .ant-egg-stats span { font-size: 8px !important; }
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s;
}
.post-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.post-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.post-card-category {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.cat-stock { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.cat-crypto { background: rgba(245, 158, 11, 0.15); color: var(--accent-yellow); }
.cat-forex { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.cat-gold { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.cat-nasdaq { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.cat-general { background: rgba(107, 114, 128, 0.15); color: var(--text-secondary); }

.post-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.post-card-stats {
  display: flex;
  gap: 12px;
}

.post-card-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== Charts Page ===== */
.chart-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.chart-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-family);
  white-space: nowrap;
}
.chart-tab:hover { border-color: var(--border-light); color: var(--text-primary); }
.chart-tab.active {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.main-chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 30px;
}

.chart-widgets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

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

.widget-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.widget-card h3 i { color: var(--accent-blue); }

/* ===== Community Page ===== */
.community-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  margin-bottom: 24px;
}
.community-header .page-title { margin-bottom: 0; padding-top: 0; }

.category-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
  flex-wrap: wrap;
}

.cat-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-family);
  white-space: nowrap;
}
.cat-btn:hover { border-color: var(--border-light); color: var(--text-primary); }
.cat-btn.active { background: rgba(59, 130, 246, 0.1); border-color: var(--accent-blue); color: var(--accent-blue); }

.search-bar {
  position: relative;
  margin-bottom: 24px;
}

.search-bar i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-bar input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-family);
  outline: none;
  transition: border-color 0.2s;
}
.search-bar input:focus { border-color: var(--accent-blue); }
.search-bar input::placeholder { color: var(--text-muted); }

/* Posts List */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.post-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid var(--border-color);
}
.post-row:last-child { border-bottom: none; }
.post-row:hover { background: var(--bg-card-hover); }

.post-row-category {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  min-width: 50px;
  text-align: center;
}

.post-row-main { overflow: hidden; }

.post-row-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-row-info {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
}

.post-row-stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}
.post-row-stats span { display: flex; align-items: center; gap: 4px; }

.posts-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 15px;
}
.posts-empty i { font-size: 48px; display: block; margin-bottom: 16px; opacity: 0.3; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding-bottom: 40px;
}

.page-btn {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-family);
}
.page-btn:hover { border-color: var(--border-light); }
.page-btn.active { background: var(--accent-blue); border-color: var(--accent-blue); color: white; }

/* ===== Post Detail ===== */
.post-detail {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  margin-bottom: 24px;
}

.post-detail-header {
  margin-bottom: 20px;
}

.post-detail-category {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.post-detail-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.4;
}

.post-detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.post-detail-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--text-secondary);
}

.post-detail-content {
  padding: 24px 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.post-detail-actions {
  display: flex;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.like-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-family);
}
.like-btn:hover { border-color: var(--accent-red); color: var(--accent-red); }
.like-btn.liked { background: rgba(239, 68, 68, 0.1); border-color: var(--accent-red); color: var(--accent-red); }

/* Comments */
.comments-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.comments-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
}

.comment-form {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.comment-form input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-family);
  outline: none;
}
.comment-form input:focus { border-color: var(--accent-blue); }
.comment-form input::placeholder { color: var(--text-muted); }

.comment-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}
.comment-item:last-child { border-bottom: none; }

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: white;
  flex-shrink: 0;
}

.comment-body { flex: 1; }
.comment-author {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}
.comment-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 8px;
  font-weight: 400;
}
.comment-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.no-comments {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ===== Write Post ===== */
.write-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  margin-bottom: 40px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-family);
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--accent-blue); }
.form-input::placeholder { color: var(--text-muted); }

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
select.form-input option { background: var(--bg-card); color: var(--text-primary); }

.form-textarea {
  resize: vertical;
  min-height: 200px;
  line-height: 1.7;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.form-error {
  color: var(--accent-red);
  font-size: 13px;
  margin-bottom: 12px;
  min-height: 20px;
}

/* ===== Chat ===== */
.chat-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  height: calc(100vh - 180px);
  margin-bottom: 40px;
}

.chat-rooms {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

.chat-rooms h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.room-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.room-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-family);
  text-align: left;
}
.room-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.room-btn.active { background: rgba(59, 130, 246, 0.1); border-color: var(--accent-blue); color: var(--accent-blue); }

/* ===== 라이브 방송 ===== */
.live-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  min-height: 480px;
}
.live-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
}
.live-sidebar h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.live-stream-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.live-stream-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-family);
  text-align: left;
}
.live-stream-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-purple);
  color: var(--text-primary);
}
.live-stream-btn.active {
  background: rgba(139, 92, 246, 0.12);
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}
.live-stream-btn i {
  font-size: 18px;
  flex-shrink: 0;
}
.live-stream-btn-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.live-stream-btn-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-stream-btn-meta {
  font-size: 11px;
  color: var(--text-muted);
}
.live-add-info {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 10px;
  background: rgba(139, 92, 246, 0.06);
  border-radius: var(--radius-sm);
}
.live-add-info i { margin-right: 4px; }
.live-sidebar-divider {
  height: 1px;
  background: var(--border-color);
  margin: 14px 0;
}
.live-chart-btn-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.live-chart-btn i {
  color: var(--accent-blue);
}
.live-chart-btn.active {
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}
.live-main {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.live-player-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #0a0a0f;
}
.live-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
}
.live-placeholder i {
  font-size: 64px;
  opacity: 0.4;
}
.live-placeholder p { font-size: 14px; }
.live-embed-container {
  position: absolute;
  inset: 0;
}
.live-embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.live-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  font-size: 14px;
}
.live-title { font-weight: 600; color: var(--text-primary); }
.live-meta { font-size: 12px; color: var(--text-muted); }

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

/* 라이브 채팅 섹션 */
.chat-room-label {
  color: var(--accent-blue);
  font-weight: 700;
}
.live-chat-section {
  margin-top: 32px;
  margin-bottom: 40px;
}
.live-chat-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 400px;
}
.live-chat-wrap .chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.live-chat-wrap .chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}
.live-chat-wrap .chat-input-area input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-family);
  outline: none;
}
.live-chat-wrap .chat-input-area input:focus {
  border-color: var(--accent-blue);
}

.chat-main {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  display: flex;
  gap: 10px;
  max-width: 80%;
}

.chat-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: white;
  flex-shrink: 0;
}

.chat-msg-bubble {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 12px 12px 12px 4px;
  padding: 10px 14px;
}

.chat-msg-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 4px;
}

.chat-msg-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-msg-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.chat-input-area {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
}

.chat-input-area input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-family);
  outline: none;
}
.chat-input-area input:focus { border-color: var(--accent-blue); }
.chat-input-area input::placeholder { color: var(--text-muted); }

.chat-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 20px;
  font-size: 14px;
}
.chat-empty i { font-size: 48px; display: block; margin-bottom: 16px; opacity: 0.3; }

/* ===== Modals ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-overlay.show { display: flex; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s ease;
}

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

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

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-header h3 i { color: var(--accent-blue); }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.modal-close:hover { color: var(--text-primary); }

.modal-body {
  padding: 24px;
}

.modal-switch {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 16px;
}

/* Social Login */
.social-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  gap: 12px;
}

.social-divider::before,
.social-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.social-divider span {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.btn-google {
  background: #ffffff;
  color: #3c4043;
  border: 1px solid #dadce0;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 20px;
  transition: all 0.2s;
}

.btn-google:hover {
  background: #f7f8f8;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

.btn-google svg {
  flex-shrink: 0;
}

/* ===== Toast ===== */
#toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: 14px;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
}

.toast.success { border-left: 4px solid var(--accent-green); }
.toast.error { border-left: 4px solid var(--accent-red); }
.toast.info { border-left: 4px solid var(--accent-blue); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 8px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 14px;
}
.footer-links a:hover { color: var(--text-primary); }

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== 사주분석 페이지 ===== */
.saju-page-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.saju-input-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}
.saju-input-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.saju-input-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(99,102,241,0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--accent-purple);
  flex-shrink: 0;
}
.saju-input-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.saju-input-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}
.saju-form-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.saju-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}
.saju-calendar-type {
  display: flex;
  gap: 6px;
}
.cal-btn {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.cal-btn:hover { border-color: var(--accent-purple); color: var(--text-primary); }
.cal-btn.active { background: rgba(139, 92, 246, 0.15); border-color: var(--accent-purple); color: var(--accent-purple); }

.saju-result-page {
  min-height: 400px;
}
.saju-placeholder-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}
.saju-placeholder-page p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 24px;
}
.saju-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 8px;
}
.saju-feature {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.saju-feature i {
  color: var(--accent-purple);
  font-size: 14px;
}

/* 사주 결과 그리드 */
.saju-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.saju-result-full {
  grid-column: 1 / -1;
}
.saju-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  flex-shrink: 0;
}
.saju-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.saju-field input, .saju-field select {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
}
.saju-field input:focus, .saju-field select:focus {
  border-color: var(--accent-purple);
  outline: none;
}
.saju-gender {
  display: flex;
  gap: 8px;
}
.gender-btn {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.gender-btn:hover { border-color: var(--accent-purple); color: var(--text-primary); }
.gender-btn.active { background: rgba(139, 92, 246, 0.15); border-color: var(--accent-purple); color: var(--accent-purple); }

.saju-result {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}
.saju-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-muted);
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
}

/* 사주 결과 카드 */
.saju-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}
.saju-pillar {
  text-align: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  border: 1px solid var(--border-color);
}
.saju-pillar-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
}
.saju-pillar-hanja {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}
.saju-pillar-hangul {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.saju-element-wood { color: #22c55e; }
.saju-element-fire { color: #ef4444; }
.saju-element-earth { color: #eab308; }
.saju-element-metal { color: #f8fafc; }
.saju-element-water { color: #3b82f6; }

.saju-section {
  margin-bottom: 14px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-purple);
}
.saju-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-purple);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.saju-section-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.saju-score {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}
.saju-score-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-card);
  border-radius: 4px;
  overflow: hidden;
}
.saju-score-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}
.saju-score-label {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 65px;
}
.saju-score-value {
  font-size: 12px;
  font-weight: 700;
  min-width: 35px;
  text-align: right;
}

.saju-element-chart {
  display: flex;
  justify-content: space-around;
  margin: 10px 0;
  gap: 4px;
}
.saju-el-item {
  text-align: center;
  flex: 1;
}
.saju-el-icon {
  font-size: 20px;
  margin-bottom: 2px;
}
.saju-el-name {
  font-size: 11px;
  color: var(--text-muted);
}
.saju-el-count {
  font-size: 14px;
  font-weight: 700;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header { position: fixed; top: 0; }
  .header-inner {
    padding: 0 8px;
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    gap: 0;
  }
  .logo { font-size: 18px; gap: 6px; }
  .logo-img { width: 28px; height: 28px; }
  .header-actions { order: 2; }
  .btn-auth-desktop { display: none !important; }
  .btn-auth-mobile { display: flex !important; }
  .nav-links {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    order: 3;
    gap: 2px 0;
    border-top: 1px solid var(--border-color);
    padding: 4px 0;
    justify-content: center;
    overflow: visible;
  }
  .nav-link {
    padding: 6px 8px;
    font-size: 11px;
    gap: 3px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .nav-link i { font-size: 12px; }
  main { padding-top: 72px !important; }
  .hero {
    padding: 24px 16px 40px;
  }
  .hero h1 { font-size: 28px; margin-bottom: 12px; }
  .hero p { font-size: 14px; margin-bottom: 20px; }
  .hero-buttons { gap: 10px; }
  .hero-banner { margin-top: 12px; }
  .hero-banner + .hero-banner { margin-top: 8px; }
  .invest-widgets-grid { grid-template-columns: repeat(2, 1fr); }
  .invest-widget-card { padding: 16px; }
  .fear-greed-card-wrap { grid-template-columns: 1fr; }
  .calendar-hotlist-row { grid-template-columns: 1fr; }
  .economic-calendar-wrap, .hotlist-wrap { padding: 16px; }
  #tv-econ-calendar { min-height: 320px; }
  #hotlist-widget-home { min-height: 320px; }
  .mini-charts-grid { grid-template-columns: 1fr; }
  .chart-widgets-grid { grid-template-columns: 1fr; }
  .live-layout { grid-template-columns: 1fr; }
  .live-sidebar { order: 2; }
  .live-main { order: 1; min-height: 240px; }
  .live-chat-wrap { height: 350px; }
  #live-tradingview-chart { height: 360px !important; }
  /* 사주 입력 폼 모바일 정렬 */
  .saju-input-card { padding: 16px; }
  .saju-input-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
  }
  .saju-input-header .saju-input-icon { width: 40px; height: 40px; font-size: 18px; }
  .saju-input-header h3 { font-size: 16px; }
  .saju-input-header p { font-size: 12px; line-height: 1.5; }
  .saju-form-rows { gap: 16px; }
  .saju-row {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .saju-row .saju-field {
    flex: none !important;
    width: 100%;
    min-width: 0;
  }
  /* 2행: 달력·년·월·일 - 그리드로 깔끔 정렬 */
  .saju-form-rows > .saju-row:nth-of-type(2) {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .saju-form-rows > .saju-row:nth-of-type(2) .saju-field:nth-child(1),
  .saju-form-rows > .saju-row:nth-of-type(2) .saju-field:nth-child(2) { grid-column: 1 / -1; }
  .saju-form-rows > .saju-row:nth-of-type(2) .saju-field:nth-child(3),
  .saju-form-rows > .saju-row:nth-of-type(2) .saju-field:nth-child(4) { grid-column: span 1; }
  .saju-gender, .saju-calendar-type {
    display: flex;
    gap: 8px;
    width: 100%;
  }
  .gender-btn, .cal-btn {
    flex: 1;
    padding: 10px 12px;
    font-size: 13px;
    min-height: 42px;
  }
  .saju-field input, .saju-field select {
    min-height: 42px;
    padding: 10px 12px;
  }
  .saju-field label {
    font-size: 11px;
    margin-bottom: 6px;
  }
  .saju-form-rows .btn-primary {
    min-height: 46px;
    font-size: 15px;
  }
  .saju-features { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .saju-feature { padding: 10px 12px; font-size: 12px; }
  .saju-placeholder-page { padding: 40px 16px; }
  .saju-result-grid { grid-template-columns: 1fr; gap: 12px; }
  .saju-personality-invest-row { grid-template-columns: 1fr !important; }
  .saju-section { padding: 12px 14px; }
  .saju-section-title { font-size: 14px; }
  .saju-section-body {
    font-size: 13px;
    line-height: 1.6;
    word-break: keep-all;
    overflow-wrap: break-word;
  }
  .community-header { flex-direction: column; gap: 16px; align-items: flex-start; }
  .post-detail { padding: 20px; }
  .modal { margin: 16px; }
  .posts-grid { grid-template-columns: 1fr; }
  .hero-banner img { width: 100% !important; height: auto !important; }
  .container { padding: 0 12px; }
  .page-title { font-size: 18px; margin-bottom: 16px; padding-top: 8px; }
}

/* 초소형 화면 (480px 이하) */
@media (max-width: 480px) {
  main { padding-top: 64px !important; }
  .invest-widgets-grid { grid-template-columns: 1fr; }
  .hero { padding: 20px 12px 32px; }
  .saju-input-card { padding: 12px; }
  .saju-form-rows > .saju-row:nth-of-type(2) { grid-template-columns: 1fr; }
  .saju-form-rows > .saju-row:nth-of-type(2) .saju-field:nth-child(3),
  .saju-form-rows > .saju-row:nth-of-type(2) .saju-field:nth-child(4) { grid-column: 1 / -1; }
  .gender-btn, .cal-btn { padding: 10px 8px; font-size: 12px; }
  .container { padding: 0 10px; }
}

/* ===== 국가 경제지표 대시보드 ===== */

/* 상단 탭 바 */
.krd-tab-bar {
  display: flex;
  gap: 4px;
  padding: 8px 0;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.krd-tab {
  padding: 6px 14px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.krd-tab:hover {
  background: #e8f5f3;
  color: #0d9488;
  border-color: #0d9488;
}
.krd-tab.active {
  background: #0d9488;
  color: #fff;
  border-color: #0d9488;
}

/* 요약 배너 */
.krd-summary-bar {
  display: flex;
  gap: 0;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 0;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.krd-summary-bar::-webkit-scrollbar { display: none; }

.krd-sb-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 16px;
  border-right: 1px solid var(--border-color);
  min-width: 100px;
  flex-shrink: 0;
}
.krd-sb-item:last-child { border-right: none; }

.krd-sb-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 2px;
}
.krd-sb-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}
.krd-sb-unit {
  font-size: 10px;
  color: var(--text-muted);
}

/* 3컬럼 메인 */
.krd-columns {
  column-count: 3;
  column-gap: 14px;
}

/* 섹션 패널 */
.krd-section {
  break-inside: avoid;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 14px;
  overflow: hidden;
}

.krd-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, rgba(13,148,136,0.06), rgba(13,148,136,0.02));
}

.krd-section-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d9488;
  color: #fff;
  font-size: 12px;
  flex-shrink: 0;
}

.krd-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.krd-section-source {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

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

/* 각 지표 행 */
.krd-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.1s;
}
.krd-item:last-child { border-bottom: none; }
.krd-item:hover { background: rgba(13,148,136,0.03); }

.krd-item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.krd-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.krd-item-date {
  font-size: 10px;
  color: var(--text-muted);
}

.krd-item-right {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-shrink: 0;
  text-align: right;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.krd-item-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.krd-item-unit {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

/* 물가 상세 카드 (참고이미지 포맷) */
.krd-item-price {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px !important;
  border-bottom: 1px solid var(--border-color);
}
.krd-price-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.krd-pname {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.krd-pname-sub {
  color: var(--text-secondary);
}
.krd-pval {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.krd-price-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.krd-pdate {
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 2px;
}
.krd-price-chg {
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-items: flex-end;
}
.krd-chg-row {
  display: flex;
  gap: 6px;
  font-size: 11px;
  align-items: baseline;
}
.krd-chg-label {
  color: var(--text-muted);
  font-weight: 500;
  min-width: 28px;
}
.krd-chg-abs {
  font-weight: 600;
  min-width: 44px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.krd-chg-pct {
  font-weight: 600;
  min-width: 56px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.krd-chg-abs.up, .krd-chg-pct.up { color: #ef4444; }
.krd-chg-abs.down, .krd-chg-pct.down { color: #3b82f6; }

/* 서머리바 YoY 표시 */
.krd-sb-yoy {
  font-size: 11px;
  font-weight: 600;
  margin-left: 2px;
}
.krd-sb-yoy.up { color: #ef4444; }
.krd-sb-yoy.down { color: #3b82f6; }

/* 푸터 */
.krd-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 16px;
  padding: 12px;
}
.krd-footer i { margin-right: 4px; }

/* 반응형 */
@media (max-width: 1024px) {
  .krd-columns { column-count: 2; }
}
@media (max-width: 768px) {
  .krd-columns { column-count: 1; }
  .krd-summary-bar { flex-wrap: wrap; }
  .krd-sb-item { min-width: 80px; padding: 4px 10px; }
}
@media (max-width: 480px) {
  .krd-tab { font-size: 11px; padding: 5px 10px; }
}

/* ===== 코스피 섹터별 종목 ===== */
.kospi-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; flex-wrap: wrap; gap: 8px;
}
.kospi-header h2 { font-size: 1.3rem; margin: 0; }
.kospi-update-info { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: #bbb; }
.kospi-update-info .btn { font-size: .78rem; padding: 4px 10px; border-radius: 6px; background: #2a2d35; border: 1px solid #555; color: #ddd; cursor: pointer; transition: all .2s; }
.kospi-update-info .btn:hover { background: #3a3f4a; color: #fff; border-color: #7aa2f7; }

/* 핫종목 티커 */
.kospi-ticker-bar {
  overflow: hidden; position: relative;
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px;
  padding: 8px 0; margin-bottom: 12px; white-space: nowrap;
}
.kospi-ticker-inner {
  display: inline-flex; gap: 20px; animation: kospiTickerScroll 30s linear infinite;
  padding: 0 16px;
}
@keyframes kospiTickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.kospi-ticker-item { font-size: .82rem; font-weight: 500; }
.kospi-ticker-item b { margin-right: 4px; }

/* 섹터 탭 (미국지표 스타일) */
.kospi-sector-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 0;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.kospi-tab {
  padding: 6px 14px;
  border-radius: 4px;
  border: 1px solid #555;
  background: #2a2d35;
  color: #ccc;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.kospi-tab:hover {
  background: #3a3f4a;
  color: #fff;
  border-color: #7aa2f7;
}
.kospi-tab.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
@media (max-width: 768px) {
  .kospi-tab { font-size: 11px; padding: 5px 10px; }
}

/* 섹터 카드 그리드 */
.kospi-sectors-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 1200px) { .kospi-sectors-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .kospi-sectors-grid { grid-template-columns: 1fr; } }

.kospi-sector-card {
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px;
  padding: 14px 16px; min-width: 0;
}
.kospi-sector-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; padding-bottom: 8px; border-bottom: 2px solid var(--border-color);
}
.kospi-sector-name { font-weight: 700; font-size: .92rem; }
.kospi-sector-name small { font-weight: 400; color: #999; font-size: .75rem; }
.kospi-sector-link {
  font-size: .72rem; color: var(--primary); text-decoration: none;
  border: 1px solid var(--primary); border-radius: 4px; padding: 2px 8px;
}

/* 종목 그리드 */
.kospi-stock-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 8px;
}
@media (max-width: 480px) { .kospi-stock-grid { grid-template-columns: repeat(2, 1fr); } }

.kospi-stock-item {
  display: flex; flex-direction: column; padding: 6px 4px; gap: 2px;
}
.kospi-stock-item:hover { background: #2a2f3a; border-radius: 6px; }
.kospi-stock-name { font-size: .78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kospi-stock-change { font-size: .76rem; font-weight: 600; }

/* 색상 */
.kospi-up { color: #e74c3c; }
.kospi-down { color: #3498db; }
.kospi-flat { color: #888; }

.kospi-loading { text-align: center; padding: 60px 0; font-size: 1rem; color: #999; }
.kospi-footer { text-align: center; padding: 16px 0; margin-top: 12px; font-size: .75rem; color: #888; }

/* ===== 미국 경제지표 대시보드 ===== */

/* 탭 바 */
.usd-tab-bar {
  display: flex;
  gap: 4px;
  padding: 8px 0;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.usd-tab {
  padding: 6px 14px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.usd-tab:hover {
  background: #eff6ff;
  color: #2563eb;
  border-color: #2563eb;
}
.usd-tab.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

/* 요약 배너 */
.usd-summary-bar {
  display: flex;
  gap: 0;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 0;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.usd-summary-bar::-webkit-scrollbar { display: none; }

.usd-sb-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 16px;
  border-right: 1px solid var(--border-color);
  min-width: 100px;
  flex-shrink: 0;
}
.usd-sb-item:last-child { border-right: none; }

.usd-sb-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 2px;
}
.usd-sb-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}
.usd-sb-chg {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}
.usd-sb-chg.up { color: #ef4444; }
.usd-sb-chg.down { color: #3b82f6; }

/* 3컬럼 */
.usd-columns {
  column-count: 3;
  column-gap: 14px;
}

.usd-section {
  break-inside: avoid;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 14px;
  overflow: hidden;
}

.usd-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, rgba(37,99,235,0.06), rgba(37,99,235,0.02));
}

.usd-section-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  flex-shrink: 0;
}

.usd-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.usd-section-source {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

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

/* 각 지표 행 */
.usd-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.1s;
}
.usd-item:last-child { border-bottom: none; }
.usd-item:hover { background: rgba(37,99,235,0.03); }

.usd-item-left {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.usd-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.usd-item-date {
  font-size: 10px;
  color: var(--text-muted);
}

.usd-item-id {
  font-family: 'Consolas', monospace;
  font-size: 9px;
  color: #94a3b8;
  margin-left: 4px;
}

.usd-item-right {
  display: flex;
  align-items: baseline;
  gap: 3px;
  flex-shrink: 0;
  text-align: right;
}

.usd-item-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.usd-item-unit {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

.usd-item-chg {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 70px;
  flex-shrink: 0;
}
.usd-item-chg.up { color: #ef4444; }
.usd-item-chg.down { color: #3b82f6; }
.usd-item-pct { font-size: 10px; font-weight: 500; }

/* 푸터 */
.usd-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 16px;
  padding: 12px;
}
.usd-footer i { margin-right: 4px; }

.spinner-small {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 반응형 */
@media (max-width: 1024px) {
  .usd-columns { column-count: 2; }
}
@media (max-width: 768px) {
  .usd-columns { column-count: 1; }
  .usd-summary-bar { flex-wrap: wrap; }
  .usd-sb-item { min-width: 80px; padding: 4px 10px; }
  .usd-item { grid-template-columns: 1fr auto; }
  .usd-item-chg { display: none; }
}
@media (max-width: 480px) {
  .usd-tab { font-size: 11px; padding: 5px 10px; }
}

/* ===== 주식 차트 모달 ===== */
.stock-modal-overlay { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,.75); z-index:9999; justify-content:center; align-items:center; }
.stock-modal { position:relative; background:#1a1d24; border-radius:14px; width:92%; max-width:700px; max-height:92vh; overflow-y:auto; box-shadow:0 20px 60px rgba(0,0,0,.6); padding:0; }
.stock-modal-close { position:absolute; top:10px; right:14px; background:none; border:none; color:#888; font-size:2rem; cursor:pointer; line-height:1; z-index:10; }
.stock-modal-close:hover { color:#fff; }
.stock-modal-header { padding:20px 24px 12px; }
.stock-modal-info { display:flex; flex-direction:column; gap:4px; }
.stock-modal-date { font-size:0.78rem; color:#888; }
.stock-modal-name { font-size:1.3rem; font-weight:700; color:#fff; margin:4px 0 6px; }
.stock-modal-price-row { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.stock-modal-price { font-size:1.8rem; font-weight:700; color:#fff; }
.stock-modal-unit { font-size:0.9rem; color:#999; margin-left:2px; }
.stock-modal-cap { font-size:0.78rem; color:#777; margin-left:8px; }
.stock-modal-change { font-size:0.85rem; font-weight:600; margin-top:4px; }
.sdm-up { color:#e74c3c; }
.sdm-down { color:#3498db; }
.stock-modal-periods { display:flex; gap:6px; padding:10px 24px; border-top:1px solid #2a2d35; border-bottom:1px solid #2a2d35; background:#15171d; }
.sdm-period { padding:6px 14px; border-radius:6px; border:1px solid #444; background:#22252d; color:#bbb; font-size:0.82rem; font-weight:600; cursor:pointer; transition:all .2s; }
.sdm-period:hover { background:#2e3140; color:#fff; border-color:#666; }
.sdm-period.active { background:#3b82f6; color:#fff; border-color:#3b82f6; }
.stock-modal-chart-wrap { position:relative; width:100%; height:320px; padding:8px 0; }
.stock-modal-chart-wrap canvas { width:100%; height:100%; display:block; }
.stock-modal-volume-wrap { width:100%; height:100px; padding:0 0 8px; }
.stock-modal-volume-wrap canvas { width:100%; height:100%; display:block; }
.stock-modal-tooltip { position:absolute; background:rgba(30,32,40,.95); border:1px solid #444; border-radius:8px; padding:8px 12px; font-size:0.78rem; color:#ddd; pointer-events:none; z-index:10; line-height:1.5; white-space:nowrap; }
.stock-modal-details { padding:12px 24px 16px; font-size:0.8rem; color:#999; }
@media(max-width:600px) { .stock-modal { width:98%; max-width:100%; } .stock-modal-chart-wrap { height:250px; } .stock-modal-volume-wrap { height:70px; } .stock-modal-name { font-size:1.1rem; } .stock-modal-price { font-size:1.4rem; } }

/* ===== BTC ATS 차트 ===== */
.ats-chart-wrapper { background:#0d0f19; border-radius:16px; overflow:hidden; border:1px solid rgba(255,255,255,.06); box-shadow:0 4px 32px rgba(0,0,0,.4); }

.ats-header { padding:0; border-bottom:1px solid rgba(255,255,255,.06); }

.ats-header-top { display:flex; justify-content:space-between; align-items:center; padding:20px 24px 14px; flex-wrap:wrap; gap:16px; }

.ats-symbol-info { display:flex; align-items:center; gap:14px; }

.ats-coin-icon { width:40px; height:40px; border-radius:50%; background:linear-gradient(135deg,#f7931a,#e8860c); display:flex; align-items:center; justify-content:center; box-shadow:0 0 20px rgba(247,147,26,.25); flex-shrink:0; }
.ats-coin-icon svg { display:block; }

.ats-title-group { display:flex; flex-direction:column; gap:2px; }

.ats-title-row { display:flex; align-items:center; gap:10px; }

.ats-symbol { font-size:1.4rem; font-weight:800; color:#fff; letter-spacing:0.5px; }

.ats-badge { font-size:0.6rem; font-weight:700; color:#f7931a; background:rgba(247,147,26,.12); padding:2px 8px; border-radius:4px; letter-spacing:1px; text-transform:uppercase; }

.ats-subtitle { font-size:0.78rem; color:#555; font-weight:400; }

.ats-price-group { text-align:right; display:flex; flex-direction:column; align-items:flex-end; gap:4px; }

.ats-price { font-size:1.9rem; font-weight:800; color:#fff; letter-spacing:-0.5px; font-family:'SF Mono',Consolas,'Cascadia Code',monospace; line-height:1; }

.ats-change-wrap { display:flex; align-items:center; gap:6px; }

.ats-change { font-size:0.85rem; font-weight:700; padding:3px 10px; border-radius:6px; line-height:1.3; }
.ats-up { color:#00e676; background:rgba(0,230,118,.1); }
.ats-down { color:#ff1744; background:rgba(255,23,68,.1); }

.ats-header-bottom { display:flex; justify-content:space-between; align-items:center; padding:10px 24px 14px; flex-wrap:wrap; gap:12px; border-top:1px solid rgba(255,255,255,.04); background:rgba(255,255,255,.01); }

.ats-meta-stats { display:flex; gap:24px; }

.ats-meta-item { display:flex; flex-direction:column; gap:2px; }

.ats-meta-label { font-size:0.65rem; color:#555; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; }

.ats-meta-value { font-size:0.82rem; color:#aaa; font-weight:600; font-family:'SF Mono',Consolas,monospace; }
.ats-meta-high { color:#00e676; }
.ats-meta-low { color:#ff1744; }

.ats-controls { display:flex; gap:8px; }
.ats-period-tabs { display:flex; gap:3px; background:rgba(255,255,255,.03); border-radius:8px; padding:3px; }
.ats-period-btn { padding:6px 14px; border-radius:6px; border:none; background:transparent; color:#666; font-size:0.78rem; font-weight:600; cursor:pointer; transition:all .2s ease; }
.ats-period-btn:hover { color:#aaa; background:rgba(255,255,255,.05); }
.ats-period-btn.active { background:linear-gradient(135deg,#3b82f6,#2563eb); color:#fff; box-shadow:0 2px 8px rgba(59,130,246,.3); }
.ats-chart-area { position:relative; }

/* ATS TradingView Overlay */
.ats-tv-overlay { position:absolute; top:0; left:0; right:0; bottom:0; z-index:30; display:flex; align-items:center; justify-content:center; background:rgba(8,10,18,.4); backdrop-filter:blur(2px); -webkit-backdrop-filter:blur(2px); border-radius:0; }
.ats-tv-overlay-content { text-align:center; padding:40px 30px; }
.ats-tv-overlay-icon { margin-bottom:20px; animation:ats-tv-pulse 2s ease-in-out infinite; }
@keyframes ats-tv-pulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.08);opacity:.85} }
.ats-tv-overlay-title { font-size:1.1rem; font-weight:600; color:#e0e0e0; line-height:1.7; margin-bottom:28px; letter-spacing:0.3px; }
.ats-tv-overlay-buttons { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }
.ats-tv-btn { display:inline-flex; align-items:center; gap:8px; padding:12px 24px; border-radius:10px; font-size:0.88rem; font-weight:700; text-decoration:none; transition:all .25s ease; cursor:pointer; border:none; }
.ats-tv-btn-download { background:linear-gradient(135deg,#2962FF,#1E88E5); color:#fff; box-shadow:0 4px 16px rgba(41,98,255,.35); }
.ats-tv-btn-download:hover { background:linear-gradient(135deg,#1E88E5,#1565C0); transform:translateY(-2px); box-shadow:0 6px 24px rgba(41,98,255,.45); }
.ats-tv-btn-indicator { background:rgba(255,255,255,.08); color:#ccc; border:1px solid rgba(255,255,255,.12); }
.ats-tv-btn-indicator:hover { background:rgba(255,255,255,.14); color:#fff; transform:translateY(-2px); border-color:rgba(255,255,255,.25); }
.ats-chart-area.ats-blurred .ats-chart-main,
.ats-chart-area.ats-blurred .ats-volume-area { opacity:0.95; filter:none; pointer-events:none; transition:all .4s ease; }
.ats-chart-main { position:relative; width:100%; height:480px; background:#0d0f19; }
.ats-chart-main canvas { position:absolute; top:0; left:0; width:100%; height:100%; }
.ats-volume-area { width:100%; height:80px; background:#0a0c14; border-top:1px solid #1a1d2e; }
.ats-volume-area canvas { width:100%; height:100%; display:block; }
.ats-tooltip { position:absolute; background:rgba(13,15,25,.95); border:1px solid #333; border-radius:8px; padding:10px 14px; font-size:0.78rem; color:#ddd; pointer-events:none; z-index:20; line-height:1.6; white-space:nowrap; backdrop-filter:blur(8px); }
.ats-crosshair-v { position:absolute; width:1px; background:rgba(255,255,255,.15); pointer-events:none; z-index:15; }
.ats-crosshair-h { position:absolute; height:1px; background:rgba(255,255,255,.15); pointer-events:none; z-index:15; }
.ats-price-label { position:absolute; background:#2a2d40; color:#ddd; font-size:0.7rem; padding:2px 6px; border-radius:3px; pointer-events:none; z-index:16; font-family:monospace; }
.ats-legend { display:flex; gap:20px; padding:10px 24px; background:rgba(10,12,20,.8); border-top:1px solid rgba(255,255,255,.04); flex-wrap:wrap; }
.ats-legend-item { display:flex; align-items:center; gap:6px; font-size:0.72rem; color:#666; }
.ats-legend-dot { width:12px; height:3px; border-radius:2px; display:inline-block; }
.ats-legend-buy { color:#00e676; font-size:0.82rem; text-shadow:0 0 6px rgba(0,230,118,.3); }
.ats-legend-sell { color:#ff1744; font-size:0.82rem; text-shadow:0 0 6px rgba(255,23,68,.3); }
.ats-params { display:flex; gap:20px; padding:8px 24px 14px; background:rgba(10,12,20,.8); font-size:0.68rem; color:#444; letter-spacing:0.3px; }
.ats-params b { color:#666; }

@media(max-width:768px) {
  .ats-chart-main { height:350px; }
  .ats-volume-area { height:60px; }
  .ats-header-top { flex-direction:column; align-items:flex-start; padding:16px 16px 10px; }
  .ats-header-bottom { flex-direction:column; align-items:flex-start; padding:8px 16px 12px; }
  .ats-price-group { align-items:flex-start; }
  .ats-price { font-size:1.5rem; }
  .ats-period-btn { padding:5px 10px; font-size:0.7rem; }
  .ats-meta-stats { gap:16px; }
  .ats-coin-icon { width:32px; height:32px; }
  .ats-coin-icon svg { width:26px; height:26px; }
}

/* ATS 지표 신청 폼 */
.ats-form-modal { position:fixed; top:0; left:0; right:0; bottom:0; z-index:9999; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.65); backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px); animation:ats-fade-in .25s ease; }
@keyframes ats-fade-in { from{opacity:0} to{opacity:1} }
.ats-form-card { position:relative; width:420px; max-width:92vw; background:linear-gradient(165deg,#141620,#0d0f19); border:1px solid rgba(255,255,255,.08); border-radius:20px; padding:36px 32px; box-shadow:0 24px 64px rgba(0,0,0,.6); animation:ats-slide-up .3s ease; }
@keyframes ats-slide-up { from{transform:translateY(30px);opacity:0} to{transform:translateY(0);opacity:1} }
.ats-form-close { position:absolute; top:16px; right:20px; background:none; border:none; color:#555; font-size:1.6rem; cursor:pointer; transition:color .2s; line-height:1; }
.ats-form-close:hover { color:#fff; }
.ats-form-header { text-align:center; margin-bottom:28px; }
.ats-form-icon { width:52px; height:52px; margin:0 auto 14px; border-radius:14px; background:linear-gradient(135deg,#2962FF,#1E88E5); display:flex; align-items:center; justify-content:center; font-size:1.4rem; color:#fff; box-shadow:0 4px 20px rgba(41,98,255,.3); }
.ats-form-header h3 { font-size:1.2rem; font-weight:700; color:#fff; margin:0 0 6px; }
.ats-form-header p { font-size:0.82rem; color:#666; margin:0; }
.ats-form-group { margin-bottom:18px; }
.ats-form-label { display:block; font-size:0.78rem; font-weight:600; color:#888; margin-bottom:6px; letter-spacing:0.3px; }
.ats-form-required { color:#ff1744; }
.ats-form-input { width:100%; padding:12px 14px; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1); border-radius:10px; color:#e0e0e0; font-size:0.9rem; outline:none; transition:all .2s; box-sizing:border-box; }
.ats-form-input:focus { border-color:#2962FF; background:rgba(41,98,255,.06); box-shadow:0 0 0 3px rgba(41,98,255,.15); }
.ats-form-input::placeholder { color:#444; }
.ats-form-hint { display:block; font-size:0.7rem; color:#555; margin-top:5px; }
.ats-form-submit { width:100%; padding:13px; border:none; border-radius:10px; background:linear-gradient(135deg,#2962FF,#1E88E5); color:#fff; font-size:0.92rem; font-weight:700; cursor:pointer; transition:all .25s; display:flex; align-items:center; justify-content:center; gap:8px; margin-top:6px; }
.ats-form-submit:hover { transform:translateY(-2px); box-shadow:0 6px 24px rgba(41,98,255,.4); }
.ats-form-success { text-align:center; padding:20px 0; }
.ats-form-success-icon { font-size:3rem; color:#00e676; margin-bottom:16px; animation:ats-tv-pulse 1.5s ease-in-out infinite; }
.ats-form-success h3 { font-size:1.15rem; color:#fff; margin:0 0 8px; }
.ats-form-success p { font-size:0.85rem; color:#888; margin:0; }

/* ===== 주식분석 페이지 ===== */
.sa-search-wrap { margin-bottom:24px; }
.sa-search-box { display:flex; align-items:center; gap:10px; background:#141620; border:1px solid rgba(255,255,255,.08); border-radius:12px; padding:6px 8px 6px 16px; transition:border-color .2s; }
.sa-search-box:focus-within { border-color:#3b82f6; box-shadow:0 0 0 3px rgba(59,130,246,.15); }
.sa-search-box i { color:#555; font-size:1rem; flex-shrink:0; }
.sa-search-input { flex:1; background:none; border:none; color:#e0e0e0; font-size:0.92rem; outline:none; padding:10px 8px; }
.sa-search-input::placeholder { color:#444; }
.sa-search-btn { padding:10px 24px; border:none; border-radius:8px; background:linear-gradient(135deg,#3b82f6,#2563eb); color:#fff; font-size:0.88rem; font-weight:700; cursor:pointer; transition:all .2s; flex-shrink:0; }
.sa-search-btn:hover { transform:translateY(-1px); box-shadow:0 4px 16px rgba(59,130,246,.35); }
.sa-result { margin-bottom:24px; }
.sa-loading { text-align:center; padding:60px 20px; }
.sa-spinner { width:40px; height:40px; border:3px solid rgba(255,255,255,.1); border-top-color:#3b82f6; border-radius:50%; animation:spin 0.8s linear infinite; margin:0 auto 16px; }
@keyframes spin { to{transform:rotate(360deg)} }
.sa-loading p { color:#888; font-size:0.9rem; }

/* 분석 결과 카드 */
.sa-card { background:#141620; border:1px solid rgba(255,255,255,.06); border-radius:14px; padding:24px; margin-bottom:16px; }
.sa-card-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; flex-wrap:wrap; gap:12px; }
.sa-stock-name { font-size:1.3rem; font-weight:800; color:#fff; }
.sa-stock-ticker { font-size:0.85rem; color:#888; margin-left:8px; font-weight:400; }
.sa-stock-price { font-size:1.5rem; font-weight:800; color:#fff; font-family:'SF Mono',Consolas,monospace; }
.sa-stock-change { font-size:0.85rem; font-weight:700; margin-left:10px; padding:3px 10px; border-radius:6px; }

.sa-section { margin-bottom:20px; }
.sa-section-title { font-size:0.88rem; font-weight:700; color:#3b82f6; margin-bottom:12px; display:flex; align-items:center; gap:8px; }
.sa-section-title i { font-size:0.8rem; }
.sa-info-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:10px; }
.sa-info-item { background:rgba(255,255,255,.03); border-radius:8px; padding:12px 14px; }
.sa-info-label { font-size:0.7rem; color:#555; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; margin-bottom:4px; }
.sa-info-value { font-size:0.92rem; color:#ddd; font-weight:600; font-family:'SF Mono',Consolas,monospace; }

.sa-signal { display:inline-flex; align-items:center; gap:6px; padding:6px 14px; border-radius:8px; font-size:0.85rem; font-weight:700; }
.sa-signal-buy { background:rgba(0,230,118,.12); color:#00e676; }
.sa-signal-sell { background:rgba(255,23,68,.12); color:#ff1744; }
.sa-signal-hold { background:rgba(255,215,64,.12); color:#ffd740; }

/* 인기 종목 */
.sa-popular { margin-top:16px; }
.sa-popular h3 { font-size:0.95rem; font-weight:700; color:#888; margin-bottom:14px; }
.sa-popular-list { display:flex; flex-wrap:wrap; gap:8px; }
.sa-popular-btn { padding:8px 18px; border:1px solid rgba(255,255,255,.08); border-radius:20px; background:rgba(255,255,255,.03); color:#aaa; font-size:0.82rem; font-weight:600; cursor:pointer; transition:all .2s; }
.sa-popular-btn:hover { background:rgba(59,130,246,.15); color:#3b82f6; border-color:#3b82f6; }

@media(max-width:768px) {
  .sa-search-box { flex-direction:column; padding:12px; }
  .sa-search-btn { width:100%; }
  .sa-info-grid { grid-template-columns:repeat(2,1fr); }
}

/* 분석 메뉴 특별 스타일 */
.nav-link-analysis { color:#b388ff !important; font-weight:700 !important; }
.nav-link-analysis:hover { color:#e1bee7 !important; }
.nav-link-analysis.active { color:#e040fb !important; border-bottom-color:#e040fb !important; }
.nav-link-analysis i { color:#b388ff; }
.nav-link-analysis.active i { color:#e040fb; }

/* 분석 페이지 - 텔레그램 채널 */
.tg-channel-header { display:flex; justify-content:space-between; align-items:center; padding:20px 24px; background:linear-gradient(135deg,rgba(41,98,255,.08),rgba(30,136,229,.05)); border:1px solid rgba(41,98,255,.15); border-radius:14px; margin-bottom:20px; flex-wrap:wrap; gap:12px; }
.tg-channel-info { display:flex; align-items:center; gap:14px; }
.tg-channel-avatar { width:48px; height:48px; border-radius:50%; background:linear-gradient(135deg,#2AABEE,#229ED9); display:flex; align-items:center; justify-content:center; font-size:1.4rem; color:#fff; flex-shrink:0; }
.tg-channel-name { font-size:1.1rem; font-weight:700; color:#fff; }
.tg-channel-username { font-size:0.82rem; color:#2AABEE; }
.tg-channel-join-btn { display:inline-flex; align-items:center; gap:8px; padding:10px 22px; border-radius:10px; background:linear-gradient(135deg,#2AABEE,#229ED9); color:#fff; font-size:0.85rem; font-weight:700; text-decoration:none; transition:all .25s; }
.tg-channel-join-btn:hover { transform:translateY(-2px); box-shadow:0 4px 16px rgba(42,171,238,.35); }

.tg-posts-container { display:flex; flex-direction:column; gap:16px; }

.tg-post-card { background:#12141e; border:1px solid rgba(255,255,255,.06); border-radius:14px; overflow:hidden; transition:border-color .2s; }
.tg-post-card:hover { border-color:rgba(255,255,255,.12); }
.tg-post-image { max-width:100%; max-height:500px; object-fit:contain; display:block; margin:0 auto; padding:12px; border-bottom:1px solid rgba(255,255,255,.06); }
.tg-post-body { padding:18px 22px; }
.tg-post-text { font-size:0.92rem; color:#d0d0d0; line-height:1.75; white-space:pre-wrap; word-break:break-word; }
.tg-post-text a { color:#2AABEE; text-decoration:none; word-break:break-all; }
.tg-post-text a:hover { text-decoration:underline; }
.tg-post-meta { display:flex; justify-content:space-between; align-items:center; padding:10px 22px 14px; border-top:1px solid rgba(255,255,255,.04); }
.tg-post-date { font-size:0.75rem; color:#555; }
.tg-post-views { font-size:0.75rem; color:#555; display:flex; align-items:center; gap:4px; }
.tg-post-views i { font-size:0.65rem; }
.tg-post-link { font-size:0.75rem; color:#2AABEE; text-decoration:none; }
.tg-post-link:hover { text-decoration:underline; }

@media(max-width:600px) {
  .tg-channel-header { padding:14px 16px; }
  .tg-post-body { padding:14px 16px; }
  .tg-post-meta { padding:8px 16px 12px; }
}

.tg-post-link-image { max-width:100%; max-height:300px; object-fit:contain; display:block; margin:8px auto 0; padding:0 12px; border-radius:8px; }

/* ===== Ant Colony Theme (게시판) ===== */
.ant-colony-wrapper {
  min-height: 100vh;
  background: linear-gradient(180deg, #12101a 0%, #10131e 2%, #12101a 4%, #1a1008 6%, #1e1209 10%, #22150b 15%, #251810 25%, #1e1008 50%, #170c05 75%, #100804 100%);
  position: relative;
}

/* 지표면 */
.ant-surface {
  position: relative;
  min-height: 120px;
  overflow: visible;
}
.ant-surface-grass {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(180deg, #1a1a2e 0%, #1e2a1e 60%, #2a3a20 100%);
}
.ant-surface-svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
}
.ant-entrance {
  position: relative;
  text-align: center;
  z-index: 2;
  padding: 10px 0 20px;
}
.ant-entrance-hole {
  width: 60px;
  height: 30px;
  background: radial-gradient(ellipse, #1a0e05 40%, #2a1a10 100%);
  border-radius: 50%;
  margin: 0 auto 6px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5), inset 0 -5px 10px rgba(0,0,0,0.4);
}
.ant-entrance-label {
  color: #e8d0b0;
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
  letter-spacing: 2px;
}

/* 지하 영역 */
.ant-underground {
  position: relative;
  padding: 20px 16px 60px;
  min-height: 80vh;
}
.ant-tunnels-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* 컨트롤 (카테고리+검색+글쓰기) */
.ant-controls {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(60,40,20,0.6);
  border-radius: 20px;
  border: 1px solid rgba(139,115,85,0.3);
  backdrop-filter: blur(4px);
}
.ant-controls .category-filters {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ant-controls .search-bar {
  flex: 0 0 220px;
  margin: 0;
}
.ant-write-btn {
  flex-shrink: 0;
}

/* 개미집 방들 (게시글 컨테이너) */
.ant-chambers {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

/* 각 게시글 = 개미방 */
.ant-chambers .post-card {
  position: relative;
  background: radial-gradient(ellipse at center, rgba(90,65,40,0.85) 0%, rgba(60,40,25,0.9) 60%, rgba(45,30,18,0.95) 100%);
  border: 2px solid rgba(139,115,85,0.35);
  border-radius: 50% 50% 45% 55% / 50% 45% 55% 50%;
  padding: 28px 22px 22px;
  margin: 15px 10px;
  min-height: 140px;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.4), 0 0 15px rgba(139,115,85,0.15);
  transition: all 0.3s ease;
  cursor: pointer;
}
.ant-chambers .post-card:hover {
  border-color: rgba(196,168,130,0.6);
  box-shadow: inset 0 0 30px rgba(0,0,0,0.3), 0 0 25px rgba(196,168,130,0.25);
  transform: scale(1.03);
}

/* 방 연결 터널 효과 (::before, ::after) */
.ant-chambers .post-card::before {
  content: '';
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 20px;
  background: rgba(70,48,30,0.7);
  border-radius: 0 0 50% 50%;
  border-left: 2px solid rgba(139,115,85,0.2);
  border-right: 2px solid rgba(139,115,85,0.2);
  border-bottom: 2px solid rgba(139,115,85,0.2);
}
.ant-chambers .post-card::after {
  content: '';
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 20px;
  background: rgba(70,48,30,0.7);
  border-radius: 50% 50% 0 0;
  border-left: 2px solid rgba(139,115,85,0.2);
  border-right: 2px solid rgba(139,115,85,0.2);
  border-top: 2px solid rgba(139,115,85,0.2);
}

/* 방 안의 텍스트 색상 */
.ant-chambers .post-card-title {
  color: #e8d5b8;
  font-size: 15px;
}
.ant-chambers .post-card-excerpt {
  color: #b8a48a;
  font-size: 12px;
}
.ant-chambers .post-card-meta {
  color: #9a8a70;
  font-size: 11px;
}
.ant-chambers .post-card-category {
  font-size: 10px;
  border-radius: 10px;
}
.ant-chambers .post-card-header {
  margin-bottom: 6px;
}
.ant-chambers .post-card-stats span {
  font-size: 11px;
  color: #9a8a70;
}

/* 장식 개미들 */
.ant-decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 50;
  overflow: visible;
}
.ant-worker {
  position: absolute;
  font-size: 22px;
  opacity: 1;
  animation: antWalk 20s linear infinite;
  pointer-events: none;
  filter: brightness(2) drop-shadow(0 0 3px rgba(255,200,100,0.6));
}

/* 여왕개미 */
.queen-ant {
  position: absolute;
  font-size: 28px;
  cursor: pointer;
  pointer-events: auto;
  z-index: 10;
  filter: drop-shadow(0 0 8px rgba(255,215,0,0.8)) drop-shadow(0 0 16px rgba(255,215,0,0.4));
  animation: antWalk 12s linear forwards;
  transition: transform 0.1s;
}
.queen-ant:hover { transform: scale(1.3); }
.queen-ant::after {
  content: '\1F451';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
}

/* 주식 로고 이벤트 */
.stock-logo-event {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  z-index: 12;
  background: #1a1a2e;
  border: 2px solid #ffd700;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 10px rgba(255,215,0,0.7)) drop-shadow(0 0 20px rgba(255,215,0,0.3));
  animation: antWalk 14s linear forwards;
  transition: transform 0.15s;
  font-size: 22px;
  color: #ffd700;
  font-weight: 700;
}
.stock-logo-event:hover {
  transform: scale(1.4);
  filter: drop-shadow(0 0 16px rgba(255,215,0,1)) drop-shadow(0 0 30px rgba(255,215,0,0.6));
}
.stock-logo-event img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  padding: 2px;
}

/* 포인트 획득 이펙트 */
.point-popup {
  position: fixed;
  pointer-events: none;
  font-size: 20px;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255,215,0,0.8), 0 2px 4px rgba(0,0,0,0.5);
  z-index: 9999;
  animation: pointFloat 1.5s ease-out forwards;
}
@keyframes pointFloat {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-80px) scale(1.5); }
}

@keyframes antWalk {
  0% { transform: translateX(-20px) scaleX(-1); }
  49% { transform: translateX(calc(100vw + 20px)) scaleX(-1); }
  50% { transform: translateX(calc(100vw + 20px)) scaleX(1); }
  100% { transform: translateX(-20px) scaleX(1); }
}
@keyframes antWalkR {
  0% { transform: translateX(20px) scaleX(1); }
  49% { transform: translateX(calc(-100vw - 20px)) scaleX(1); }
  50% { transform: translateX(calc(-100vw - 20px)) scaleX(-1); }
  100% { transform: translateX(20px) scaleX(-1); }
}

/* 페이지네이션 (개미집 테마) */
.ant-underground .pagination {
  position: relative;
  z-index: 2;
  margin-top: 20px;
}

/* 반응형 */
@media (max-width: 768px) {
  .ant-chambers {
    flex-direction: column;
  }
  .ant-controls {
    flex-direction: column;
  }
  .ant-controls .search-bar {
    flex: 1 1 100%;
  }
  .ant-entrance-label {
    font-size: 15px;
  }
}

/* ===== Ant Egg Posts ===== */


.ant-egg-wrap {
  flex: 0 0 auto;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.ant-egg-wrap:hover {
  transform: scale(1.08);
  z-index: 5;
}

.ant-egg {
  position: relative;
  width: 130px;
  height: 170px;
  background: radial-gradient(ellipse at 40% 35%, #fef9f0 0%, #f5ead5 25%, #e8d8b8 50%, #d4c4a0 75%, #c0ad88 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: 
    0 4px 15px rgba(0,0,0,0.4),
    inset 0 -8px 20px rgba(160,130,90,0.3),
    inset 0 4px 10px rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}
.ant-egg-wrap:hover .ant-egg {
  box-shadow: 
    0 6px 25px rgba(196,168,130,0.5),
    inset 0 -8px 20px rgba(160,130,90,0.3),
    inset 0 4px 10px rgba(255,255,255,0.3);
}

/* 알 광택 */
.ant-egg-shine {
  position: absolute;
  top: 12%;
  left: 20%;
  width: 35%;
  height: 25%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* 알 안의 콘텐츠 */
.ant-egg-content {
  position: relative;
  z-index: 1;
  padding: 20px 12px 12px;
  text-align: center;
  width: 100%;
}

.ant-egg-cat {
  display: inline-block;
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 8px;
  margin-bottom: 4px;
  font-weight: 600;
}

.ant-egg-title {
  font-size: 11px;
  font-weight: 700;
  color: #3d2b1f;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
}

.ant-egg-meta {
  font-size: 9px;
  color: #7a6b55;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ant-egg-stats {
  display: flex;
  justify-content: center;
  gap: 6px;
  font-size: 9px;
  color: #8a7b65;
}
.ant-egg-stats i {
  margin-right: 2px;
  font-size: 8px;
}

/* 그리드에서 다양한 크기 */
.ant-egg-wrap:nth-child(3n+1) .ant-egg { width: 120px; height: 160px; }
.ant-egg-wrap:nth-child(3n+2) .ant-egg { width: 135px; height: 175px; }
.ant-egg-wrap:nth-child(3n) .ant-egg { width: 125px; height: 165px; }

/* 살짝 기울기 다양화 */
.ant-egg-wrap:nth-child(4n+1) { transform: rotate(-3deg); }
.ant-egg-wrap:nth-child(4n+2) { transform: rotate(2deg); }
.ant-egg-wrap:nth-child(4n+3) { transform: rotate(-1deg); }
.ant-egg-wrap:nth-child(4n) { transform: rotate(4deg); }
.ant-egg-wrap:hover { transform: scale(1.08) rotate(0deg) !important; }

/* 이전 post-card 스타일 ant-chambers 안에서 숨기기 */
.ant-chambers .post-card {
  display: none;
}

/* ant-chambers 안의 post-row 개미 테마 */
.ant-chambers .post-row {
  background: rgba(60,42,25,0.6);
  border-bottom: 1px solid rgba(139,115,85,0.2);
  padding: 14px 18px;
  gap: 14px;
}
.ant-chambers .post-row:hover {
  background: rgba(80,55,32,0.8);
}
.ant-chambers .post-row-title {
  color: #e8d5b8;
}
.ant-chambers .post-row-info {
  color: #9a8a70;
}
.ant-chambers .post-row-stats {
  color: #9a8a70;
}

@media (max-width: 768px) {
  .ant-egg { width: 110px !important; height: 145px !important; }
  .ant-egg-title { font-size: 10px; }
  .ant-chambers .post-row { padding: 12px 14px; }
  .ant-chambers .post-row-title { font-size: 13px; }
  .ant-chambers .post-row-category { font-size: 10px; padding: 2px 8px; }
}


/* ===== 마이페이지 ===== */
.mypage-wrap { padding-top: 28px; max-width: 700px; margin: 0 auto; }
.mypage-profile-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.mypage-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(99,102,241,0.2); display: flex; align-items: center; justify-content: center;
  font-size: 32px; color: #818cf8; flex-shrink: 0;
}
.mypage-info { flex: 1; min-width: 120px; }
.mypage-info h2 { color: #e2e8f0; font-size: 20px; margin-bottom: 4px; }
.mypage-email { color: #94a3b8; font-size: 13px; }
.mypage-joined { color: #64748b; font-size: 12px; margin-top: 4px; }
.mypage-points-big {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255,215,0,0.08); border: 1px solid rgba(255,215,0,0.2);
  border-radius: 12px; padding: 12px 24px;
}
.mypage-points-label { color: #94a3b8; font-size: 12px; }
.mypage-points-value { color: #ffd700; font-size: 28px; font-weight: 800; }

.mypage-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px;
}
.mypage-stat-box {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 12px; padding: 18px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.mypage-stat-box i { font-size: 20px; color: #818cf8; }
.mypage-stat-num { font-size: 24px; font-weight: 800; color: #e2e8f0; }
.mypage-stat-label { font-size: 12px; color: #94a3b8; }

.mypage-section {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 14px; padding: 20px; margin-bottom: 20px;
}
.mypage-section h3 { color: #e2e8f0; font-size: 16px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.mypage-section h3 i { color: #818cf8; }
.mypage-empty { color: #64748b; font-size: 14px; text-align: center; padding: 20px 0; }

.mypage-list-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border-color); cursor: pointer;
  transition: background 0.2s;
}
.mypage-list-item:last-child { border-bottom: none; }
.mypage-list-item:hover { background: rgba(99,102,241,0.05); border-radius: 8px; padding-left: 8px; }
.mypage-list-cat {
  font-size: 11px; padding: 2px 8px; border-radius: 6px;
  background: rgba(99,102,241,0.15); color: #818cf8; flex-shrink: 0;
}
.mypage-list-title { flex: 1; color: #e2e8f0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mypage-list-meta { color: #64748b; font-size: 12px; flex-shrink: 0; }

.mypage-point-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border-color);
}
.mypage-point-row:last-child { border-bottom: none; }
.mypage-point-reason { flex: 1; color: #cbd5e1; font-size: 14px; }
.mypage-point-amount { font-weight: 700; font-size: 14px; flex-shrink: 0; }
.mypage-point-amount.plus { color: #10b981; }
.mypage-point-amount.minus { color: #ef4444; }
.mypage-point-date { color: #64748b; font-size: 12px; flex-shrink: 0; }

@media (max-width: 768px) {
  .mypage-profile-card { padding: 20px; gap: 14px; }
  .mypage-avatar { width: 56px; height: 56px; font-size: 24px; }
  .mypage-info h2 { font-size: 17px; }
  .mypage-points-value { font-size: 22px; }
  .mypage-stat-num { font-size: 20px; }
}

/* ===== 분석 페이지 상단 여백 ===== */
#page-analysis > .container {
  padding-top: 28px;
}

/* ===== 히든종목/전자책 버튼 ===== */
.reward-buttons-wrap {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  margin-bottom: 24px;
}
.reward-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-radius: 14px;
  border: 1px solid rgba(99,102,241,0.3);
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.reward-btn-hidden {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-color: rgba(255,215,0,0.3);
}
.reward-btn-hidden:hover {
  border-color: rgba(255,215,0,0.6);
  box-shadow: 0 0 20px rgba(255,215,0,0.15);
  transform: translateY(-2px);
}
.reward-btn-hidden i {
  font-size: 24px;
  color: #ffd700;
}
.reward-btn-ebook {
  background: linear-gradient(135deg, #1a1a2e 0%, #1e2a3a 100%);
  border-color: rgba(99,102,241,0.3);
}
.reward-btn-ebook:hover {
  border-color: rgba(99,102,241,0.6);
  box-shadow: 0 0 20px rgba(99,102,241,0.15);
  transform: translateY(-2px);
}
.reward-btn-ebook i {
  font-size: 24px;
  color: #818cf8;
}
.reward-btn-title {
  font-size: 16px;
  font-weight: 700;
  color: #e2e8f0;
}
.reward-btn-cost {
  margin-left: auto;
  font-size: 15px;
  font-weight: 700;
  color: #ffd700;
  background: rgba(255,215,0,0.1);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,215,0,0.2);
}
@media (max-width: 768px) {
  .reward-buttons-wrap { flex-direction: column; gap: 10px; }
  .reward-btn { padding: 14px 16px; }
  .reward-btn-title { font-size: 14px; }
  .reward-btn-cost { font-size: 13px; }
}

/* ===== 포인트 안내 문구 ===== */
.reward-point-guide {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 10px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.6;
}
.reward-point-guide i {
  color: #818cf8;
  margin-top: 3px;
  flex-shrink: 0;
}

/* ===== ATS 주식 매매일지 ===== */
.journal-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

.journal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0;
}

.journal-title i {
  color: #8b5cf6;
  margin-right: 8px;
}

.journal-total {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
  border-radius: 14px;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

.journal-total::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.5), transparent);
}

.journal-total-label {
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.journal-total-value {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}

.journal-total-value.positive { 
  color: #ef4444; 
  text-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}
.journal-total-value.negative { 
  color: #3b82f6; 
  text-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}
.journal-total-value.neutral { color: #94a3b8; }

.journal-updated {
  color: #64748b;
  font-size: 0.75rem;
  margin-bottom: 12px;
  text-align: right;
}

.journal-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.journal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.journal-table thead {
  background: rgba(99, 102, 241, 0.15);
}

.journal-table th {
  padding: 12px 14px;
  text-align: right;
  color: #a5b4fc;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.journal-table th:first-child {
  text-align: left;
}

.journal-table td {
  padding: 11px 14px;
  text-align: right;
  color: #e2e8f0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.85rem;
}

.journal-table td:first-child {
  text-align: left;
  font-family: inherit;
  font-weight: 600;
  color: #f1f5f9;
}

.journal-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.08);
}

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

.pnl-positive {
  color: #ef4444 !important;
  font-weight: 700;
}

.pnl-negative {
  color: #3b82f6 !important;
  font-weight: 700;
}

.pnl-neutral {
  color: #94a3b8 !important;
}

.pnl-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
}

.pnl-badge.positive {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.pnl-badge.negative {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.pnl-badge.neutral {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

@media (max-width: 600px) {
  .journal-section { padding: 16px; }
  .journal-title { font-size: 1.1rem; }
  .journal-table th, .journal-table td { padding: 8px 8px; font-size: 0.78rem; }
  .journal-total { padding: 10px 16px; }
  .journal-total-value { font-size: 1.2rem; letter-spacing: 0.5px; }
}

.journal-totals-wrap {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.journal-updated {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.journal-start-date {
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 500;
}

.journal-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 0;
}

.journal-page-btn {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.journal-page-btn:hover {
  background: rgba(99, 102, 241, 0.3);
  color: #fff;
}

.journal-page-btn.journal-page-active {
  background: #6366f1;
  color: #fff;
  border-color: #6366f1;
}

.journal-num {
  color: #64748b;
  font-size: 0.75rem;
  margin-right: 4px;
}

.journal-pg-wrap {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}

.journal-pg-btn {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  background: rgba(0, 0, 0, 0.3);
  color: #94a3b8;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.journal-pg-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #e2e8f0;
}

.journal-pg-btn.active {
  background: #6366f1;
  color: #fff;
  border-color: #6366f1;
}
