/* D2R Guide Styles - Adapted for D2Emu Site */

/* Force dark background for guide pages */
body.guide-page {
  background-color: #000 !important;
}

body.guide-page .main {
  background-color: #000;
}

/* Guide-specific colors */
.guide-container {
  --d2-gold: #c7b377;
  --d2-gold-dark: #8b7355;
  --d2-gold-light: #e8ddb5;
  --d2-red: #8b0000;
  --d2-red-bright: #dc143c;
  --d2-blue-magic: #6495ed;
  --d2-green-set: #00ff00;
  --d2-yellow-rare: #ffff00;
  --d2-orange-unique: #c77b30;
  --d2-purple-craft: #9932cc;

  --fire-color: #ff4500;
  --cold-color: #00bfff;
  --lightning-color: #ffd700;
  --poison-color: #32cd32;
  --physical-color: #d2691e;
  --magic-color: #da70d6;

  --bg-dark: #121212;
  --bg-medium: #1a1a1a;
  --bg-light: #252525;
  --bg-card: #1e1e1e;
  --text-primary: #e8e8e8;
  --text-secondary: #999;
  --border-color: #333;

  --tier-s: #ff6b6b;
  --tier-a: #ffa502;
  --tier-b: #7bed9f;
  --tier-c: #70a1ff;
  --tier-d: #a4b0be;
}

.guide-container {
  padding: 20px;
}

/* Header Styles */
.guide-header {
  text-align: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(180deg, rgba(199, 179, 119, 0.08) 0%, transparent 100%);
  border-bottom: 1px solid var(--d2-gold-dark);
  margin-bottom: 2rem;
  border-radius: 8px 8px 0 0;
}

.guide-header h1 {
  font-size: 2rem;
  color: var(--d2-gold);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.guide-header .subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
}

.guide-header .zone-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--d2-gold);
  color: var(--bg-dark);
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.8rem;
  margin-top: 1rem;
}

/* Quick Stats Bar */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

.stat-item {
  text-align: center;
  padding: 0.75rem 0.5rem;
}

.stat-item .label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.3rem;
}

.stat-item .value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--d2-gold);
}

.stat-item .value.tier-s { color: var(--tier-s); }
.stat-item .value.tier-a { color: var(--tier-a); }
.stat-item .value.tier-b { color: var(--tier-b); }
.stat-item .value.tier-c { color: var(--tier-c); }

/* Section Styles */
.section {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

.section h2 {
  color: var(--d2-gold);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section h2 .icon {
  font-size: 1rem;
}

.section h3 {
  color: var(--d2-gold-light);
  font-size: 1rem;
  font-weight: 500;
  margin: 1.25rem 0 0.75rem 0;
}

.section p {
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.section ul {
  margin-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.section li {
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

/* Tables */
.immunity-table,
.breakpoint-table,
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.immunity-table th,
.immunity-table td,
.breakpoint-table th,
.breakpoint-table td,
.comparison-table th,
.comparison-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border: 1px solid var(--border-color);
}

.immunity-table th,
.breakpoint-table th,
.comparison-table th {
  background: var(--bg-medium);
  color: var(--d2-gold);
  font-weight: 500;
}

.comparison-table td {
  text-align: center;
}

.breakpoint-table .recommended,
.comparison-table .highlight {
  background: rgba(199, 179, 119, 0.1);
}

.tier-s { color: var(--tier-s); font-weight: 600; }
.tier-a { color: var(--tier-a); font-weight: 600; }
.tier-b { color: var(--tier-b); font-weight: 600; }
.tier-c { color: var(--tier-c); font-weight: 600; }

/* Immunity Badges */
.immunity-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0.1rem;
}

.immunity-badge.fire { background: var(--fire-color); color: white; }
.immunity-badge.cold { background: var(--cold-color); color: black; }
.immunity-badge.lightning { background: var(--lightning-color); color: black; }
.immunity-badge.poison { background: var(--poison-color); color: black; }
.immunity-badge.physical { background: var(--physical-color); color: white; }
.immunity-badge.magic { background: var(--magic-color); color: white; }
.immunity-badge.none { background: var(--border-color); color: white; }

/* Build Cards */
.build-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.build-card {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  transition: border-color 0.2s;
}

.build-card:hover {
  border-color: var(--d2-gold-dark);
}

.build-card .build-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.build-card .build-icon {
  width: 50px;
  height: 50px;
  background: var(--bg-medium);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 1px solid var(--d2-gold-dark);
}

.build-card .build-name {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--d2-gold);
}

.build-card .build-class {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.build-card .tier-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.tier-badge.s-tier { background: var(--tier-s); color: white; }
.tier-badge.a-tier { background: var(--tier-a); color: black; }
.tier-badge.b-tier { background: var(--tier-b); color: black; }
.tier-badge.c-tier { background: var(--tier-c); color: white; }

.build-card .pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.build-card .pros h4 { color: #4ade80; margin-bottom: 0.4rem; font-size: 0.85rem; }
.build-card .cons h4 { color: #f87171; margin-bottom: 0.4rem; font-size: 0.85rem; }

.build-card ul { list-style: none; padding: 0; margin: 0; }
.build-card li { padding: 0.15rem 0 0.15rem 1rem; position: relative; }
.build-card .pros li::before { content: "+"; position: absolute; left: 0; color: #4ade80; }
.build-card .cons li::before { content: "-"; position: absolute; left: 0; color: #f87171; }

/* Strategy Steps */
.strategy-steps {
  counter-reset: step-counter;
}

.strategy-step {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 6px;
  margin-bottom: 0.75rem;
  border-left: 3px solid var(--d2-gold);
}

.strategy-step::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  background: var(--d2-gold);
  color: var(--bg-dark);
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.9rem;
}

.strategy-step .step-content h4 {
  color: var(--d2-gold-light);
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.strategy-step .step-content p {
  margin: 0;
  font-size: 0.9rem;
}

/* Skill Allocation */
.skill-allocation {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.skill-tree {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid var(--border-color);
}

.skill-tree h4 {
  color: var(--d2-gold);
  margin-bottom: 0.75rem;
  text-align: center;
  font-size: 0.9rem;
}

.skill-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.skill-entry:last-child { border-bottom: none; }
.skill-entry .skill-name { color: var(--text-primary); }
.skill-entry .skill-points {
  background: var(--d2-gold);
  color: var(--bg-dark);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.8rem;
}

/* Equipment Grid */
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.equipment-slot {
  background: var(--bg-light);
  border-radius: 6px;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
}

.equipment-slot .slot-name {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.3rem;
}

.equipment-slot .item-name {
  font-weight: 500;
  font-size: 0.9rem;
}

.equipment-slot .item-name.unique { color: var(--d2-orange-unique); }
.equipment-slot .item-name.runeword { color: var(--d2-gold); }
.equipment-slot .item-name.set { color: var(--d2-green-set); }

.equipment-slot .item-stats {
  font-size: 0.8rem;
  color: var(--d2-blue-magic);
  margin-top: 0.3rem;
  line-height: 1.4;
}

/* Info/Warning/Tips Boxes */
.tips-box, .info-box {
  background: rgba(199, 179, 119, 0.08);
  border: 1px solid var(--d2-gold-dark);
  border-radius: 6px;
  padding: 1rem;
  margin: 1rem 0;
}

.tips-box h4, .info-box h4 {
  color: var(--d2-gold);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.tips-box ul, .info-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tips-box li, .info-box li {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(199, 179, 119, 0.15);
  font-size: 0.9rem;
}

.tips-box li:last-child, .info-box li:last-child { border-bottom: none; }

.warning-box {
  background: rgba(220, 20, 60, 0.1);
  border: 1px solid var(--d2-red);
  border-radius: 6px;
  padding: 1rem;
  margin: 1rem 0;
}

.warning-box h4 {
  color: var(--d2-red-bright);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.warning-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.warning-box li {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(139, 0, 0, 0.3);
  font-size: 0.9rem;
}

.warning-box li:last-child { border-bottom: none; }

/* Stat Allocation */
.stat-allocation {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.stat-box {
  background: var(--bg-light);
  padding: 1rem;
  border-radius: 6px;
  text-align: center;
  border: 1px solid var(--border-color);
}

.stat-box .stat-name {
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.3rem;
}

.stat-box .stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--d2-gold);
}

.stat-box .stat-note {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

/* Gear Tiers */
.gear-tier {
  margin-bottom: 1.5rem;
}

.gear-tier h4 {
  color: var(--d2-gold);
  margin-bottom: 0.75rem;
  padding: 0.4rem 0.75rem;
  background: var(--bg-medium);
  border-radius: 4px;
  display: inline-block;
  font-size: 0.9rem;
}

/* Merc Section */
.merc-section {
  background: var(--bg-light);
  padding: 1rem;
  border-radius: 6px;
  margin: 1rem 0;
}

.merc-section h4 {
  color: var(--d2-gold);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

/* Route Diagram */
.route-diagram {
  background: var(--bg-light);
  border-radius: 6px;
  padding: 1rem;
  margin: 1rem 0;
  text-align: center;
}

.route-diagram .route-title {
  color: var(--d2-gold);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.route-diagram pre {
  color: var(--d2-gold);
  font-family: monospace;
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Guide Footer */
.guide-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--border-color);
  margin-top: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.guide-footer .credits { margin-bottom: 0.5rem; }
.guide-footer .disclaimer { font-size: 0.75rem; opacity: 0.7; }

/* Responsive */
@media (max-width: 600px) {
  .guide-container { padding: 10px; }
  .guide-header h1 { font-size: 1.5rem; }
  .quick-stats { grid-template-columns: repeat(2, 1fr); }
  .build-grid { grid-template-columns: 1fr; }
  .skill-allocation { grid-template-columns: 1fr; }
  .equipment-grid { grid-template-columns: 1fr; }
  .stat-allocation { grid-template-columns: repeat(2, 1fr); }
  .build-card .pros-cons { grid-template-columns: 1fr; }
}
