/* =============================================================================
 * FWO Player Portal - Skills & Crafting (Kemahiran & Pertukangan)
 * ========================================================================== */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.skill-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.skill-card:hover {
  transform: translateY(-2px);
  border-color: rgba(201,162,75,0.45);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 12px rgba(201,162,75,0.1);
}

.skill-card-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.85rem;
}

.skill-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(201,162,75,0.4);
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.skill-icon-wrap img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
}

.skill-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}

.skill-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(201,162,75,0.12);
  color: var(--gold2);
  border: 1px solid rgba(201,162,75,0.25);
  margin-top: 0.25rem;
  display: inline-block;
}

.skill-summary {
  color: #cbd5e1;
  font-size: 0.86rem;
  line-height: 1.55;
  margin-bottom: 1rem;
  flex: 1;
}

/* Locations Chips */
.skill-loc-section {
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.85rem;
}

.loc-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--gold2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.45rem;
}

.loc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.loc-chip {
  font-size: 0.72rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  color: #94a3b8;
  cursor: help;
  transition: all 0.15s ease;
  position: relative;
}

.loc-chip:hover {
  background: rgba(201,162,75,0.2);
  border-color: var(--gold);
  color: #fff;
}

/* Detail Guide Drawer / Card */
.skill-detail-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 0.8rem;
  background: rgba(201,162,75,0.08);
  border: 1px solid rgba(201,162,75,0.25);
  border-radius: 8px;
  color: var(--gold2);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.skill-detail-toggle:hover {
  background: rgba(201,162,75,0.18);
  color: #fff;
}

.skill-guide-drawer {
  display: none;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(201,162,75,0.3);
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.skill-guide-drawer.open {
  display: block;
}

.guide-section-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: #38bdf8;
  text-transform: uppercase;
  margin: 0.6rem 0 0.35rem;
  letter-spacing: 0.05em;
}

.guide-list {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.4rem 0 0.6rem;
  font-size: 0.78rem;
}

.rank-table td, .rank-table th {
  padding: 0.3rem 0.5rem;
  border: 1px solid rgba(255,255,255,0.06);
}

.rank-table th {
  background: rgba(0,0,0,0.4);
  color: var(--gold2);
  font-weight: 700;
}

/* Town Abbreviations Guide Card */
.abbr-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 2rem;
}

.abbr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
  margin-top: 0.85rem;
  font-size: 0.8rem;
}

.abbr-item {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  background: rgba(2, 6, 23, 0.4);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.03);
}

.abbr-code {
  font-weight: 800;
  color: var(--gold2);
  min-width: 38px;
}

.abbr-name {
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
}
