/**
 * Estilo Cartoon - FASE 3
 * UI redesenhada com estética vibrante e divertida
 */

/* ========== VARIÁVEIS CARTOON ========== */
:root {
  --cartoon-shadow: 0 8px 0 rgba(0, 0, 0, 0.15);
  --cartoon-shadow-hover: 0 12px 0 rgba(0, 0, 0, 0.2);
  --cartoon-shadow-active: 0 4px 0 rgba(0, 0, 0, 0.15);
  --bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ========== BOTÕES COM ESTILO 3D ========== */
.btn {
  position: relative;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  border-radius: 16px;
  padding: 16px 28px;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: var(--cartoon-shadow);
  transform: translateY(0);
}

.btn::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 10%;
  right: 10%;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent);
  border-radius: 16px 16px 0 0;
  pointer-events: none;
}

.btn:hover {
  transform: translateY(-4px);
  box-shadow: var(--cartoon-shadow-hover);
}

.btn:active {
  transform: translateY(4px);
  box-shadow: var(--cartoon-shadow-active);
}

.btn--primary {
  background: linear-gradient(145deg, #7a83ff 0%, #5a60f8 100%);
  color: white;
  border-bottom: 5px solid #4248b8;
}

.btn--primary:hover {
  background: linear-gradient(145deg, #8a93ff 0%, #6a70ff 100%);
}

.btn--secondary {
  background: linear-gradient(145deg, #ffd43b 0%, #fbbc04 100%);
  color: #22304a;
  border-bottom: 5px solid #d19a00;
}

.btn--secondary:hover {
  background: linear-gradient(145deg, #ffe14b 0%, #ffcd1b 100%);
}

.btn--tertiary {
  background: linear-gradient(145deg, #ff8ce0 0%, #f46cf8 100%);
  color: white;
  border-bottom: 5px solid #c44abf;
}

.btn--tertiary:hover {
  background: linear-gradient(145deg, #ff9ce8 0%, #ff7cff 100%);
}

.btn--ghost {
  background: rgba(90, 96, 248, 0.1);
  color: var(--accent);
  border-bottom: 3px solid rgba(90, 96, 248, 0.2);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.08);
}

.btn--ghost:hover {
  background: rgba(90, 96, 248, 0.15);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.1);
}

/* ========== PAINÉIS COM PROFUNDIDADE ========== */
.stats-panel,
.actions-panel,
.missions,
.inventory,
.shop,
.customization,
.minigames {
  background: var(--bg-panel);
  border-radius: 28px;
  box-shadow: 
    var(--cartoon-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.stats-panel::after,
.actions-panel::after,
.missions::after,
.inventory::after,
.shop::after,
.customization::after,
.minigames::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  border-radius: 28px 28px 0 0;
}

/* ========== BARRAS DE STATUS COM GRADIENTE ========== */
.stat-bar__inner {
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  border-radius: 12px;
  box-shadow: 
    inset 0 2px 8px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(90, 96, 248, 0.3);
  position: relative;
  overflow: hidden;
}

.stat-bar__inner::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* ========== CABEÇALHOS COM ESTILO CARTOON ========== */
h1, h2, h3 {
  font-family: 'Fredoka One', 'Nunito', cursive;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard__title h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

/* ========== ÍCONES ANIMADOS ========== */
i {
  display: inline-block;
  transition: transform 0.3s var(--bounce);
}

.btn:hover i {
  transform: scale(1.2) rotate(5deg);
}

.stat-bar__icon {
  animation: iconBob 2s ease-in-out infinite;
}

@keyframes iconBob {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* ========== PET STAGE COM DESTAQUE ========== */
.pet-stage {
  background: linear-gradient(135deg, rgba(90, 96, 248, 0.05), rgba(94, 178, 255, 0.08));
  border: 4px solid rgba(90, 96, 248, 0.15);
  border-radius: 32px;
  box-shadow: 
    var(--cartoon-shadow),
    inset 0 0 40px rgba(90, 96, 248, 0.08);
  position: relative;
}

.pet-stage::before {
  content: '✨';
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 32px;
  animation: starTwinkle 2s ease-in-out infinite;
}

.pet-stage::after {
  content: '✨';
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 32px;
  animation: starTwinkle 2s ease-in-out infinite 1s;
}

/* ========== CARDS COM ELEVAÇÃO ========== */
.mission-card,
.inventory__item,
.shop__item,
.customization__item {
  border-radius: 20px;
  box-shadow: var(--cartoon-shadow);
  transition: all 0.3s var(--bounce);
  border: 3px solid rgba(90, 96, 248, 0.1);
}

.mission-card:hover,
.inventory__item:hover,
.shop__item:hover,
.customization__item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--cartoon-shadow-hover);
  border-color: var(--accent);
}

.mission-card--completed {
  background: linear-gradient(135deg, rgba(6, 214, 160, 0.1), rgba(6, 214, 160, 0.05));
  border-color: var(--success);
}

.mission-card--ready {
  background: linear-gradient(135deg, rgba(251, 188, 4, 0.15), rgba(251, 188, 4, 0.05));
  border-color: var(--warning);
  animation: readyPulse 1.5s ease-in-out infinite;
}

@keyframes readyPulse {
  0%, 100% {
    box-shadow: var(--cartoon-shadow), 0 0 0 0 rgba(251, 188, 4, 0.4);
  }
  50% {
    box-shadow: var(--cartoon-shadow), 0 0 0 10px rgba(251, 188, 4, 0);
  }
}

/* ========== BADGES E TAGS ========== */
.pet-stage__mood {
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: var(--cartoon-shadow);
  position: relative;
}

.pet-stage__mood::before {
  content: '✨';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  animation: starSpin 3s linear infinite;
}

@keyframes starSpin {
  from {
    transform: translateY(-50%) rotate(0deg);
  }
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

/* ========== PROGRESS BARS CARTOON ========== */
.xp-bar,
.mission-card__progress {
  background: rgba(90, 96, 248, 0.1);
  border-radius: 50px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(90, 96, 248, 0.2);
  overflow: visible;
  position: relative;
}

.xp-bar__fill,
.mission-card__progress-fill {
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  border-radius: 50px;
  box-shadow: 0 0 15px rgba(90, 96, 248, 0.5);
  position: relative;
  transition: width 0.5s var(--bounce);
}

.xp-bar__fill::after,
.mission-card__progress-fill::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 10%;
  right: 10%;
  height: 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent);
  border-radius: 50px;
}

/* ========== TOOLTIPS CARTOON ========== */
[title] {
  position: relative;
}

[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  background: var(--bg-panel);
  border: 3px solid var(--accent);
  border-radius: 12px;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: var(--cartoon-shadow);
  z-index: 1000;
  animation: tooltipBounce 0.3s var(--bounce);
}

@keyframes tooltipBounce {
  0% {
    transform: translateX(-50%) translateY(10px) scale(0.8);
    opacity: 0;
  }
  100% {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 1;
  }
}

/* ========== INPUTS COM ESTILO ========== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
  border: 3px solid rgba(90, 96, 248, 0.2);
  border-radius: 16px;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.05),
    0 0 0 4px rgba(90, 96, 248, 0.1);
  transform: scale(1.02);
}

/* ========== NOTIFICAÇÕES ANIMADAS ========== */
.notification-card--unread {
  background: linear-gradient(135deg, rgba(90, 96, 248, 0.1), rgba(90, 96, 248, 0.05));
  border-left: 5px solid var(--accent);
  animation: notificationShake 0.5s ease;
}

@keyframes notificationShake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* ========== RESPONSIVO ========== */
@media (max-width: 768px) {
  .btn {
    font-size: 0.95rem;
    padding: 14px 24px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .pet-stage::before,
  .pet-stage::after {
    font-size: 24px;
  }
}
