/* style.css (PWA Mobile) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Press+Start+2P&display=swap');

:root {
  --bg-dark: #06020c;
  --bg-deep: #0b051b;
  --bg-card: rgba(27, 18, 54, 0.7);
  --border-color: #35215d;
  --text-light: #f3efff;
  --text-muted: #b0a4e3;
  --neon-pink: #ff007f;
  --neon-cyan: #00d9ff;
  --neon-green: #39ff14;
  --gold: #ffd700;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 50% 15%, rgba(90, 59, 163, 0.2) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, #0b051b 0%, #06020c 100%);
  color: var(--text-light);
  font-family: 'Outfit', sans-serif;
  overflow-x: hidden;
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 74px; /* Altura do Bottom Tab Bar */
  user-select: none;
}

/* Header Móvel */
.app-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(6, 2, 12, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(90, 59, 163, 0.4);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--neon-pink);
}

.logo-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 0, 127, 0.3);
}

.logo-sub {
  font-size: 7px;
  color: var(--neon-cyan);
  font-family: 'Press Start 2P', cursive;
  margin-top: 1px;
}

/* Bottom Tab Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(14, 7, 34, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  padding: 10px 6px calc(10px + env(safe-area-inset-bottom, 0px)) 6px;
  z-index: 1000;
}

.tab-item {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  width: 20%;
  transition: var(--transition-smooth);
}

.tab-icon {
  font-size: 20px;
  transition: var(--transition-smooth);
}

.tab-item.active {
  color: var(--neon-pink);
  text-shadow: 0 0 10px rgba(255, 0, 127, 0.2);
}

.tab-item.active .tab-icon {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 6px var(--neon-pink));
}

/* Containers de Telas */
.app-screen {
  display: none;
  padding: 20px;
  animation: slideUp 0.3s ease-out;
  max-width: 600px;
  margin: 0 auto;
}

.app-screen.active {
  display: block;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Painel de Estatísticas do Jogador */
.player-summary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.player-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.player-avatar {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 2px solid var(--neon-pink);
  box-shadow: var(--shadow-pink);
}

.player-class {
  font-family: 'Press Start 2P', cursive;
  font-size: 9px;
  color: var(--neon-cyan);
  margin-top: 4px;
}

.stat-pills {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.stat-pill {
  flex: 1;
  background: rgba(12, 7, 30, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.stat-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Barras de Progresso */
.progress-container {
  margin-top: 16px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: #1b1236;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
  width: 0%;
  transition: width 0.5s ease;
}

/* Cards e Listas */
.screen-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
  color: var(--neon-pink);
  text-shadow: 0 0 8px rgba(255, 0, 127, 0.3);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.quest-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  transition: var(--transition-smooth);
}

.quest-card:active {
  transform: scale(0.98);
  border-color: var(--neon-cyan);
}

.quest-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.quest-reward {
  font-weight: 800;
  color: var(--gold);
}

.quest-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Botões */
.btn {
  width: 100%;
  background: var(--neon-pink);
  color: #fff;
  border: none;
  border-bottom: 3px solid #a10050;
  border-radius: 10px;
  padding: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn:active {
  transform: translateY(2px);
  border-bottom-width: 1px;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-light);
}

.btn-secondary:active {
  background: rgba(90, 59, 163, 0.2);
  border-color: var(--neon-cyan);
}

/* Inputs */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background: rgba(12, 7, 30, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #fff;
  padding: 10px 14px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
}

.form-control:focus {
  outline: none;
  border-color: var(--neon-cyan);
}

/* iOS PWA Install Prompter */
.ios-prompt {
  display: none;
  position: fixed;
  bottom: 84px; /* logo acima do tabbar */
  left: 16px;
  right: 16px;
  background: rgba(18, 9, 44, 0.95);
  border: 1px solid var(--neon-cyan);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.8), var(--shadow-cyan);
  z-index: 2000;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ios-prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ios-prompt-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.ios-prompt-body {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.ios-prompt-icon-inline {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin: 0 2px;
}

/* Modal e Fotos */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #12092c;
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 400px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 24px;
  color: #fff;
  cursor: pointer;
  background: none;
  border: none;
}

/* Ficha de Badges */
.badge-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.badge-item {
  background: rgba(12, 7, 30, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  opacity: 0.3;
  transition: var(--transition-smooth);
}

.badge-item.active {
  opacity: 1;
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.15);
}

.badge-icon {
  font-size: 28px;
  margin-bottom: 4px;
}

.badge-name {
  font-size: 10px;
  font-weight: 700;
}

/* Image preview box */
.image-preview-wrapper {
  width: 100%;
  aspect-ratio: 4/3;
  background: #000;
  border-radius: 8px;
  border: 1px dashed var(--border-color);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.image-preview-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Seletores do Cargo de Registro no PWA */
.role-container {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  margin-bottom: 14px;
}

.role-btn {
  flex: 1;
  background: rgba(12, 7, 30, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-muted);
  padding: 10px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.role-btn.active {
  background: var(--neon-pink);
  color: #fff;
  border-color: var(--neon-pink);
  box-shadow: var(--shadow-pink);
}
