/* ===================================================
   Class Patch Notes & Balance Styles - Rappelz Arise
   =================================================== */

.patch-hero {
  position: relative;
  background: radial-gradient(circle at 50% 30%, rgba(212, 175, 55, 0.08), transparent 70%),
              linear-gradient(180deg, rgba(13, 12, 10, 0.8) 0%, rgba(13, 12, 10, 0.98) 100%),
              url('../../assets/images/illustrations/class-council-r1.webp') center/cover no-repeat;
  padding: 3.5rem 1rem 2.5rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  text-align: center;
}

.patch-badge-group {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(8px);
}

.patch-version-tag {
  color: #ffd700;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.patch-title {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  color: #f5f3ef;
  margin: 0 0 0.75rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.7);
}

.patch-lead {
  max-width: 760px;
  margin: 0 auto;
  color: #bfae8a;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Stat Counter Bar */
.patch-stats-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2rem auto 0;
  max-width: 860px;
}

.patch-stat-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(22, 20, 16, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #d1c7b7;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.patch-stat-pill strong {
  font-size: 1.15rem;
  font-weight: 800;
}

.stat-buff { color: #4ade80; border-color: rgba(74, 222, 128, 0.25); }
.stat-buff strong { color: #4ade80; }
.stat-nerf { color: #f87171; border-color: rgba(248, 113, 113, 0.25); }
.stat-nerf strong { color: #f87171; }
.stat-rework { color: #a78bfa; border-color: rgba(167, 139, 250, 0.25); }
.stat-rework strong { color: #a78bfa; }
.stat-ultimate { color: #fbbf24; border-color: rgba(251, 191, 36, 0.25); }
.stat-ultimate strong { color: #fbbf24; }

/* Filter & Search Bar */
.patch-control-section {
  background: rgba(18, 16, 13, 0.6);
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 1rem;
}

.patch-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.patch-search-wrapper {
  position: relative;
  width: 100%;
}

.patch-search-input {
  width: 100%;
  background: rgba(10, 9, 8, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.patch-search-input:focus {
  border-color: #ffd700;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.25);
}

/* Class Carousel / Selector */
.class-tabs-container {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.class-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(25, 22, 18, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  color: #c4b998;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.class-tab-btn:hover {
  background: rgba(40, 36, 28, 0.9);
  color: #fff;
  border-color: rgba(212, 175, 55, 0.3);
}

.class-tab-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(150, 115, 30, 0.15));
  border-color: #ffd700;
  color: #fff;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.class-tab-img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Type Filter Chips */
.type-filter-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.type-chip {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(20, 18, 14, 0.6);
  color: #a89d88;
  transition: all 0.15s ease;
}

.type-chip:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.type-chip.active {
  background: #f5f3ef;
  color: #0d0c0a;
  border-color: #fff;
}

.type-chip.chip-buff.active { background: #4ade80; color: #022c22; border-color: #4ade80; }
.type-chip.chip-nerf.active { background: #f87171; color: #450a0a; border-color: #f87171; }
.type-chip.chip-rework.active { background: #a78bfa; color: #2e1065; border-color: #a78bfa; }
.type-chip.chip-ultimate.active { background: #fbbf24; color: #451a03; border-color: #fbbf24; }

/* Grid of Changes */
.patch-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0 4rem;
}

@media (max-width: 640px) {
  .patch-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Individual Balance Card */
.balance-card {
  position: relative;
  background: rgba(18, 16, 13, 0.92);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 12px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.balance-card:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
}

/* Left/Right glow strip depending on type */
.balance-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
}
[dir="ltr"] .balance-card::before { left: 0; }
[dir="rtl"] .balance-card::before { right: 0; }

.balance-card.card-buff::before { background: #4ade80; box-shadow: 0 0 12px #4ade80; }
.balance-card.card-nerf::before { background: #f87171; box-shadow: 0 0 12px #f87171; }
.balance-card.card-rework::before { background: #a78bfa; box-shadow: 0 0 12px #a78bfa; }
.balance-card.card-ultimate::before { background: #fbbf24; box-shadow: 0 0 12px #fbbf24; }

/* Card Header */
.card-header-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.skill-icon-wrapper {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(212, 175, 55, 0.4);
  background: #000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.skill-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-title-meta {
  flex: 1;
  min-width: 0;
}

.skill-names {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.skill-name-primary {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.25;
}

.skill-name-secondary {
  font-size: 0.82rem;
  color: #8c826e;
  font-weight: 500;
}

.card-class-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: #d4af37;
  font-weight: 600;
}

.class-mini-icon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  object-fit: cover;
}

/* Tag Badge */
.change-badge {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.tag-buff { background: rgba(74, 222, 128, 0.15); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.4); }
.tag-nerf { background: rgba(248, 113, 113, 0.15); color: #f87171; border: 1px solid rgba(248, 113, 113, 0.4); }
.tag-rework { background: rgba(167, 139, 250, 0.15); color: #a78bfa; border: 1px solid rgba(167, 139, 250, 0.4); }
.tag-ultimate { background: rgba(251, 191, 36, 0.15); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.4); }

/* Card Content */
.card-summary {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffd700;
  margin: 0;
  line-height: 1.45;
  background: rgba(212, 175, 55, 0.05);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border-left: 3px solid #d4af37;
}
[dir="rtl"] .card-summary {
  border-left: none;
  border-right: 3px solid #d4af37;
}

.card-details-list {
  margin: 0;
  padding: 0 0 0 1.25rem;
  list-style: square;
  color: #ded6c8;
  font-size: 0.9rem;
  line-height: 1.6;
}
[dir="rtl"] .card-details-list {
  padding: 0 1.25rem 0 0;
}

.card-details-list li {
  margin-bottom: 0.35rem;
}

/* Before / After Box */
.before-after-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: auto;
  background: rgba(10, 9, 8, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
}

.ba-col {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ba-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ba-before .ba-label { color: #8c826e; }
.ba-before .ba-val { color: #a39985; text-decoration: line-through; opacity: 0.8; }

.ba-after .ba-label { color: #4ade80; }
.ba-after .ba-val { color: #fff; font-weight: 700; }

.card-nerf .ba-after .ba-label { color: #f87171; }
.card-rework .ba-after .ba-label { color: #a78bfa; }
.card-ultimate .ba-after .ba-label { color: #fbbf24; }

/* Empty state */
.patch-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: #8c826e;
  font-size: 1.1rem;
}
