/* ============================================================
   OIKAWA'S OVERDRAFT — AI EDITION — style.css
   Preserves original dark glassmorphism + orange Haikyuu theme
   ============================================================ */

:root {
  --orange: #ff7518;
  --orange-dark: #e66a15;
  --dark: #0d0d0d;
  --gray: #1a1a1a;
  --light-gray: #2c2c2c;
  --success: #2ecc71;
  --warning: #f39c12;
  --danger: #e74c3c;
  --purple: #9b59b6;
}

body {
  background: var(--dark);
  color: #fff;
  font-family: "Poppins", sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background */
.bg-overlay {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(to bottom right, rgba(13,13,13,0.92), rgba(13,13,13,0.85)),
    url("https://wallpapers.com/images/hd/haikyuu-4k-karasuno-orange-team-0p1v12amv56hzz5z.jpg") center/cover no-repeat;
  z-index: -2;
}

.hero {
  background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.7));
}

.hero-img {
  max-height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(255,117,24,0.4));
}

/* ---- Typography ---- */
.text-orange { color: var(--orange) !important; }
.bg-orange { background-color: var(--orange) !important; }

/* ---- Buttons ---- */
.btn-orange {
  background: var(--orange);
  border: none;
  color: black;
  font-weight: 600;
  transition: all 0.3s;
}
.btn-orange:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255,117,24,0.35);
  color: black;
}
.btn-outline-orange {
  border-color: var(--orange);
  color: var(--orange);
}
.btn-outline-orange:hover {
  background: var(--orange);
  color: black;
}

/* ---- Cards ---- */
.glass-card {
  background: rgba(30,30,30,0.45);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,117,24,0.18);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s ease;
}
.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 30px rgba(255,117,24,0.12);
}
.glass-modal {
  background: rgba(20,20,20,0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,117,24,0.25);
  border-radius: 24px;
}
.glass-input {
  background: rgba(40,40,40,0.6) !important;
  border: 1px solid rgba(255,117,24,0.25) !important;
  color: white !important;
  border-radius: 12px;
}
.glass-input:focus {
  border-color: var(--orange) !important;
  box-shadow: 0 0 0 0.25rem rgba(255,117,24,0.25) !important;
  background: rgba(50,50,50,0.8) !important;
}
.glass-input option { background: #1a1a1a; color: white; }

/* ---- Quote ---- */
.quote-box {
  background: rgba(255,117,24,0.08);
  border-left: 4px solid var(--orange);
}
.funny-quote {
  color: #ffffff !important;
  opacity: 0.9;
  font-style: italic;
  font-size: 0.95rem;
}
.funny-quote:hover { color: var(--orange) !important; transition: color 0.3s; }

/* ---- Nav Tabs ---- */
.nav-tabs-custom {
  border-bottom: 2px solid rgba(255,117,24,0.25);
  gap: 4px;
}
.nav-tabs-custom .nav-link {
  color: rgba(255,255,255,0.6);
  border: 1px solid transparent;
  border-radius: 12px 12px 0 0;
  padding: 10px 18px;
  font-weight: 500;
  transition: all 0.3s;
}
.nav-tabs-custom .nav-link:hover {
  color: var(--orange);
  background: rgba(255,117,24,0.08);
  border-color: rgba(255,117,24,0.2);
}
.nav-tabs-custom .nav-link.active {
  color: var(--orange);
  background: rgba(255,117,24,0.15);
  border-color: rgba(255,117,24,0.4) rgba(255,117,24,0.4) transparent;
  font-weight: 600;
}

/* ---- Stat Cards ---- */
.stat-card { transition: all 0.3s; }
.stat-card:hover { transform: translateY(-6px); }
.stat-icon {
  font-size: 2rem;
  color: var(--orange);
  margin-bottom: 8px;
}

/* ---- Table ---- */
.table-dark { background: transparent !important; }
.table-dark td, .table-dark th {
  background: transparent !important;
  border-color: rgba(255,255,255,0.06) !important;
  color: white;
  vertical-align: middle;
}
.table-dark tbody tr:hover { background: rgba(255,117,24,0.06) !important; }

/* ---- Badges / Tags ---- */
.tag-badge {
  background: rgba(255,117,24,0.18);
  border: 1px solid rgba(255,117,24,0.35);
  color: var(--orange);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 0.75rem;
}
.badge-recurring {
  background: rgba(243,156,18,0.2);
  border: 1px solid #f39c12;
  color: #f39c12;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 0.75rem;
}

/* ---- Chat UI ---- */
#chat-messages {
  background: rgba(10,10,10,0.3);
  border-radius: 12px;
}
.chat-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  margin-bottom: 10px;
  line-height: 1.5;
  font-size: 0.9rem;
}
.chat-bubble.user {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: black;
  font-weight: 500;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.chat-bubble.ai {
  background: rgba(40,40,40,0.8);
  border: 1px solid rgba(255,117,24,0.2);
  color: #eee;
  border-bottom-left-radius: 4px;
}
.chat-bubble.typing {
  background: rgba(40,40,40,0.6);
  color: #888;
  font-style: italic;
}

/* ---- Health Score Circle ---- */
.score-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: conic-gradient(var(--orange) 0deg, rgba(255,117,24,0.15) 0deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 2.5rem;
  font-weight: 700;
  border: 6px solid rgba(255,117,24,0.25);
  box-shadow: 0 0 30px rgba(255,117,24,0.3);
  transition: all 1s ease;
}
.score-circle small { font-size: 0.9rem; color: #aaa; }

/* ---- Progress Bars ---- */
.health-bar-row { margin-bottom: 14px; }
.health-bar-row label { font-size: 0.85rem; color: #ccc; }
.progress { background: rgba(255,255,255,0.08); border-radius: 8px; }
.progress-bar { transition: width 1.2s ease; }

/* ---- COL Cards ---- */
.col-item-card {
  background: rgba(30,30,30,0.6);
  border: 1px solid rgba(255,117,24,0.15);
  border-radius: 14px;
  padding: 14px;
}

/* ---- Split Cards ---- */
.split-card {
  background: rgba(30,30,30,0.5);
  border: 1px solid rgba(255,117,24,0.15);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.split-member-tag {
  background: rgba(155,89,182,0.2);
  border: 1px solid rgba(155,89,182,0.4);
  color: #c39bd3;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 0.8rem;
}
.settled-tag {
  background: rgba(46,204,113,0.2);
  border: 1px solid rgba(46,204,113,0.4);
  color: #2ecc71;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 0.8rem;
}

/* ---- Heatmap colors ---- */
.heatmap-low { background: rgba(255,117,24,0.1); }
.heatmap-mid { background: rgba(255,117,24,0.4); }
.heatmap-high { background: rgba(255,117,24,0.85); color: black; font-weight: 600; }

/* ---- Footer ---- */
footer {
  background: linear-gradient(to top, #0d0d0d, #1a1a1a);
  border-top: 2px solid var(--orange);
  max-width: 1260px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 12px 12px 0 0;
}
footer a { transition: all 0.3s ease; opacity: 0.9; }
footer a:hover { color: var(--orange) !important; transform: translateY(-3px); opacity: 1; }

/* ---- Intro ---- */
#intro-overlay { background: rgba(0,0,0,0.95); }
#intro-video { max-width: 100vw; max-height: 100vh; }
#skip-intro { z-index: 10000; font-size: 1.2rem; padding: 0.5rem 1.5rem; }

/* ---- Light theme ---- */
[data-bs-theme="light"] .bg-overlay { opacity: 0.7; }
[data-bs-theme="light"] body { background: #f0f0f0; color: #212529; }
[data-bs-theme="light"] .glass-card,
[data-bs-theme="light"] .glass-modal {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,0.1);
}
[data-bs-theme="light"] .glass-input {
  background: rgba(255,255,255,0.85) !important;
  border-color: rgba(255,117,24,0.4) !important;
  color: #212529 !important;
}
[data-bs-theme="light"] .text-orange { color: #e66a15 !important; }
[data-bs-theme="light"] .funny-quote { color: #333 !important; }
[data-bs-theme="light"] .table-dark td,
[data-bs-theme="light"] .table-dark th { color: #212529; }
[data-bs-theme="light"] .chat-bubble.ai {
  background: rgba(240,240,240,0.9);
  color: #222;
}
[data-bs-theme="light"] .nav-tabs-custom .nav-link { color: rgba(0,0,0,0.6); }
[data-bs-theme="light"] #chat-messages { background: rgba(230,230,230,0.4); }

/* ---- Animations ---- */
@keyframes fadeIn { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform: none; } }
.tab-content-panel { animation: fadeIn 0.4s ease; }

/* ---- Live rate badge ---- */
#live-rate-badge { font-size: 0.8rem !important; padding: 6px 14px; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 4px; }
