/* =====================================================
   ESTILOS ESPECÍFICOS DE SEÇÃO
   ===================================================== */

/* ===== Hero (Ficha do Herói) ===== */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 70px 22px 40px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 42px;
  align-items: start;
}

.hero-portrait-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

@media (max-width: 860px) {
  .hero {
    padding: 36px 18px 30px;
  }
  .hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }
  .hero-portrait-col {
    display: contents;
  }
  .rune-frame {
    order: 1;
    width: 190px;
    height: 190px;
    margin: 0 auto 4px;
  }
  .hero-info {
    order: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .dragon-card {
    order: 3;
    max-width: 360px;
    width: 100%;
    margin: 16px auto 0;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 28px 14px 24px;
  }
  .rune-frame {
    width: 160px;
    height: 160px;
  }
  .hero-desc {
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 12px 0 20px;
  }
  .stat-grid {
    gap: 12px;
    margin-bottom: 22px;
  }
  .stat {
    padding: 10px 14px;
  }
  .dragon-card {
    max-width: 100%;
    padding: 12px;
  }
  .dragon-canvas-wrap {
    height: 210px;
  }
  .hero-cta {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }
  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }
  .dice-widget {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

/* ===== Guardião Dragão 3D ===== */
.dragon-card {
  width: 100%;
  max-width: 360px;
  background: linear-gradient(180deg, rgba(29, 26, 39, 0.98), rgba(18, 17, 26, 0.98));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.65),
    0 0 20px rgba(229, 193, 88, 0.15),
    inset 0 0 16px rgba(168, 85, 247, 0.10);
  position: relative;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.dragon-card:hover {
  border-color: var(--gold);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.75),
    0 0 30px rgba(229, 193, 88, 0.40),
    inset 0 0 20px rgba(255, 159, 67, 0.18);
}

.dragon-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(229, 193, 88, 0.2);
}

.dragon-badge {
  font-family: var(--font-title);
  font-size: 0.70rem;
  font-weight: 700;
  color: var(--amber);
  background: rgba(255, 159, 67, 0.15);
  border: 1px solid rgba(255, 159, 67, 0.4);
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.dragon-title {
  font-family: var(--font-title);
  font-size: 0.82rem;
  color: var(--parchment);
  font-weight: 600;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-align: right;
}

.dragon-canvas-wrap {
  position: relative;
  width: 100%;
  height: 250px;
  background: radial-gradient(circle at 50% 50%, rgba(37, 32, 51, 0.8), rgba(11, 10, 16, 0.95));
  border-radius: 8px;
  border: 1px solid rgba(229, 193, 88, 0.18);
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.dragon-canvas-wrap:active {
  cursor: grabbing;
}

#dragonCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.dragon-hint {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.65rem;
  font-family: var(--font-title);
  color: var(--silver);
  text-shadow: 0 1px 4px #000;
  pointer-events: none;
  opacity: 0.85;
  letter-spacing: 0.5px;
}

.dragon-controls {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  justify-content: center;
}

.dragon-controls button {
  flex: 1;
  justify-content: center;
  white-space: nowrap;
  padding: 8px 10px;
  font-size: 0.80rem;
}

@media (max-width: 340px) {
  .dragon-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .dragon-title {
    text-align: left;
  }
  .dragon-controls {
    flex-direction: column;
  }
}

.dragon-shake {
  animation: dragonShake 0.45s ease-in-out;
}

@keyframes dragonShake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(-4px, 2px) rotate(-1deg); }
  40% { transform: translate(4px, -3px) rotate(1.2deg); }
  60% { transform: translate(-3px, 3px) rotate(-0.8deg); }
  80% { transform: translate(2px, -1px) rotate(0.5deg); }
}

.dragon-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--gold);
  font-family: var(--font-title);
  font-size: 0.85rem;
}

.rune-frame {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, var(--panel-2), var(--stone));
  border: 3px solid var(--gold);
  box-shadow:
    0 0 0 6px rgba(229, 193, 88, 0.15),
    0 0 45px rgba(229, 193, 88, 0.55),
    0 0 80px rgba(168, 85, 247, 0.40),
    inset 0 0 30px rgba(168, 85, 247, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: runeFramePulse 4s ease-in-out infinite;
}

@keyframes runeFramePulse {
  0%, 100% {
    box-shadow:
      0 0 0 6px rgba(229, 193, 88, 0.15),
      0 0 40px rgba(229, 193, 88, 0.50),
      0 0 75px rgba(168, 85, 247, 0.35),
      inset 0 0 25px rgba(168, 85, 247, 0.40);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(229, 193, 88, 0.28),
      0 0 60px rgba(229, 193, 88, 0.80),
      0 0 100px rgba(168, 85, 247, 0.60),
      inset 0 0 35px rgba(229, 193, 88, 0.50);
  }
}

.rune-frame::before, .rune-frame::after {
  content: "✦";
  position: absolute;
  color: var(--gold);
  font-size: 1.1rem;
  text-shadow: 0 0 8px var(--gold);
  z-index: 2;
  pointer-events: none;
}

.rune-frame::before {
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.rune-frame::after {
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.hero-info h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--parchment);
}

.hero-info h1 .accent {
  color: var(--gold);
  text-shadow: 0 0 16px rgba(229, 193, 88, 0.5);
}

.hero-desc {
  color: var(--silver);
  margin: 16px 0 26px;
  max-width: 560px;
  font-size: 1.05rem;
}

@media (max-width: 780px) {
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 30px;
}

@media (max-width: 780px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
}

.stat {
  background: rgba(23, 21, 31, 0.95);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 0 14px rgba(229, 193, 88, 0.05);
}

.stat-label {
  display: block;
  font-family: var(--font-title);
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 1px;
  margin-bottom: 6px;
  text-shadow: 0 0 8px rgba(229, 193, 88, 0.4);
}

.stat-value {
  display: block;
  font-size: 0.95rem;
  color: var(--parchment);
}

.stat-value small {
  color: var(--silver);
  font-weight: 400;
}

.bar {
  height: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin: 6px 0;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

.bar-fill {
  height: 100%;
  border-radius: 6px;
}

.bar.xp .bar-fill {
  background: linear-gradient(90deg, var(--gold), var(--amber), #ffd56b);
  background-size: 200% 100%;
  animation: barShimmer 3s ease-in-out infinite;
  box-shadow: 0 0 14px rgba(229, 193, 88, 0.75);
}

.bar.stamina .bar-fill,
.bar.mana .bar-fill {
  background: linear-gradient(90deg, #10b981, #059669, #34d399);
  background-size: 200% 100%;
  animation: barShimmer 3s ease-in-out infinite;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.75);
}

@keyframes barShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

@media (max-width: 780px) {
  .hero-cta {
    justify-content: center;
  }
}

.dice-widget {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

@media (max-width: 780px) {
  .dice-widget {
    justify-content: center;
  }
}

.d20 {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  cursor: pointer;
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  background: linear-gradient(160deg, #4a3a63, #2a2340 55%, var(--stone));
  border: 3px solid var(--gold);
  box-shadow: 0 0 28px rgba(229, 193, 88, 0.65), 0 0 14px rgba(168, 85, 247, 0.55), inset 0 0 20px rgba(168, 85, 247, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.d20:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 0 38px rgba(229, 193, 88, 0.85), 0 0 20px rgba(168, 85, 247, 0.7), inset 0 0 24px rgba(168, 85, 247, 0.55);
}

.d20-num {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 1.6rem;
  color: var(--parchment);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.d20.rolling {
  animation: diceRoll 0.12s linear infinite;
}

.d20.crit {
  border-color: var(--gold);
  box-shadow: 0 0 35px rgba(229, 193, 88, 0.95), inset 0 0 20px rgba(229, 193, 88, 0.5);
}

.d20.fail {
  border-color: var(--danger);
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.9), inset 0 0 20px rgba(239, 68, 68, 0.5);
}

@keyframes diceRoll {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(8deg) scale(1.06); }
  100% { transform: rotate(-8deg) scale(1); }
}

.dice-result {
  font-size: 0.95rem;
  max-width: 320px;
  color: var(--silver);
}

.dice-result.crit {
  color: var(--gold);
  text-shadow: 0 0 10px rgba(229, 193, 88, 0.6);
}

.dice-result.fail {
  color: var(--danger);
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

/* ===== Grimório de Habilidades ===== */
.grimoire-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
}

.tome {
  background: linear-gradient(180deg, rgba(29, 26, 39, 0.98), rgba(18, 17, 26, 0.98));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 0 18px rgba(168, 85, 247, 0.08);
  transition: 0.25s;
}

.tome:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 12px 36px rgba(229, 193, 88, 0.40), inset 0 0 24px rgba(229, 193, 88, 0.15);
}

.tome h3 {
  font-size: 1.05rem;
  color: var(--parchment);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 0 12px rgba(229, 193, 88, 0.35);
}

.tome h3 small {
  color: var(--silver);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.78rem;
}

.skill-list {
  list-style: none;
}

.skill-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(229, 193, 88, 0.18);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.skill-list li:last-child {
  border-bottom: none;
}

.orbs {
  color: var(--gold);
  letter-spacing: 3px;
  text-shadow: 0 0 8px rgba(229, 193, 88, 0.9), 0 0 18px rgba(255, 159, 67, 0.55);
}

/* ===== Mural de Quests (Projetos) ===== */
.quest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.quest-card {
  position: relative;
  background: linear-gradient(180deg, #261f15, #17130e);
  border: 2px solid #5a4528;
  border-radius: 6px;
  padding: 24px 20px 20px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(0, 0, 0, 0.4);
  transition: 0.25s;
}

.quest-card:nth-child(odd) {
  transform: rotate(-0.6deg);
}

.quest-card:nth-child(even) {
  transform: rotate(0.6deg);
}

.quest-card:hover {
  transform: translateY(-8px) rotate(0deg);
  border-color: var(--gold);
  box-shadow: 0 14px 40px rgba(229, 193, 88, 0.5), inset 0 0 25px rgba(255, 159, 67, 0.18);
}

.pin {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.3rem;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
}

.rank {
  display: inline-block;
  font-family: var(--font-title);
  font-size: 0.72rem;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.rank-s {
  background: rgba(229, 193, 88, 0.18);
  color: var(--gold);
  border: 1px solid var(--gold);
}

.rank-a {
  background: rgba(168, 85, 247, 0.18);
  color: var(--arcane);
  border: 1px solid var(--arcane);
}

.rank-b {
  background: rgba(203, 213, 225, 0.15);
  color: var(--silver);
  border: 1px solid var(--silver);
}

.quest-card h3 {
  color: var(--parchment);
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.quest-card p {
  color: #c9bfa8;
  font-size: 0.92rem;
  min-height: 66px;
}

.stamps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.stamps span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--heal);
  border: 1px solid var(--heal);
  padding: 2px 8px;
  border-radius: 4px;
}

.quest-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* ===== Crônicas de Batalha (Timeline) ===== */
.timeline {
  list-style: none;
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  padding-left: 30px;
  border-left: 2px solid var(--line);
}

.timeline li {
  position: relative;
  padding: 0 0 34px 26px;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -39px;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 16px var(--gold), 0 0 28px rgba(229, 193, 88, 0.65);
}

.timeline time {
  font-family: var(--font-mono);
  color: var(--arcane);
  font-size: 0.85rem;
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}

.timeline h3 {
  margin: 6px 0 6px;
  color: var(--parchment);
  font-size: 1.1rem;
}

.timeline p {
  color: var(--silver);
  font-size: 0.95rem;
}

/* ===== Desafio Secreto (Bug Teaser) ===== */
.bug-teaser {
  text-align: center;
}

.bug-card {
  max-width: 560px;
  margin: 0 auto;
  background: radial-gradient(circle at 50% 30%, #241117, var(--panel));
  border: 2px dashed var(--danger);
  border-radius: 10px;
  padding: 34px 26px;
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.35), inset 0 0 25px rgba(239, 68, 68, 0.15);
}

.bug-card h2 {
  color: var(--danger);
  margin-bottom: 10px;
  font-size: 1.4rem;
  text-shadow: 0 0 14px rgba(239, 68, 68, 0.75);
}

.bug-card p {
  color: var(--silver);
  margin-bottom: 20px;
}

.bug-card-embedded {
  text-align: center;
  margin-bottom: 50px;
}

/* ===== Taverna & Aliança (Contato) ===== */
.taverna-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 820px) {
  .taverna-grid {
    grid-template-columns: 1fr;
  }
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px;
}

.contact-form label {
  font-family: var(--font-title);
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.5px;
}

.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 11px 12px;
  background: var(--stone);
  border: 1px solid rgba(229, 193, 88, 0.3);
  border-radius: 6px;
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
  outline: none;
}

.contact-form input:focus, .contact-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(229, 193, 88, 0.3);
}

.contact-feedback {
  font-size: 0.88rem;
  min-height: 20px;
}

.contact-feedback.success {
  color: var(--heal);
}

.contact-feedback.error {
  color: var(--danger);
}

.taverna-links {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px;
}

.taverna-links h3 {
  color: var(--parchment);
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.taverna-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--silver);
  padding: 10px 0;
  border-bottom: 1px dashed rgba(229, 193, 88, 0.15);
  transition: 0.2s;
}

.taverna-links a:last-child {
  border-bottom: none;
}

.taverna-links a:hover {
  color: var(--gold);
  padding-left: 6px;
}

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 40px 20px 150px;
  color: var(--silver);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 600px) {
  .site-footer {
    padding-bottom: 125px;
  }
}

.wax-seal {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #c0392b, #7a1f16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 0 14px rgba(192, 57, 43, 0.5);
}
