/* Global Styles & Variables */
:root {
  --bg-main: #08090a;
  --bg-card: #0f1115;
  --bg-sidebar: #060708;
  --bg-header: rgba(15, 17, 21, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(255, 255, 255, 0.15);
  
  --text-main: #e2e8f0;
  --text-muted: #a8b4c7;
  --text-bright: #ffffff;
  
  --accent: #ff8000;
  --accent-glow: rgba(255, 128, 0, 0.3);
  
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Class Colors */
  --class-warrior: #c79c6e;
  --class-paladin: #f58cba;
  --class-hunter: #abd473;
  --class-rogue: #fff569;
  --class-priest: #ffffff;
  --class-deathknight: #c41f3b;
  --class-shaman: #0070de;
  --class-mage: #3fc7eb;
  --class-warlock: #8787ed;
  --class-monk: #00ff96;
  --class-druid: #ff7d0a;
  --class-demonhunter: #a330c9;
  --class-evoker: #33937f;
  
  /* Rarity Colors */
  --rarity-poor: #9d9d9d;
  --rarity-common: #ffffff;
  --rarity-uncommon: #1eff00;
  --rarity-rare: #0070dd;
  --rarity-epic: #a335ee;
  --rarity-legendary: #ff8000;
  --rarity-artifact: #e6cc80;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  overflow-x: hidden;
}

/* Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* Texto oculto visualmente pero leído por lectores de pantalla */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Foco visible global (accesibilidad por teclado) */
:focus-visible {
  outline: 2px solid #00f0ff;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Main Content Area */
.main-content {
  margin-left: 0;
  width: 100%;
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Header / Search Navbar */
.app-header {
  height: 70px;
  background-color: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-search-container {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 99px;
  padding: 0 16px;
  width: 400px;
  transition: all 0.2s ease;
}

.header-search-container:focus-within {
  width: 500px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.05);
}

.search-icon {
  color: var(--text-muted);
  margin-right: 8px;
}

#guild-search-input {
  background: transparent;
  border: none;
  color: var(--text-bright);
  padding: 10px 0;
  width: 100%;
  outline: none;
  font-family: var(--font-body);
  font-size: 14px;
}

#guild-search-input::placeholder {
  color: var(--text-muted);
}

.wow-region {
  background: linear-gradient(135deg, #0070dd, #00f0ff);
  color: #fff;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 99px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 112, 221, 0.3);
}

/* Views & Content */
.content-view {
  padding: 32px;
  flex-grow: 1;
}

/* Guild Banner */
.guild-banner {
  background: linear-gradient(135deg, #12141c, #07080a);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.guild-banner::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 250px;
  height: 100%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.guild-banner-crest img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--border-glow);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.1);
  background-color: #000;
}

.guild-banner-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.guild-banner-name {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 32px;
  color: var(--text-bright);
  letter-spacing: -0.5px;
}

.guild-banner-meta {
  color: var(--text-muted);
  font-size: 14px;
}

.guild-meta-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin: 0 8px;
  object-fit: contain;
}

/* Filter Panel */
.filter-panel {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 8px;
}

.filter-group label {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  font-family: var(--font-title);
  font-weight: 600;
}

.filter-group select {
  background: transparent;
  border: none;
  color: var(--text-bright);
  outline: none;
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
}

.filter-group select option {
  background-color: var(--bg-card);
  color: var(--text-bright);
}

/* Roster Grid */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Roster Member Card */
.member-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.member-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--class-color, var(--text-muted));
}

.member-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.member-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.member-name {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 18px;
  color: var(--class-color, var(--text-bright));
}

.member-level-race {
  font-size: 12px;
  color: var(--text-muted);
}

.member-rank-badge,
.member-faction-badge {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* Rank Badge Variants */
.member-card[data-rank="GM"] .member-rank-badge {
  background-color: rgba(255, 128, 0, 0.1);
  color: var(--rarity-legendary);
  border-color: rgba(255, 128, 0, 0.2);
}
.member-card[data-rank="Tesorero"] .member-rank-badge {
  background-color: rgba(0, 240, 255, 0.1);
  color: #00f0ff;
  border-color: rgba(0, 240, 255, 0.2);
}
.member-card[data-rank="Oficial"] .member-rank-badge {
  background-color: rgba(163, 53, 238, 0.1);
  color: var(--rarity-epic);
  border-color: rgba(163, 53, 238, 0.2);
}
.member-card[data-rank="Raider"] .member-rank-badge {
  background-color: rgba(0, 112, 221, 0.1);
  color: var(--rarity-rare);
  border-color: rgba(0, 112, 221, 0.2);
}
.member-card[data-rank="Trial"] .member-rank-badge {
  background-color: rgba(30, 255, 0, 0.1);
  color: var(--rarity-uncommon);
  border-color: rgba(30, 255, 0, 0.2);
}

.member-chevron {
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.2s ease;
}

.member-card:hover .member-chevron {
  opacity: 1;
  transform: translateX(0);
}

/* Loading Spiner */
.loading-spinner-container {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 0;
  gap: 16px;
  color: var(--text-muted);
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: #00f0ff;
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Character View Styles (Murlok.io Clone) */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 24px;
  transition: all 0.2s ease;
}

.btn-back:hover {
  color: var(--text-bright);
  border-color: var(--border-glow);
  background-color: rgba(255, 255, 255, 0.02);
}

/* Character Header Banner */
.character-header {
  position: relative;
  background-color: #000;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  height: 200px;
  overflow: hidden;
  margin-bottom: 32px;
  display: flex;
  align-items: flex-end;
  padding: 32px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.character-header-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center 30%;
  opacity: 0.35;
  pointer-events: none;
  filter: blur(2px);
  transition: opacity 0.5s ease;
}

.character-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70%;
  background: linear-gradient(0deg, #000 0%, transparent 100%);
  pointer-events: none;
}

.character-header-details {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: flex-end;
}

.character-main-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.character-spec-icons {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 8px;
  gap: 8px;
}

.character-spec-icons img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.character-names {
  display: flex;
  flex-direction: column;
}

.character-name-title {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 32px;
  color: var(--class-color, var(--text-bright));
  line-height: 1.1;
  text-shadow: 0 4px 12px rgba(0,0,0,0.8);
}

.character-subname {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

.character-badges {
  display: flex;
  gap: 16px;
}

.badge {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
}

.badge-label {
  font-size: 9px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.badge-value {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 16px;
  color: var(--text-bright);
}

.mplus-rating-badge .badge-value {
  color: var(--rarity-legendary);
}

/* Character Grid Layout */
.character-grid-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
}

/* Section detail box */
.detail-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.section-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 20px;
  color: var(--text-bright);
  margin-bottom: 20px;
  letter-spacing: -0.2px;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header-row .section-title {
  margin-bottom: 0;
}

.hero-talent-badge {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 12px;
  color: var(--class-color, var(--rarity-legendary));
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 4px 12px;
  border-radius: 8px;
}

/* Stats Section */
.stats-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.stats-group h3 {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.stats-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-bar-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.stat-name {
  color: var(--text-main);
  font-weight: 500;
}

.stat-value {
  color: var(--text-bright);
  font-weight: 700;
}

.stat-bar-bg {
  height: 8px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--class-color, #00f0ff), #00ff96);
  border-radius: 4px;
  width: 0%;
  transition: width 1s ease-out;
}

.stats-bars .stat-bar-fill.minor {
  background: linear-gradient(90deg, #ff8000, #ffea00);
}

/* Talents — agrupado estilo Murlok.io */
.talents-groups {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.talent-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.talent-group-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}

.talents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.talent-card {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
}

.talent-card:hover {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: var(--class-color, rgba(255, 255, 255, 0.25));
  transform: translateY(-1px);
}

.talent-icon-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.talent-icon-wrap img {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: block;
}

/* Pip de rango (esquina inferior derecha del icono, como Murlok.io) */
.talent-rank-pip {
  position: absolute;
  right: -4px;
  bottom: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0b0d11;
  border: 1px solid var(--class-color, var(--accent));
  color: var(--text-bright);
  border-radius: 9px;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 10px;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.talent-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.talent-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a2e;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 14px;
  max-width: 280px;
  width: max-content;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  font-size: 12px;
  color: #c8c8d0;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: normal;
  text-align: left;
}

.talent-card:hover .talent-tooltip {
  display: block;
}

/* Mythic Plus Best Runs List */
.mplus-runs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mplus-run-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mplus-run-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mplus-run-dungeon {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--text-bright);
  font-size: 14px;
}

.mplus-run-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.mplus-run-level {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 16px;
  color: var(--rarity-legendary);
  background-color: rgba(255, 128, 0, 0.08);
  border: 1px solid rgba(255, 128, 0, 0.2);
  padding: 4px 10px;
  border-radius: 6px;
}

.mplus-run-level.out-of-time {
  color: var(--text-muted);
  background-color: rgba(255, 255, 255, 0.03);
  border-color: var(--border-color);
}

/* Gear Grid Layout (Left and Right Slots) */
.gear-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 20px;
  align-items: center;
}

.gear-slot-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Render 3D Art Overlay */
.center-render {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 100%;
}

.character-render-container {
  width: 100%;
  height: 380px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.char-render-img {
  width: auto;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.8));
  transition: transform 0.5s ease;
}

.char-render-img:hover {
  transform: scale(1.05);
}

/* Gear Cards */
.gear-item-card {
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 56px;
  transition: all 0.2s ease;
  position: relative;
}

.gear-item-card.has-item {
  border-color: var(--quality-color);
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(255, 255, 255, 0.02));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gear-item-card.has-item:hover {
  border-color: var(--quality-color);
  box-shadow: 0 0 12px var(--quality-color);
  transform: translateY(-1px);
}

/* Slot Empty Placeholder Icon */
.gear-item-card::before {
  content: attr(data-slot);
  position: absolute;
  right: 12px;
  font-size: 8px;
  color: rgba(255, 255, 255, 0.15);
  font-family: var(--font-title);
  font-weight: 800;
  pointer-events: none;
}

.gear-icon-wrapper {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--quality-color, rgba(255, 255, 255, 0.1));
  overflow: hidden;
  flex-shrink: 0;
}

.gear-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gear-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex-grow: 1;
}

.gear-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 12px;
  color: var(--quality-color, var(--text-bright));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.gear-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.gear-ilvl {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
}

/* Enchants and Gems indicators in gear cards */
.gear-enhancements {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.gem-badge-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  color: #00f0ff;
  font-size: 9px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.2s ease;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gem-badge-link:hover {
  background-color: rgba(0, 240, 255, 0.16);
  border-color: rgba(0, 240, 255, 0.4);
  transform: translateY(-0.5px);
}

.gem-badge-dot {
  width: 5px;
  height: 5px;
  background-color: #00f0ff;
  border-radius: 50%;
  box-shadow: 0 0 4px #00f0ff;
  flex-shrink: 0;
}

.gem-badge-text, .enchant-badge-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.enchant-badge-link {
  display: inline-flex;
  align-items: center;
  background-color: rgba(30, 255, 0, 0.06);
  border: 1px solid rgba(30, 255, 0, 0.18);
  padding: 2px 6px;
  border-radius: 4px;
  color: #1eff00;
  font-size: 9px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.2s ease;
  max-width: 120px;
}

.enchant-badge-link:hover {
  background-color: rgba(30, 255, 0, 0.12);
  border-color: rgba(30, 255, 0, 0.35);
  transform: translateY(-0.5px);
}

.embellish-tag-badge {
  display: inline-flex;
  align-items: center;
  background-color: rgba(255, 128, 0, 0.08);
  border: 1px solid rgba(255, 128, 0, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  color: #ff8000;
  font-size: 9px;
  font-weight: bold;
  cursor: default;
}

/* Bottom weapon / ring / trinket layout */
.weapon-slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 20px;
}

/* Responsive Rules */
@media (max-width: 1200px) {
  .character-grid-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
  }
  .app-header {
    padding: 0 16px;
    gap: 12px;
  }
  .header-search-container {
    width: auto;
    flex: 1;
    min-width: 0;
  }
  .header-search-container:focus-within {
    width: auto;
    flex: 1;
  }
  .content-view {
    padding: 16px;
  }
  .filter-panel {
    flex-wrap: wrap;
    gap: 8px;
  }
  .guild-banner {
    padding: 20px;
    gap: 16px;
  }
  .guild-banner-name {
    font-size: 24px;
  }
  .gear-grid {
    grid-template-columns: 1fr;
  }
  .center-render {
    display: none;
  }
  .weapon-slots {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .wow-region {
    display: none;
  }
  .character-header {
    height: auto;
    padding: 20px;
  }
  .character-header-details {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .character-badges {
    flex-wrap: wrap;
    gap: 8px;
  }
  .badge {
    min-width: 80px;
    padding: 8px 12px;
  }
  .character-name-title {
    font-size: 24px;
  }
}

/* ==========================================================================
   NEW ADDITIONS: COPY TALENTS & RAID PROGRESSION
   ========================================================================== */

/* Copy Talents Button styling */
.btn-copy-talents {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 11px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-copy-talents:hover {
  color: var(--text-bright);
  border-color: var(--class-color, var(--accent));
  background-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

.btn-copy-talents svg {
  flex-shrink: 0;
}

/* Raid Progression list styling */
.raid-prog-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.raid-prog-item {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.2s ease;
}

.raid-prog-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: var(--border-glow);
}

.raid-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.raid-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.raid-badges-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Raid Difficulty Badge */
.raid-diff-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 11px;
  border: 1px solid transparent;
  cursor: default;
  transition: all 0.2s ease;
}

.raid-diff-badge .diff-letter {
  opacity: 0.85;
}

.raid-diff-badge .diff-count {
  font-weight: 900;
}

/* Specific Difficulty colors */
.raid-diff-badge.diff-lfr {
  background-color: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.raid-diff-badge.diff-normal {
  background-color: rgba(30, 255, 0, 0.05);
  border-color: rgba(30, 255, 0, 0.15);
  color: var(--rarity-uncommon);
}

.raid-diff-badge.diff-heroic {
  background-color: rgba(0, 112, 221, 0.05);
  border-color: rgba(0, 112, 221, 0.15);
  color: var(--rarity-rare);
}

.raid-diff-badge.diff-mythic {
  background-color: rgba(163, 53, 238, 0.05);
  border-color: rgba(163, 53, 238, 0.15);
  color: var(--rarity-epic);
}

/* Modifiers */
.raid-diff-badge.no-progress {
  opacity: 0.35;
}

.raid-diff-badge.fully-completed.diff-normal {
  background-color: var(--rarity-uncommon);
  border-color: var(--rarity-uncommon);
  color: #000;
  box-shadow: 0 0 8px rgba(30, 255, 0, 0.3);
}

.raid-diff-badge.fully-completed.diff-heroic {
  background-color: var(--rarity-rare);
  border-color: var(--rarity-rare);
  color: #fff;
  box-shadow: 0 0 8px rgba(0, 112, 221, 0.4);
}

.raid-diff-badge.fully-completed.diff-mythic {
  background-color: var(--rarity-epic);
  border-color: var(--rarity-epic);
  color: #fff;
  box-shadow: 0 0 8px rgba(163, 53, 238, 0.4);
}

/* ==========================================================================
   SKELETON LOADING
   ========================================================================== */

@keyframes skeleton-pulse {
  0%   { opacity: 0.55; }
  50%  { opacity: 0.95; }
  100% { opacity: 0.55; }
}

.skeleton-line,
.skeleton-block {
  display: block;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.10) 50%,
    rgba(255, 255, 255, 0.04) 100%
  );
  border-radius: 6px;
  animation: skeleton-pulse 1.2s ease-in-out infinite;
}

.skeleton-line {
  height: 14px;
  margin: 6px 0;
}

.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 65%; }
.skeleton-line.long   { width: 90%; }

.skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.skeleton-row .skeleton-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  animation: skeleton-pulse 1.2s ease-in-out infinite;
}

.skeleton-row .skeleton-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ==========================================================================
   EXTERNAL LINKS & LAST LOGIN (Character Header)
   ========================================================================== */

.character-last-login {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.character-external-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.ext-link-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border-color);
  color: var(--text-bright);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 6px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.ext-link-badge:hover {
  border-color: var(--class-color, var(--border-glow));
  background: rgba(0, 0, 0, 0.75);
  transform: translateY(-1px);
}

.ext-link-badge svg {
  width: 12px;
  height: 12px;
  opacity: 0.8;
}

.ext-link-badge.raiderio { color: #ff7a00; }
.ext-link-badge.warcraftlogs { color: #d6a847; }
.ext-link-badge.armory { color: #00b4ff; }
.ext-link-badge.wowprogress { color: #b388ff; }

/* ==========================================================================
   HOME / LANDING PAGE
   ========================================================================== */

.header-home-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: 20px;
  flex-shrink: 0;
}

.header-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border-glow);
}

.header-guild-name {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 18px;
  color: var(--text-bright);
  letter-spacing: -0.3px;
}

.btn-login {
  background: linear-gradient(135deg, #5865F2, #4752c4);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(88, 101, 242, 0.4);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-name-label {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-bright);
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 8px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  color: var(--class-deathknight);
  border-color: var(--class-deathknight);
}

/* Landing Hero */
.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 32px 48px;
  position: relative;
}

.landing-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 128, 0, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.landing-emblem-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--border-glow);
  box-shadow: 0 0 40px rgba(255, 128, 0, 0.2);
  background: #000;
  margin-bottom: 24px;
}

.landing-title {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 56px;
  color: var(--text-bright);
  letter-spacing: -1.5px;
  margin-bottom: 8px;
}

.landing-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.landing-description {
  max-width: 600px;
  font-size: 15px;
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 32px;
}

.landing-cta {
  margin-bottom: 16px;
}

.landing-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-size: 16px;
}

/* Landing Raid Links */
.landing-raid-links {
  padding: 0 32px 64px;
  max-width: 900px;
  margin: 0 auto;
}

.landing-section-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 22px;
  color: var(--text-bright);
  text-align: center;
  margin-bottom: 28px;
}

.raid-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 14px;
}

.raid-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px 16px;
  text-decoration: none;
  transition: all 0.2s ease;
  text-align: center;
}

.raid-link-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.raid-link-card.rio:hover { border-color: #ff7a00; box-shadow: 0 8px 24px rgba(255, 122, 0, 0.15); }
.raid-link-card.wcl:hover { border-color: #d6a847; box-shadow: 0 8px 24px rgba(214, 168, 71, 0.15); }
.raid-link-card.archon:hover { border-color: #00b4ff; box-shadow: 0 8px 24px rgba(0, 180, 255, 0.15); }
.raid-link-card.murlok:hover { border-color: #a335ee; box-shadow: 0 8px 24px rgba(163, 53, 238, 0.15); }
.raid-link-card.raidbots:hover { border-color: #ff8000; box-shadow: 0 8px 24px rgba(255, 128, 0, 0.15); }
.raid-link-card.bloodmallet:hover { border-color: #ef4444; box-shadow: 0 8px 24px rgba(239, 68, 68, 0.15); }
.raid-link-card.battlenet:hover { border-color: #00aeff; box-shadow: 0 8px 24px rgba(0, 174, 255, 0.15); }
.raid-link-card.questionablyepic:hover { border-color: #a335ee; box-shadow: 0 8px 24px rgba(163, 53, 238, 0.15); }
.raid-link-card.discord-irdem:hover { border-color: #5865F2; box-shadow: 0 8px 24px rgba(88, 101, 242, 0.15); }
.raid-link-card.lorrgs:hover { border-color: #c9a53f; box-shadow: 0 8px 24px rgba(201, 165, 63, 0.15); }
.raid-link-card.mythictrap:hover { border-color: #e63946; box-shadow: 0 8px 24px rgba(230, 57, 70, 0.15); }
.raid-link-card.wowaudit:hover { border-color: #52b788; box-shadow: 0 8px 24px rgba(82, 183, 136, 0.15); }
.raid-link-card.curseforge:hover { border-color: #f1641e; box-shadow: 0 8px 24px rgba(241, 100, 30, 0.15); }
.raid-link-card.discord:hover { border-color: #5865F2; box-shadow: 0 8px 24px rgba(88, 101, 242, 0.15); }
.raid-link-card.teamspeak:hover { border-color: #2590be; box-shadow: 0 8px 24px rgba(37, 144, 190, 0.15); }

.raid-link-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.raid-link-icon svg {
  display: block;
}

.raid-link-name {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 14px;
  color: var(--text-bright);
}

.raid-link-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* Login Page */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 32px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 48px;
  text-align: center;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.login-emblem {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--border-glow);
  margin-bottom: 24px;
}

.login-title {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 28px;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.login-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.login-btn-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 15px;
}

/* Discord Button */
.btn-discord-login {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #5865F2;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-discord-login:hover {
  background: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
}

.btn-discord-invite {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #5865F2;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 4px;
}

.btn-discord-invite:hover {
  background: #4752c4;
  transform: translateY(-1px);
}

.btn-roster-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-bright);
  padding: 14px 28px;
  border-radius: 10px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-roster-link:hover {
  border-color: var(--border-glow);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px;
  max-width: 420px;
  width: 90%;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--text-bright);
}

.modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.modal-icon {
  font-size: 48px;
  color: var(--class-deathknight);
  margin-bottom: 8px;
}

.modal-content h2 {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 24px;
  color: var(--text-bright);
}

.modal-content p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Footer */
.site-footer {
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border-color);
  padding: 32px 32px 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.footer-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
}

.footer-guild-name {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 20px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.footer-links a:hover {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.03);
}

.footer-link-discord {
  color: #5865F2 !important;
}

.footer-copy {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.15);
  text-align: center;
  letter-spacing: 0.3px;
}

/* Responsive for landing */
@media (max-width: 768px) {
  .landing-title {
    font-size: 36px;
  }
  .landing-hero {
    padding: 48px 16px 32px;
  }
  .landing-raid-links {
    padding: 0 16px 48px;
  }
  .raid-link-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
  }
  .raid-link-card {
    padding: 16px 10px;
  }
  .header-guild-name {
    display: none;
  }
  .login-card {
    padding: 32px 24px;
  }
  .site-footer {
    padding: 24px 16px 16px;
  }
}

/* Hide search bar on home view */
body:has(#home-view.active) .header-search-container {
  display: none;
}
