/* === GemStone IV - Custom Styles === */

/* Purple/silver color accents */
:root {
  --gs-purple: #8e44ad;
  --gs-purple-dim: #6c3483;
  --gs-purple-glow: rgba(142, 68, 173, 0.4);
  --gs-silver: #bdc3c7;
  --gs-silver-bright: #ecf0f1;
  --gs-gold-warm: #daa520;
}

/* === Quest Log Styling === */
.quest-log {
  padding: 4px 0;
}

.quest-entry {
  padding: 4px 0;
  border-bottom: 1px solid rgba(142, 68, 173, 0.15);
  font-size: 0.78rem;
}

.quest-entry:last-child {
  border-bottom: none;
}

.quest-name {
  color: var(--gs-purple);
  font-weight: 600;
  font-size: 0.8rem;
}

.quest-name.completed {
  color: var(--gs-silver);
  text-decoration: line-through;
  opacity: 0.6;
}

.quest-objective {
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-style: italic;
  padding-left: 8px;
  margin-top: 2px;
}

.quest-objective::before {
  content: "\25B8 ";
  color: var(--gs-purple-dim);
}

/* === Skill Display === */
.skill-display {
  padding: 2px 0;
}

.skill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0;
  font-size: 0.76rem;
}

.skill-name {
  color: var(--gs-silver);
  flex: 1;
}

.skill-value {
  color: var(--gs-purple);
  font-weight: 600;
  min-width: 28px;
  text-align: right;
}

.skill-rank {
  color: var(--text-secondary);
  font-size: 0.68rem;
  margin-left: 4px;
  min-width: 40px;
  text-align: right;
}

.skill-bar-wrap {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  margin-left: 6px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: var(--gs-purple);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* === Spell Preparing Indicator === */
.spell-preparing {
  padding: 8px 10px;
  margin: 6px 0;
  background: rgba(142, 68, 173, 0.15);
  border: 1px solid var(--gs-purple);
  border-radius: 8px;
  text-align: center;
  animation: spellPulse 1.5s ease-in-out infinite;
}

.spell-preparing-label {
  color: var(--gs-purple);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.spell-preparing-name {
  color: var(--gs-silver-bright);
  font-size: 1rem;
  font-weight: 700;
  margin-top: 2px;
}

@keyframes spellPulse {
  0%, 100% {
    box-shadow: 0 0 8px var(--gs-purple-glow);
    border-color: var(--gs-purple);
  }
  50% {
    box-shadow: 0 0 20px var(--gs-purple-glow), 0 0 40px rgba(142, 68, 173, 0.15);
    border-color: #a569bd;
  }
}

/* === Terminal enhancements for GemStone === */
.terminal-line.spell-prepare {
  color: var(--gs-purple);
  font-style: italic;
}

.terminal-line.skill-up {
  color: #1abc9c;
  font-weight: 600;
}

.terminal-line.examine-title {
  color: var(--gs-silver-bright);
  font-weight: 700;
  margin-top: 4px;
}

.terminal-line.examine-lore {
  color: var(--gs-silver);
  font-style: italic;
  padding-left: 8px;
  border-left: 2px solid var(--gs-purple-dim);
  margin: 2px 0 4px 4px;
}

.terminal-line.quest-new {
  color: var(--gs-purple);
  font-weight: 700;
  font-size: 1rem;
  margin-top: 6px;
}

.terminal-line.quest-desc {
  color: var(--gs-silver);
  font-style: italic;
  padding-left: 4px;
}

.terminal-line.quest-update {
  color: var(--gs-purple);
  font-weight: 600;
}

.terminal-line.quest-reward {
  color: var(--gs-gold-warm);
  font-style: italic;
}

.terminal-line.quest-complete {
  color: #2ecc71;
  font-weight: 700;
  font-size: 1rem;
  text-shadow: 0 0 8px rgba(46, 204, 113, 0.3);
}

/* === Action button - spell category === */
.mud-actions .btn.cat-spell {
  border-color: var(--gs-purple);
  color: var(--gs-purple);
  animation: spellBtnPulse 1.2s ease-in-out infinite;
}

.mud-actions .btn.cat-spell:hover {
  background: var(--gs-purple);
  color: white;
}

@keyframes spellBtnPulse {
  0%, 100% { box-shadow: 0 0 4px var(--gs-purple-glow); }
  50% { box-shadow: 0 0 12px var(--gs-purple-glow); }
}

/* === Action button - examine category === */
.mud-actions .btn.cat-examine {
  border-color: var(--gs-silver);
  color: var(--gs-silver);
  font-size: 0.78rem;
}

.mud-actions .btn.cat-examine:hover {
  background: var(--gs-silver);
  color: var(--bg-dark);
}

/* === Profession selection grid for 10 professions === */
.profession-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  max-width: 820px;
  width: 100%;
}

.profession-card {
  padding: 14px 10px;
  border: 2px solid rgba(142, 68, 173, 0.25);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.profession-card:hover {
  border-color: var(--gs-purple);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--gs-purple-glow);
}

.profession-card.selected {
  border-color: var(--gs-purple);
  background: rgba(142, 68, 173, 0.15);
}

.profession-card h3 {
  color: var(--gs-purple);
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.profession-card p {
  color: var(--text-secondary);
  font-size: 0.72rem;
  margin: 0;
  line-height: 1.3;
}

/* === GemStone header accent === */
.top-bar h1 {
  color: var(--gs-purple);
  text-shadow: 0 0 12px var(--gs-purple-glow);
}

/* === Game over styling === */
.gs-victory {
  color: var(--gs-purple);
  text-shadow: 0 0 20px var(--gs-purple-glow);
}

.gs-defeat {
  color: #e74c3c;
}

/* === Sidebar purple accents === */
.mud-sidebar .sidebar-label {
  color: var(--gs-purple-dim);
}

.mud-sidebar .sidebar-name {
  color: var(--gs-purple);
}

/* === MUD layout border accents === */
.mud-terminal-wrap {
  border-right-color: rgba(142, 68, 173, 0.15);
}

.mud-sidebar {
  border-left-color: rgba(142, 68, 173, 0.15);
}

.mud-actions {
  border-top-color: rgba(142, 68, 173, 0.15);
}

/* === Responsive adjustments === */
@media (max-width: 768px) {
  .profession-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .spell-preparing {
    padding: 6px 8px;
  }
}

@media (max-width: 480px) {
  .profession-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .profession-card {
    padding: 10px 6px;
  }

  .profession-card h3 {
    font-size: 0.82rem;
  }

  .profession-card p {
    font-size: 0.65rem;
  }
}
