/* BJJ Encyclopedia Styles */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

:root {
  --bjj-dark: #0a0e1a;
  --bjj-darker: #060810;
  --bjj-card: #111827;
  --bjj-border: #1f2937;
  --bjj-accent: #3b82f6;
  --bjj-accent2: #8b5cf6;
  --bjj-gold: #f59e0b;
  --bjj-red: #ef4444;
  --bjj-green: #10b981;
}

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

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bjj-dark);
  color: #e5e7eb;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bjj-darker); }
::-webkit-scrollbar-thumb { background: var(--bjj-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #374151; }

/* Hero Section */
.hero-bg {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}
.hero-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 50%);
  animation: pulse-glow 8s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
}

/* Cards */
.tech-card {
  background: var(--bjj-card);
  border: 1px solid var(--bjj-border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.tech-card:hover {
  border-color: var(--bjj-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59,130,246,0.15);
}
.tech-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--bjj-accent), var(--bjj-accent2));
  opacity: 0;
  transition: opacity 0.3s;
}
.tech-card:hover::after { opacity: 1; }
.tech-card:hover .tech-card-img img { transform: scale(1.05); }
.tech-card-img img { transition: transform 0.4s ease, opacity 0.3s; }

/* System Cards */
.system-card {
  background: var(--bjj-card);
  border: 1px solid var(--bjj-border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
}
.system-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge-gi { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.badge-nogi { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.badge-both { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }

.badge-sub { background: rgba(239,68,68,0.15); color: #f87171; }
.badge-sweep { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-pass { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-takedown { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-escape { background: rgba(107,114,128,0.15); color: #9ca3af; }
.badge-guard { background: rgba(139,92,246,0.15); color: #a78bfa; }
.badge-position { background: rgba(20,184,166,0.15); color: #2dd4bf; }
.badge-control { background: rgba(236,72,153,0.15); color: #f472b6; }

/* Belt Colors */
.belt-white { background: linear-gradient(135deg, #f8f9fa, #e5e7eb); color: #111; }
.belt-blue { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; }
.belt-purple { background: linear-gradient(135deg, #7c3aed, #6d28d9); color: #fff; }
.belt-brown { background: linear-gradient(135deg, #92400e, #78350f); color: #fff; }
.belt-black { background: linear-gradient(135deg, #111827, #030712); color: #fff; border: 1px solid #374151; }

/* Difficulty Stars */
.diff-star { color: #4b5563; }
.diff-star.active { color: #f59e0b; }

/* Navigation */
.nav-tab {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
  font-weight: 500;
  color: #9ca3af;
  white-space: nowrap;
}
.nav-tab:hover { background: rgba(59,130,246,0.1); color: #60a5fa; }
.nav-tab.active { background: rgba(59,130,246,0.2); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }

/* Body Map */
.body-part-btn {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(59,130,246,0.2);
  border: 2px solid rgba(59,130,246,0.5);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: #93c5fd;
  z-index: 10;
}
.body-part-btn:hover {
  background: rgba(59,130,246,0.5);
  border-color: #3b82f6;
  transform: scale(1.2);
  box-shadow: 0 0 15px rgba(59,130,246,0.4);
}
.body-part-btn.active {
  background: #3b82f6;
  border-color: #60a5fa;
  color: #fff;
  box-shadow: 0 0 20px rgba(59,130,246,0.5);
}

/* Search Input */
.search-input {
  background: var(--bjj-card);
  border: 1px solid var(--bjj-border);
  border-radius: 12px;
  padding: 0.875rem 1.25rem 0.875rem 3rem;
  color: #e5e7eb;
  width: 100%;
  font-size: 1rem;
  transition: all 0.3s;
}
.search-input:focus {
  outline: none;
  border-color: var(--bjj-accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.search-input::placeholder { color: #6b7280; }

/* Filter Chips */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(31,41,55,0.8);
  border: 1px solid var(--bjj-border);
  color: #9ca3af;
}
.filter-chip:hover { border-color: var(--bjj-accent); color: #e5e7eb; }
.filter-chip.active { background: rgba(59,130,246,0.2); border-color: var(--bjj-accent); color: #60a5fa; }

/* Detail Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}
.modal-content {
  background: var(--bjj-dark);
  border: 1px solid var(--bjj-border);
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Steps */
.step-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.75rem 0;
}
.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(59,130,246,0.2);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Connection Flow */
.flow-arrow {
  display: flex;
  align-items: center;
  color: #4b5563;
  font-size: 0.75rem;
  padding: 0 0.5rem;
}

/* Chain Link Card */
.chain-card {
  background: rgba(31,41,55,0.5);
  border: 1px solid var(--bjj-border);
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
}
.chain-card:hover {
  border-color: var(--bjj-accent);
  background: rgba(59,130,246,0.08);
}

/* Image Upload Area */
.upload-area {
  border: 2px dashed var(--bjj-border);
  border-radius: 16px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: rgba(17,24,39,0.5);
}
.upload-area:hover {
  border-color: var(--bjj-accent);
  background: rgba(59,130,246,0.05);
}
.upload-area.dragover {
  border-color: var(--bjj-accent);
  background: rgba(59,130,246,0.1);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #6b7280;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: #60a5fa;
  text-decoration: none;
  cursor: pointer;
}
.breadcrumb a:hover { text-decoration: underline; }

/* Stat Card */
.stat-card {
  background: var(--bjj-card);
  border: 1px solid var(--bjj-border);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}
.stat-number {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Tree View */
.tree-node {
  padding-left: 1.5rem;
  border-left: 2px solid var(--bjj-border);
  margin-left: 0.75rem;
}
.tree-node-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s;
}
.tree-node-header:hover { background: rgba(59,130,246,0.08); }

/* Responsive */
@media (max-width: 768px) {
  .tech-card { padding: 1rem; }
  .modal-content { margin: 0.5rem; border-radius: 12px; }
  .hero-bg { padding: 2rem 1rem !important; }
  .nav-tab { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
}

/* Floating back button */
.back-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bjj-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(59,130,246,0.4);
  transition: all 0.3s;
  z-index: 999;
  border: none;
}
.back-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(59,130,246,0.6);
}

/* Pulse animation for body map points */
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(59,130,246,0.4); }
  70% { box-shadow: 0 0 0 10px rgba(59,130,246,0); }
  100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}
.body-part-btn { animation: pulse-ring 2s infinite; }
.body-part-btn:hover { animation: none; }

/* Competition table */
.comp-table {
  width: 100%;
  border-collapse: collapse;
}
.comp-table th, .comp-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--bjj-border);
  font-size: 0.85rem;
}
.comp-table th {
  color: #9ca3af;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 1px;
}
.comp-table tr:hover td {
  background: rgba(59,130,246,0.05);
}

/* Glow text */
.glow-text {
  text-shadow: 0 0 20px rgba(59,130,246,0.5);
}

/* Strategy box */
.strategy-box {
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.1));
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 12px;
  padding: 1.25rem;
}

/* Hierarchy flow */
.hierarchy-flow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.hierarchy-item {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}
.hierarchy-arrow {
  color: #4b5563;
  font-size: 1.2rem;
}

/* ===== 3D Viewer Styles ===== */
.cam-preset-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(31,41,55,0.8);
  border: 1px solid var(--bjj-border);
  color: #9ca3af;
}
.cam-preset-btn:hover {
  border-color: #06b6d4;
  color: #22d3ee;
  background: rgba(6,182,212,0.1);
  box-shadow: 0 0 8px rgba(6,182,212,0.15);
}
.cam-preset-btn.active-cam {
  background: rgba(6,182,212,0.2);
  border-color: #06b6d4;
  color: #22d3ee;
}

.step-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  border: 1px solid var(--bjj-border);
  color: #9ca3af;
  font-size: 0.85rem;
}
.step-nav-btn:hover {
  border-color: #06b6d4;
  color: #22d3ee;
  background: rgba(6,182,212,0.1);
}
.step-nav-btn.play-btn {
  width: 40px;
  height: 40px;
  background: rgba(6,182,212,0.15);
  border-color: #06b6d4;
  color: #22d3ee;
}
.step-nav-btn.play-btn:hover {
  background: rgba(6,182,212,0.3);
}

.step-dot-3d {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #374151;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}
.step-dot-3d:hover {
  background: #6b7280;
  transform: scale(1.3);
}
.step-dot-3d.active {
  background: #22d3ee;
  box-shadow: 0 0 6px rgba(34,211,238,0.5);
  transform: scale(1.3);
}

/* 2D step dots */
.step-dot-2d {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #374151;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}
.step-dot-2d:hover {
  background: #6b7280;
  transform: scale(1.3);
}
.step-dot-2d.active {
  background: #22d3ee;
  box-shadow: 0 0 6px rgba(34,211,238,0.5);
  transform: scale(1.3);
}

/* 3D container cursor states */
#bjj3d-container canvas {
  cursor: grab;
}
#bjj3d-container canvas:active {
  cursor: grabbing;
}

/* Responsive 3D viewer */
@media (max-width: 768px) {
  #bjj3d-container {
    height: 350px !important;
  }
  .cam-preset-btn {
    padding: 5px 8px;
    font-size: 0.7rem;
  }
  .step-nav-btn {
    width: 32px;
    height: 32px;
  }
}

/* ===== IBJJF MANUAL MODAL ===== */
.ibjjf-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  animation: ibjjf-fade-in 0.2s ease;
}
@keyframes ibjjf-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.ibjjf-modal-box {
  background: #0d1117;
  border: 1px solid #1f2937;
  border-radius: 16px;
  width: 100%;
  max-width: 820px;
  margin: auto;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(245,158,11,0.1);
  animation: ibjjf-slide-up 0.25s ease;
}
@keyframes ibjjf-slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.ibjjf-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #0f172a, #1a1207);
  border-bottom: 1px solid #1f2937;
}
.ibjjf-modal-logo {
  width: 44px; height: 44px;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.ibjjf-modal-close {
  width: 36px; height: 36px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 8px;
  color: #9ca3af;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  font-size: 1rem;
}
.ibjjf-modal-close:hover { background: #dc2626; border-color: #dc2626; color: #fff; }

.ibjjf-modal-search {
  position: relative;
  padding: 1rem 1.5rem 0;
}
.ibjjf-search-input {
  width: 100%;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 10px;
  color: #e5e7eb;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.ibjjf-search-input:focus { border-color: #f59e0b; }
.ibjjf-search-input::placeholder { color: #6b7280; }
.ibjjf-clear-btn {
  position: absolute; right: 2rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #6b7280; cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
  transition: color 0.2s;
}
.ibjjf-clear-btn:hover { color: #ef4444; }

.ibjjf-tabs {
  display: flex;
  gap: 4px;
  padding: 0.75rem 1.5rem;
  overflow-x: auto;
  border-bottom: 1px solid #1f2937;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ibjjf-tabs::-webkit-scrollbar { display: none; }
.ibjjf-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 0.45rem 0.85rem;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 8px;
  color: #9ca3af;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: inherit;
}
.ibjjf-tab:hover { background: #1f2937; color: #e5e7eb; }
.ibjjf-tab.active { background: rgba(245,158,11,0.12); border-color: #f59e0b; color: #f59e0b; }

.ibjjf-modal-content {
  padding: 1.25rem 1.5rem 1.5rem;
  max-height: 65vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ibjjf-section-title {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 0.9rem; color: #e5e7eb;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #1f2937;
}

/* Filter row */
.ibjjf-filter-row {
  display: flex; flex-wrap: wrap; gap: 1rem;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.ibjjf-filter-group { display: flex; flex-direction: column; gap: 0.4rem; }
.ibjjf-filter-label { font-size: 0.7rem; color: #6b7280; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 4px; }
.ibjjf-chip {
  padding: 0.3rem 0.7rem;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 20px;
  color: #9ca3af;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.ibjjf-chip:hover { background: #374151; color: #e5e7eb; }
.ibjjf-chip.active { background: rgba(245,158,11,0.15); border-color: #f59e0b; color: #f59e0b; font-weight: 600; }

/* Belt header */
.ibjjf-belt-header {
  display: grid;
  grid-template-columns: 1fr repeat(5, 60px);
  gap: 4px;
  padding: 0.5rem 0.75rem;
  background: #0a0e1a;
  border-radius: 8px 8px 0 0;
  border: 1px solid #1f2937;
  border-bottom: none;
}
.ibjjf-belt-tech-col { font-size: 0.7rem; color: #6b7280; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.ibjjf-belt-col { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 0.68rem; color: #6b7280; }
.ibjjf-belt-dot { width: 12px; height: 12px; border-radius: 50%; }

/* Legality list */
.ibjjf-legality-list { border: 1px solid #1f2937; border-radius: 0 0 8px 8px; overflow: hidden; }
.ibjjf-legality-card {
  padding: 0.75rem;
  border-bottom: 1px solid #1a2030;
  transition: background 0.15s;
}
.ibjjf-legality-card:last-child { border-bottom: none; }
.ibjjf-legality-card:hover { background: #0f1a2e; }
.ibjjf-legality-card-header { margin-bottom: 0.5rem; }

.ibjjf-legality-row {
  display: grid;
  grid-template-columns: 80px repeat(5, 1fr);
  gap: 4px;
  align-items: center;
  margin-top: 4px;
}
.ibjjf-gi-label {
  font-size: 0.7rem; font-weight: 600; padding: 2px 0;
  color: #9ca3af;
}
.ibjjf-status-cell { display: flex; justify-content: center; }
.ibjjf-status-badge {
  width: 30px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
}

/* Penalty badges */
.ibjjf-penalty-dq      { display:inline-flex;align-items:center;gap:3px;padding:2px 7px;border-radius:20px;font-size:0.65rem;font-weight:700;background:#5f0a0a;color:#f87171;border:1px solid #dc262644; }
.ibjjf-penalty-serious { display:inline-flex;align-items:center;gap:3px;padding:2px 7px;border-radius:20px;font-size:0.65rem;font-weight:700;background:#431407;color:#fb923c;border:1px solid #ea580c44; }
.ibjjf-penalty-technical { display:inline-flex;align-items:center;gap:3px;padding:2px 7px;border-radius:20px;font-size:0.65rem;font-weight:700;background:#422006;color:#fbbf24;border:1px solid #f59e0b44; }
.ibjjf-penalty-none    { display:inline-flex;align-items:center;gap:3px;padding:2px 7px;border-radius:20px;font-size:0.65rem;font-weight:600;background:#052e16;color:#4ade80;border:1px solid #16a34a44; }

/* Points */
.ibjjf-points-grid { display: flex; flex-direction: column; gap: 0.6rem; }
.ibjjf-point-card {
  display: flex; align-items: center; gap: 1rem;
  background: #111827; border: 1px solid #1f2937; border-radius: 10px;
  padding: 0.75rem 1rem; transition: border-color 0.2s;
}
.ibjjf-point-card:hover { border-color: #374151; }
.ibjjf-point-number {
  font-size: 2rem; font-weight: 900;
  color: #f59e0b;
  min-width: 2.5rem; text-align: center;
  line-height: 1;
}
.ibjjf-point-info { flex: 1; }
.ibjjf-point-badge {
  padding: 0.25rem 0.6rem;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 20px;
  font-size: 0.75rem; font-weight: 700; color: #f59e0b;
}

/* Penalty timeline */
.ibjjf-penalty-timeline { display: flex; flex-direction: column; gap: 0; }
.ibjjf-penalty-step { display: flex; align-items: flex-start; gap: 1rem; }
.ibjjf-penalty-step-num {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 0.9rem; color: #fff;
  flex-shrink: 0; margin-top: 4px;
}
.ibjjf-penalty-step-content {
  flex: 1;
  background: #111827; border: 1px solid #1f2937;
  border-radius: 10px; padding: 0.75rem 1rem; margin-bottom: 0;
}
.ibjjf-penalty-step-dq { border-color: #dc2626 !important; background: #1a0808 !important; }
.ibjjf-penalty-arrow { padding: 0.25rem 0 0.25rem 15px; color: #374151; }

/* Tables */
.ibjjf-duration-table-wrap, .ibjjf-weight-table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid #1f2937; }
.ibjjf-duration-table, .ibjjf-weight-table { width: 100%; border-collapse: collapse; }
.ibjjf-duration-table th, .ibjjf-weight-table th {
  background: #0a0e1a; color: #6b7280;
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 0.75rem 1rem; text-align: left; white-space: nowrap;
}
.ibjjf-duration-table td, .ibjjf-weight-table td {
  padding: 0.75rem 1rem; color: #e5e7eb; font-size: 0.85rem;
  border-top: 1px solid #1a2030;
}
.ibjjf-duration-table tr:hover td, .ibjjf-weight-table tr:hover td { background: rgba(59,130,246,0.04); }
.ibjjf-row-alt td { background: #080c14; }
.ibjjf-min-badge { font-weight: 700; color: #60a5fa; }
.ibjjf-kg-badge { font-weight: 700; padding: 2px 8px; border-radius: 6px; font-size: 0.8rem; display: inline-block; }
.ibjjf-kg-badge.male   { color: #60a5fa; background: #0c1a2e; }
.ibjjf-kg-badge.female { color: #f9a8d4; background: #1f0a1a; }

/* Gi color chips */
.ibjjf-gi-color-chip {
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-size: 0.8rem; font-weight: 700;
  border: 2px solid transparent;
}
.ibjjf-gi-color-chip.white { background: #e5e7eb; color: #111; border-color: #d1d5db; }
.ibjjf-gi-color-chip.blue  { background: #1d4ed8; color: #fff; border-color: #3b82f6; }
.ibjjf-gi-color-chip.black { background: #1f2937; color: #fff; border-color: #374151; }

.ibjjf-gi-icon-wrap {
  width: 36px; height: 36px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Time badge */
.ibjjf-time-badge {
  padding: 3px 10px;
  background: rgba(249,115,22,0.12);
  border: 1px solid rgba(249,115,22,0.3);
  border-radius: 20px;
  font-size: 0.75rem; font-weight: 700; color: #fb923c;
  white-space: nowrap;
}

/* Generic card */
.ibjjf-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  transition: border-color 0.15s;
}
.ibjjf-card:hover { border-color: #374151; }

/* Result list */
.ibjjf-result-list { display: flex; flex-direction: column; gap: 0.6rem; }

/* Empty state */
.ibjjf-empty {
  text-align: center;
  padding: 3rem 1rem;
  display: flex; flex-direction: column; align-items: center;
}

/* Responsive */
@media (max-width: 640px) {
  .ibjjf-modal-box { border-radius: 12px; }
  .ibjjf-modal-header { padding: 1rem; }
  .ibjjf-modal-search { padding: 0.75rem 1rem 0; }
  .ibjjf-tabs { padding: 0.5rem 1rem; }
  .ibjjf-modal-content { padding: 1rem; max-height: 60vh; }
  .ibjjf-belt-header { grid-template-columns: 1fr repeat(5, 44px); }
  .ibjjf-legality-row { grid-template-columns: 64px repeat(5, 1fr); }
  .ibjjf-status-badge { width: 26px; height: 26px; font-size: 0.68rem; }
  .ibjjf-point-number { font-size: 1.5rem; min-width: 2rem; }
}
