@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

/* =========================================================
   Variáveis e base
   ========================================================= */
:root {
  --primary-color: #55FF55;
  --secondary-color: #1a1a2e;
  --accent-color: #FF55FF;
  --accent-color-rgb: 255, 85, 255;
  --text-color: #EEEEEE;
  --bg-color: #0e0d16;
  --card-bg: #1e1d2c;
  --card-bg-rgb: 30, 29, 44;
  --border-dark: #000000;
  --border-light: #444455;
  --highlight-text: #FFFF55;
  --shadow-color-1: rgba(0, 0, 0, 0.7);
  --shadow-color-2: rgba(85, 255, 85, 0.3);
  --pixel-font: 'Press Start 2P', cursive;
  --main-font: 'VT323', monospace;
}

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

body {
  font-family: var(--main-font);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  scroll-behavior: smooth;
  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAAABGyzcAAAAD0lEQVQIW2NkYGBoDAABH4ABm0jC6gAAAABJRU5ErkJggg==');
  background-size: 2px 2px;
  overflow-x: hidden;
}

.container { max-width: 1100px; margin: 0 auto; padding: 20px; }

.highlight { color: var(--highlight-text); font-weight: bold; text-shadow: 1px 1px 0 rgba(0,0,0,0.5); }
.icon { margin-right: 8px; color: var(--primary-color); }

/* =========================================================
   Tipografia (leve polimento nas sombras para profissionalizar)
   ========================================================= */
h1, h2, h3 {
  font-family: var(--pixel-font);
  color: var(--primary-color);
  text-align: center;
  text-shadow: 3px 3px 0 var(--border-dark), 4px 4px 0 var(--accent-color);
  line-height: 1.2;
}
@media (min-width: 900px) {
  h1, h2, h3 {
    text-shadow: 4px 4px 0 var(--border-dark), 6px 6px 0 var(--accent-color);
  }
}

h2.section-title {
  font-size: 2.2em;
  margin-top: 60px;
  margin-bottom: 30px;
  border: 3px solid var(--border-light);
  background-color: var(--card-bg);
  padding: 12px 25px;
  display: inline-block;
  width: auto;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 6px 6px 0 var(--border-dark);
  border-radius: 6px;
}
h2.section-greeting {
  font-size: 2em;
  text-align: left;
  margin-bottom: 20px;
  text-shadow: 3px 3px 0 var(--border-dark), 5px 5px 0 var(--accent-color);
}

/* =========================================================
   Acessibilidade extra (skip-link e foco)
   ========================================================= */
:focus-visible {
  outline: 3px dashed var(--highlight-text);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: -999px;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  z-index: 1100;
  background: var(--highlight-text);
  color: var(--bg-color);
  padding: 10px 14px;
  border: 2px solid var(--border-dark);
  border-radius: 6px;
  font-family: var(--pixel-font);
}

/* =========================================================
   Header + Navegação
   ========================================================= */
.game-header {
  padding: 15px 0;
  background-color: var(--secondary-color);
  border-bottom: 3px solid var(--primary-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.game-header .container {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
}
.game-header .player-name-status-wrapper { display: flex; flex-direction: column; align-items: flex-start; }
.game-header .player-name {
  font-size: 1.5em; margin: 0;
  text-shadow: 3px 3px 0 var(--border-dark), 4px 4px 0 var(--accent-color);
  color: var(--highlight-text); text-align: left; display: flex; align-items: center;
}
.header-name-icon { margin-right: 10px; color: var(--accent-color); font-size: 0.8em; }
.game-header .player-status { font-size: 0.8em; color: var(--text-color); margin: 0; text-align: left; font-family: var(--main-font); text-shadow: none; }

.game-header .game-nav ul {
  list-style: none; padding: 0; margin: 10px 0 0;
  display: flex; gap: 30px; flex-wrap: wrap; justify-content: center;
}
.game-header .game-nav ul li { margin-bottom: 5px; }
.game-header .game-nav ul li a {
  font-family: var(--pixel-font);
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.8em;
  padding: 8px 15px;
  border: 2px solid var(--accent-color);
  border-radius: 5px;
  background-color: var(--card-bg);
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
  text-transform: uppercase;
  display: inline-block;
  box-shadow: 3px 3px 0 var(--border-dark);
  text-shadow: none;
}
.game-header .game-nav ul li a:hover {
  background-color: var(--accent-color);
  color: var(--bg-color);
  box-shadow: 1px 1px 0 var(--border-dark);
  transform: translate(2px, 2px);
}
/* Estado ativo via aria-current */
.game-header .game-nav a[aria-current="page"] {
  background-color: var(--primary-color);
  color: var(--bg-color);
  box-shadow: 0 0 0 var(--border-dark);
}

@media (min-width: 769px) {
  .game-header .player-name-status-wrapper { margin-right: auto; }
  .game-header .player-name { font-size: 1.8em; }
  .game-header .player-status { font-size: 0.9em; margin-top: 2px; }
  .game-header .container { align-items: baseline; }
  .game-header .game-nav ul { margin-top: 0; }
}
@media (max-width: 768px) {
  .game-header .container { flex-direction: column; align-items: center; gap: 15px; }
  .game-header .player-name-status-wrapper { align-items: center; }
  .game-header .player-name, .game-header .player-status { text-align: center; }
  .game-header .player-status { margin-bottom: 10px; }
  .game-header .game-nav ul { gap: 10px; }
  .game-header .game-nav ul li a { font-size: 0.7em; padding: 6px 10px; }
}

/* =========================================================
   Dashboard (mantém caso use futuramente)
   ========================================================= */
.profile-dashboard { background-color: var(--secondary-color); padding: 40px 0 20px; border-bottom: 8px solid var(--border-dark); border-image: linear-gradient(to right, var(--accent-color) 0%, var(--primary-color) 50%, var(--accent-color) 100%) 1; box-shadow: 0 5px 20px var(--shadow-color-1); position: relative; z-index: 1; }
.profile-header { display: flex; align-items: center; justify-content: center; gap: 30px; margin-bottom: 30px; flex-wrap: wrap; }
.profile-avatar { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 6px solid var(--primary-color); box-shadow: 0 0 25px var(--shadow-color-2); transition: transform 0.2s ease; }
.profile-avatar:hover { transform: scale(1.08); box-shadow: 0 0 35px var(--accent-color); }
.profile-info { text-align: left; margin-left: -10px; }
.profile-info .player-name { font-size: 3.5em; text-align: left; margin-bottom: 5px; color: var(--highlight-text); text-shadow: 5px 5px 0 var(--border-dark), 8px 8px 0 var(--accent-color); }
.profile-info .player-handle { font-size: 1.5em; color: var(--primary-color); margin-bottom: 10px; text-shadow: 1px 1px 0 rgba(0,0,0,0.5); }
.profile-stats-summary { display: flex; gap: 20px; font-size: 1.1em; color: var(--text-color); text-shadow: 1px 1px 0 rgba(0,0,0,0.5); }
.profile-stats-summary i { margin-right: 5px; color: var(--primary-color); }
.btn-edit-profile { background-color: var(--card-bg); color: var(--primary-color); border: 2px solid var(--primary-color); padding: 10px 20px; border-radius: 5px; text-decoration: none; font-family: var(--main-font); font-size: 1.1em; transition: all .2s ease; box-shadow: 3px 3px 0 var(--border-dark); }
.btn-edit-profile:hover { background-color: var(--primary-color); color: var(--bg-color); transform: translate(3px, 3px); box-shadow: none; }

.dashboard-nav { margin-bottom: 40px; text-align: center; }
.dashboard-nav ul { list-style: none; display: flex; justify-content: center; gap: 25px; flex-wrap: wrap; }
.dashboard-nav a { color: var(--text-color); text-decoration: none; font-family: var(--pixel-font); font-size: 1.3em; padding: 12px 20px; border: 3px solid var(--primary-color); border-radius: 6px; background-color: var(--card-bg); box-shadow: 5px 5px 0 var(--border-dark); transition: transform .1s linear, box-shadow .1s linear, background-color .1s linear; text-transform: uppercase; }
.dashboard-nav a:hover { background-color: var(--primary-color); color: var(--bg-color); transform: translate(5px, 5px); box-shadow: 0 0 0 var(--border-dark); }

.dashboard-grid { display: grid; gap: 20px; margin-top: 0; }
.dashboard-card { background-color: var(--card-bg); border: 3px solid var(--border-light); border-radius: 10px; padding: 25px; box-shadow: 0 0 15px var(--shadow-color-1); display: flex; flex-direction: column; justify-content: space-between; text-shadow: none; }
.dashboard-card .card-title { font-family: var(--pixel-font); font-size: 1.5em; color: var(--highlight-text); margin-bottom: 20px; text-align: left; text-shadow: 2px 2px 0 var(--border-dark); }
.bio-card p { font-size: 1.1em; margin-bottom: 15px; }
.bio-card .joined-date { font-size: 0.9em; color: var(--border-light); margin-top: auto; }
.bio-card .joined-date i { margin-right: 5px; color: var(--primary-color); }
.pinned-projects-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 200px; }
.pinned-projects-card .empty-state { color: var(--border-light); }
.pinned-projects-card .empty-state i { font-size: 3em; margin-bottom: 15px; color: var(--primary-color); }
.pinned-projects-card .empty-state p { font-size: 1.1em; margin-bottom: 20px; }
.pinned-projects-card .btn-highlight-project { background-color: var(--primary-color); color: var(--bg-color); padding: 10px 20px; border-radius: 5px; text-decoration: none; font-family: var(--main-font); font-size: 1em; transition: all .2s ease; box-shadow: 3px 3px 0 var(--border-dark); }
.pinned-projects-card .btn-highlight-project:hover { background-color: var(--accent-color); transform: translate(3px, 3px); box-shadow: none; }

.stats-card .stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; text-align: center; }
.stats-card .stat-block { background-color: var(--secondary-color); padding: 15px; border-radius: 5px; border: 2px solid var(--border-dark); box-shadow: 2px 2px 0 var(--border-dark); }
.stats-card .stat-value { font-family: var(--pixel-font); font-size: 2.2em; color: var(--accent-color); display: block; margin-bottom: 5px; text-shadow: 3px 3px 0 var(--border-dark); }
.stats-card .stat-label { font-size: 0.9em; color: var(--text-color); display: block; }

.skills-summary-card .skill-tags-summary { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.skills-summary-card .skill-tags-summary li { background-color: var(--primary-color); color: var(--bg-color); padding: 6px 12px; border-radius: 4px; font-size: 0.9em; font-weight: bold; border: 2px solid var(--border-dark); box-shadow: 2px 2px 0 var(--border-dark); }
.skills-summary-card .btn-view-all-skills { background-color: transparent; color: var(--primary-color); border: 2px solid var(--primary-color); padding: 10px 15px; border-radius: 5px; text-decoration: none; font-family: var(--main-font); font-size: 0.95em; transition: all .2s ease; margin-top: auto; display: block; text-align: center; }
.skills-summary-card .btn-view-all-skills:hover { background-color: var(--primary-color); color: var(--bg-color); box-shadow: 3px 3px 0 var(--border-dark); }
.skills-summary-card .btn-view-all-skills i { margin-left: 8px; color: var(--primary-color); transition: color .2s ease; }
.skills-summary-card .btn-view-all-skills:hover i { color: var(--bg-color); }

.extra-card { text-align: center; background-color: var(--card-bg); border: 3px solid var(--border-light); border-radius: 10px; padding: 25px; box-shadow: 0 0 15px var(--shadow-color-1); }
.pixel-pet-image { width: 100px; height: 100px; margin-bottom: 15px; image-rendering: pixelated; -ms-interpolation-mode: nearest-neighbor; border: 3px solid var(--primary-color); border-radius: 5px; }
.pet-status { font-size: 1em; color: var(--highlight-text); }

/* =========================================================
   Seções
   ========================================================= */
.game-world { }
.game-section { padding: 40px 0; margin-bottom: 30px; background-color: transparent; border-bottom: 4px dashed var(--border-light); }
.game-section:last-of-type { border-bottom: none; padding-bottom: 60px; }

/* ========== Sobre ========== */
#about > .container { display: flex; flex-wrap: wrap; gap: 30px; align-items: flex-start; }
#about .about-intro-content { flex: 2; min-width: 300px; }
#about .about-text-area p { font-size: 1.1em; margin-bottom: 15px; text-align: left; text-shadow: none; color: #F1F1F1; }
#about .social-guild { margin-top: 25px; }
#about .social-guild .guild-title { font-size: 1.3em; text-align: left; margin-bottom: 15px; text-shadow: 2px 2px 0 var(--border-dark); }
#about .guild-links { display: flex; gap: 15px; flex-wrap: wrap; }
#about .guild-links .guild-btn {
  font-family: var(--pixel-font);
  color: var(--bg-color);
  background-color: var(--primary-color);
  padding: 10px 15px; border-radius: 5px; text-decoration: none; font-size: 0.8em;
  transition: all .2s ease; box-shadow: 3px 3px 0 var(--border-dark);
  display: inline-flex; align-items: center; text-shadow: none;
}
#about .guild-links .guild-btn i { margin-right: 8px; color: var(--bg-color); }
#about .guild-links .guild-btn:hover { background-color: var(--highlight-text); color: var(--border-dark); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--border-dark); }
#about .guild-links .guild-btn:hover i { color: var(--border-dark); }
#about .about-visual-area { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 250px; }
#about .avatar-image { width: 180px; height: 180px; object-fit: cover; border: 4px solid var(--primary-color); box-shadow: 5px 5px 0 var(--border-dark); margin-bottom: 10px; image-rendering: pixelated; }
#about .image-caption { font-size: 0.9em; color: var(--text-color); font-family: var(--main-font); }
#about .heart-code-project { flex: 1.5; min-width: 320px; display: flex; flex-direction: column; align-items: center; }
.heart-code-project .heart-code-title { font-size: 1.0em; text-shadow: 3px 3px 0 var(--border-dark), 4px 4px 0 var(--accent-color); margin-bottom: 8px; }

.title-pixel-heart {
  height: 20px; width: auto; margin-left: 7px; vertical-align: middle;
  image-rendering: pixelated; -ms-interpolation-mode: nearest-neighbor;
  image-rendering: -moz-crisp-edges; image-rendering: -o-crisp-edges; image-rendering: -webkit-optimize-contrast; display: inline-block;
}
.heart-code-project .heart-code-subtitle { font-size: 0.9em; color: var(--text-color); margin-bottom: 15px; font-family: var(--main-font); text-shadow: none; text-align: center; }

@media (max-width: 900px) {
  #about > .container { flex-direction: column; align-items: center; }
  #about .about-intro-content, #about .heart-code-project { width: 100%; max-width: 600px; flex: auto; }
  #about .about-text-area, #about .social-guild .guild-title, h2.section-greeting { text-align: center; }
  #about .guild-links { justify-content: center; }
}

/* Bloco código/figura do coração */
.heart-code-content-wrapper {
  position: relative; width: 100%; min-height: 280px; padding: 15px;
  border: 3px solid var(--border-light); border-radius: 10px; background-color: var(--card-bg);
  box-shadow: 0 0 15px var(--shadow-color-1); margin-top: 15px;
  display: flex; justify-content: center; align-items: center;
}
.code-display-container { position: relative; width: 100%; height: 230px; max-height: 230px; overflow-y: auto; border-radius: 5px; }
.code-display-container pre[class*="language-"] {
  filter: blur(3px); transition: filter .3s ease-in-out;
  margin: 0 !important; padding: 1em !important; background: rgba(0,0,0,0.3) !important; font-size: 0.8em; height: 100%; border-radius: 5px;
}
.code-display-container pre[class*="language-"] code { background: none !important; text-shadow: none !important; }
.code-display-container:hover pre[class*="language-"] { filter: blur(0); }

.code-display-container::-webkit-scrollbar { width: 8px; }
.code-display-container::-webkit-scrollbar-track { background: var(--secondary-color); border-radius: 4px; }
.code-display-container::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 4px; }
.code-display-container::-webkit-scrollbar-thumb:hover { background: var(--highlight-text); }

.code-fade-overlay {
  position: absolute; bottom: 0; left: 0; width: 100%; height: 70%;
  background: linear-gradient(to bottom, transparent 0%, rgba(var(--card-bg-rgb), 0.6) 30%, var(--card-bg) 90%);
  pointer-events: none; border-radius: 0 0 5px 5px; z-index: 2;
}
.heart-image-display {
  position: absolute; bottom: 20px; right: 20px; z-index: 3; text-align: center;
  background-color: rgba(var(--card-bg-rgb), 0.88); padding: 12px; border-radius: 6px;
  border: 2px solid var(--accent-color); max-width: 160px; box-shadow: 0 3px 10px rgba(0,0,0,0.4);
  opacity: 1; pointer-events: auto; transition: transform .3s ease, box-shadow .3s ease;
}
.heart-image-display:hover { transform: scale(1.03) rotate(-2deg); box-shadow: 0 5px 15px rgba(var(--accent-color-rgb), 0.3); }
.heart-code-content-wrapper .code-display-container:hover ~ .heart-image-display { opacity: 0.3; pointer-events: none; transform: scale(0.95); }
.heart-generated-image { max-width: 120px; height: auto; margin-bottom: 6px; }
.heart-image-display .image-caption, .heart-image-display .image-attribution {
  font-size: 0.75em; color: var(--text-color); font-family: var(--main-font); text-shadow: none; line-height: 1.25;
}
.heart-image-display .image-attribution { font-size: 0.7em; color: var(--highlight-text); margin-top: 4px; }

/* ========== Projetos ========== */
.quest-grid, .skill-grid { display: grid; gap: 25px; margin-top: 30px; }
@media (min-width: 600px) { .quest-grid, .skill-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .quest-grid { grid-template-columns: repeat(3, 1fr); } .skill-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }

.quest-card, .skill-item {
  background-color: var(--card-bg);
  border: 3px solid var(--border-light);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.quest-card:hover, .skill-item:hover { transform: translateY(-6px); box-shadow: 0 8px 20px rgba(0,0,0,.45); }
.quest-card h3, .skill-item h3 {
  font-family: var(--pixel-font);
  color: var(--highlight-text);
  text-shadow: 2px 2px 0 var(--border-dark);
  margin-bottom: 12px; text-align: left; font-size: 1.2em;
}
.quest-card p { font-size: 1em; color: #F1F1F1; text-shadow: none; margin-bottom: 15px; flex-grow: 1; }

.quest-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; margin-bottom: 15px; }
.tag-item {
  background-color: var(--highlight-text);
  color: #111;
  padding: 5px 10px; border-radius: 4px; font-size: 0.8em; font-weight: bold;
  border: 2px solid var(--border-dark); box-shadow: 2px 2px 0 var(--border-dark);
  font-family: var(--main-font);
}

.btn-view-quest, .btn-contact {
  background-color: var(--accent-color);
  color: var(--bg-color);
  padding: 10px 20px;
  border: 3px solid var(--border-dark);
  border-radius: 8px;
  text-decoration: none;
  font-family: var(--pixel-font);
  font-size: 0.9em;
  transition: background-color .1s linear, transform .1s linear, box-shadow .1s linear;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--border-dark);
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: auto; text-shadow: none;
}
.btn-view-quest:hover, .btn-contact:hover { background-color: var(--primary-color); transform: translate(2px, 2px); box-shadow: 0 0 0 var(--border-dark); color: var(--bg-color); }
.btn-view-quest .icon, .btn-contact .icon { margin-left: 8px; color: var(--bg-color); font-size: 1.1em; }
.btn-contact { margin: 20px auto; }

/* =========================================================
   Contato
   ========================================================= */
.skill-item .skill-level { font-size: 0.9em; color: var(--text-color); display: block; margin-top: 8px; text-align: center; }
.contact-section p.section-description { font-size: 1.1em; margin-bottom: 15px; text-shadow: none; }
.join-cilab { font-size: 1em; color: var(--text-color); margin-top: 20px; text-shadow: none; }
.join-cilab a { color: var(--primary-color); text-decoration: underline; transition: color .2s ease; }
.join-cilab a:hover { color: var(--accent-color); }
.contact-section .pixel-border { max-width: 150px; display: block; margin: 20px auto 10px; border: 4px solid var(--primary-color); box-shadow: 6px 6px 0 var(--border-dark); image-rendering: pixelated; }
.contact-section .avatar-caption { font-size: 0.9em; color: var(--border-light); margin-bottom: 40px; }

/* =========================================================
   Rodapé
   ========================================================= */
.game-footer {
  background-color: var(--secondary-color);
  padding: 25px 0;
  border-top: 4px solid var(--border-dark); /* mais sutil */
  border-image: linear-gradient(to right, var(--accent-color) 0%, var(--primary-color) 50%, var(--accent-color) 100%) 1;
  text-align: center;
  color: var(--text-color);
  text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
  box-shadow: none;
}
.game-footer p { margin-bottom: 8px; font-size: 0.9em; }
.easter-egg { font-family: var(--pixel-font); font-size: 0.8em; color: var(--highlight-text); text-shadow: 2px 2px 0 var(--border-dark); }
.game-footer .icon { color: var(--accent-color); }

/* =========================================================
   Responsivo extra
   ========================================================= */
@media (min-width: 769px) {
  .profile-header { justify-content: flex-start; }
  .profile-info { margin-left: 0; }
  .profile-info .player-name, .profile-info .player-handle { text-align: left; }
  .btn-edit-profile { margin-left: auto; }
  .dashboard-nav ul { justify-content: flex-start; }
  .dashboard-grid {
    grid-template-columns: 2fr 1fr;
    grid-template-areas:
      "bio pinned"
      "stats skills"
      "extra .";
  }
  .bio-card { grid-area: bio; }
  .pinned-projects-card { grid-area: pinned; }
  .stats-card { grid-area: stats; }
  .skills-summary-card { grid-area: skills; }
  .extra-card { grid-area: extra; }
}
@media (max-width: 768px) {
  h1 { font-size: 2em; }
  h2.section-title { font-size: 1.4em; padding: 10px 15px; }
  .profile-header { flex-direction: column; text-align: center; gap: 20px; }
  .profile-avatar { width: 120px; height: 120px; }
  .profile-info { text-align: center; margin-left: 0; }
  .profile-info .player-name, .profile-info .player-handle { text-align: center; }
  .profile-stats-summary { justify-content: center; }
  .btn-edit-profile { margin-top: 15px; }
  .dashboard-nav ul { flex-direction: column; gap: 15px; }
  .dashboard-nav a { width: 90%; margin: 0 auto; font-size: 1em; text-align: center; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 15px; }
  .dashboard-card { padding: 20px; }
  .dashboard-card .card-title { font-size: 1.3em; text-align: center; }
  .stats-card .stats-grid { grid-template-columns: 1fr; }
  .stats-card .stat-value { font-size: 1.8em; }
  .skills-summary-card .skill-tags-summary { justify-content: center; }
  .btn-view-all-skills { width: 90%; margin: 15px auto 0; }
  .quest-grid, .skill-grid { grid-template-columns: 1fr; }
  .quest-card, .skill-item { padding: 15px; }
  .quest-card h3, .skill-item h3 { font-size: 1.1em; }
  .quest-card p { font-size: 0.95em; }
  .btn-view-quest, .btn-contact { padding: 10px 18px; font-size: 0.85em; }
}

/* =========================================================
   Cards genéricos (se usar)
   ========================================================= */
.card-container { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; padding: 20px; }
.card { background-color: #333; color: #fff; border-radius: 12px; padding: 25px; width: 320px; box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4); display: flex; flex-direction: column; justify-content: space-between; min-height: 200px; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
.card-header { margin-bottom: 20px; }
.card-title { font-size: 2.2em; font-weight: bold; margin-bottom: 10px; line-height: 1.1; }
.progress-bar-wrapper { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.progress-bar-bg { flex-grow: 1; height: 10px; background-color: rgba(255, 255, 255, 0.2); border-radius: 5px; overflow: hidden; }
.progress-text { font-size: 0.9em; font-weight: bold; color: #FFD700; }
.card-next-info { font-size: 1.1em; color: #bbb; margin-bottom: 25px; }
.card-actions { display: flex; flex-direction: column; gap: 15px; margin-top: auto; }
.btn-primary { display: block; width: 100%; padding: 15px 25px; background-color: #007bff; color: #fff; text-align: center; border: none; border-radius: 8px; font-size: 1.2em; font-weight: bold; cursor: pointer; text-decoration: none; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); transition: background-color .3s ease, transform .2s ease; }
.btn-primary:hover { background-color: #0056b3; transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); }
.btn-secondary { display: block; width: 100%; padding: 10px 0; color: #88c0d0; text-align: center; text-decoration: none; font-size: 1em; border: none; background: transparent; cursor: pointer; transition: color .3s ease; }
.btn-secondary:hover { color: #fff; }
@media (max-width: 768px) {
  .card { width: 100%; max-width: 350px; }
  .card-title { font-size: 1.8em; }
  .btn-primary { font-size: 1.1em; padding: 12px 20px; }
}

/* =========================================================
   Mascote + balão
   ========================================================= */
.site-mascot {
  position: fixed; bottom: 20px; left: 20px; width: 100px; height: auto; z-index: 999;
  image-rendering: pixelated; -ms-interpolation-mode: nearest-neighbor;
  image-rendering: -moz-crisp-edges; image-rendering: -o-crisp-edges; image-rendering: -webkit-optimize-contrast;
  transition: transform .3s ease;
}
@media (hover: hover) and (pointer: fine) {
  .site-mascot:hover { transform: translateY(-2px); }
}
@media (max-width: 600px) { .site-mascot { width: 70px; bottom: 10px; left: 10px; } }
@media (max-width: 400px) { .site-mascot { display: none; } }

.mascot-legend {
  position: fixed; bottom: 130px; left: 35px; background: #fffbe8; color: #222;
  font-family: var(--pixel-font, 'Press Start 2P', cursive); font-size: 0.85em;
  padding: 12px 18px; border-radius: 12px; box-shadow: 4px 4px 0 #103c99, 0 0 0 3px #000; z-index: 1000; max-width: 220px;
  text-align: center; border: 2px solid #ff00cc; pointer-events: none; user-select: none; image-rendering: pixelated;
}
.mascot-legend::after {
  content: ""; position: absolute; left: 30px; bottom: -18px; width: 18px; height: 18px; background: #fffbe8;
  border-left: 2px solid #221481; border-bottom: 2px solid #0c31c5; transform: rotate(45deg); box-shadow: 2px 2px 0 #000; z-index: 1001;
}
@media (max-width: 600px) {
  .mascot-legend { bottom: 90px; left: 15px; font-size: 0.7em; max-width: 140px; padding: 7px 10px; }
  .mascot-legend::after { left: 15px; bottom: -12px; width: 12px; height: 12px; }
}

/* =========================================================
   Preferências do usuário
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .code-display-container pre[class*="language-"] { filter: none !important; }
  * { transition: none !important; animation: none !important; }
}

/* =========================================================
   Modo de impressão
   ========================================================= */
@media print {
  body { background: #fff; color: #000; }
  .game-header, .game-footer, .site-mascot, .mascot-legend,
  .heart-code-content-wrapper, .code-fade-overlay { display: none !important; }
  a { color: #000; text-decoration: underline; }
}
