/* ==========================================================================
   PAPA SQUID: MEME MAYHEM — COMPONENTS STYLESHEET
   Buttons, Cards, Badges, Modals, Toasts, HUD Elements
   ========================================================================== */

/* Chunky 3D Arcade Buttons */
.btn-squid {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 16px;
  padding: 0.75rem 1.75rem;
  font-size: 1.05rem;
  border: 3px solid #1a1a38;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: all 0.12s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  text-decoration: none;
  outline: none;
}

.btn-squid:active {
  transform: translateY(4px) !important;
}

.btn-squid-primary {
  background: linear-gradient(180deg, #9333EA 0%, #7C3AED 100%);
  color: #FFFFFF;
  box-shadow: 0 6px 0 #5B21B6, 0 10px 15px rgba(124, 58, 237, 0.4);
}
.btn-squid-primary:hover {
  background: linear-gradient(180deg, #A855F7 0%, #8B5CF6 100%);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #5B21B6, 0 14px 20px rgba(124, 58, 237, 0.5);
}
.btn-squid-primary:active {
  box-shadow: 0 2px 0 #5B21B6, 0 4px 6px rgba(124, 58, 237, 0.3);
}

.btn-squid-lime {
  background: linear-gradient(180deg, #D9F99D 0%, #C7F464 100%);
  color: #1E293B;
  box-shadow: 0 6px 0 #84CC16, 0 10px 15px rgba(199, 244, 100, 0.4);
}
.btn-squid-lime:hover {
  background: linear-gradient(180deg, #ECFCCB 0%, #D9F99D 100%);
  color: #0F172A;
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #84CC16, 0 14px 20px rgba(199, 244, 100, 0.5);
}
.btn-squid-lime:active {
  box-shadow: 0 2px 0 #84CC16, 0 4px 6px rgba(199, 244, 100, 0.3);
}

.btn-squid-coral {
  background: linear-gradient(180deg, #FF8A70 0%, #FF6B4A 100%);
  color: #FFFFFF;
  box-shadow: 0 6px 0 #DC2626, 0 10px 15px rgba(255, 107, 74, 0.4);
}
.btn-squid-coral:hover {
  background: linear-gradient(180deg, #FFA08A 0%, #FF7F61 100%);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #DC2626, 0 14px 20px rgba(255, 107, 74, 0.5);
}
.btn-squid-coral:active {
  box-shadow: 0 2px 0 #DC2626, 0 4px 6px rgba(255, 107, 74, 0.3);
}

.btn-squid-dark {
  background: #2D2D5B;
  color: var(--cream);
  border-color: #3E3E7A;
  box-shadow: 0 6px 0 #1A1A38;
}
.btn-squid-dark:hover {
  background: #393973;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #1A1A38;
}
.btn-squid-dark:active {
  box-shadow: 0 2px 0 #1A1A38;
}

.btn-squid-sm {
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
  border-radius: 12px;
  border-width: 2px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.4);
}

.btn-squid-lg {
  padding: 1rem 2.5rem;
  font-size: 1.35rem;
  border-radius: 20px;
  border-width: 4px;
}

/* Game Card Base */
.game-card {
  background: var(--navy-card);
  border: 3px solid var(--navy-border);
  border-radius: 22px;
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.game-card:hover {
  border-color: var(--squid-purple-light);
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(124, 58, 237, 0.25);
}

/* Rarity Badges */
.rarity-badge {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 2px solid transparent;
}

.rarity-badge.common {
  background: rgba(148, 163, 184, 0.2);
  color: #CBD5E1;
  border-color: #64748B;
}

.rarity-badge.rare {
  background: rgba(103, 200, 255, 0.2);
  color: #7DD3FC;
  border-color: var(--sky-blue);
}

.rarity-badge.epic {
  background: rgba(167, 139, 250, 0.2);
  color: #C4B5FD;
  border-color: var(--squid-purple-light);
}

.rarity-badge.legendary {
  background: rgba(251, 191, 36, 0.2);
  color: #FDE047;
  border-color: #F59E0B;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

/* Mode Cards */
.mode-card {
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.mode-card-banner {
  height: 170px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.mode-banner-bg-1 {
  background: linear-gradient(135deg, #FF6B4A 0%, #B91C1C 100%);
}
.mode-banner-bg-2 {
  background: linear-gradient(135deg, #38BDF8 0%, #1D4ED8 100%);
}
.mode-banner-bg-3 {
  background: linear-gradient(135deg, #10B981 0%, #047857 100%);
}
.mode-banner-bg-4 {
  background: linear-gradient(135deg, #8B5CF6 0%, #4C1D95 100%);
}
.mode-banner-bg-5 {
  background: linear-gradient(135deg, #F59E0B 0%, #B45309 100%);
}

.mode-icon-giant {
  font-size: 4rem;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mode-card:hover .mode-icon-giant {
  transform: scale(1.15) rotate(4deg);
}

.mode-locked-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  border: 2px solid #EF4444;
  color: #FCA5A5;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Character Cards */
.character-card {
  text-align: center;
  cursor: pointer;
  padding: 1.25rem;
}

.character-card.equipped {
  border-color: var(--lime-pop);
  box-shadow: 0 0 20px rgba(199, 244, 100, 0.4);
}

.character-avatar-frame {
  width: 100px;
  height: 100px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: radial-gradient(circle, #38386E 0%, #1E1E3A 100%);
  border: 4px solid var(--navy-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  transition: transform 0.2s;
}

.character-card:hover .character-avatar-frame {
  transform: scale(1.08);
}

.character-card.equipped .character-avatar-frame {
  border-color: var(--lime-pop);
}

/* Level Map Nodes */
.level-track {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.level-stage-card {
  background: var(--navy-surface);
  border: 3px solid var(--navy-border);
  border-radius: 24px;
  padding: 1.5rem;
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.level-btn {
  aspect-ratio: 1;
  background: var(--navy-card);
  border: 3px solid var(--navy-border);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  font-family: var(--font-heading);
}

.level-btn.available {
  border-color: var(--sky-blue);
  background: linear-gradient(135deg, #1E3A8A 0%, #1E293B 100%);
  box-shadow: 0 4px 10px rgba(56, 189, 248, 0.3);
}

.level-btn.available:hover {
  transform: scale(1.08);
  border-color: var(--lime-pop);
}

.level-btn.completed {
  border-color: var(--lime-pop);
  background: linear-gradient(135deg, #14532D 0%, #0F172A 100%);
}

.level-btn.locked {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

.level-btn.boss {
  border-color: var(--meme-coral);
  box-shadow: 0 0 15px rgba(255, 107, 74, 0.5);
}

.level-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
}

.level-stars {
  font-size: 0.75rem;
  color: #FCD34D;
  margin-top: 0.15rem;
}

/* Squid Progress Bars */
.squid-progress {
  height: 18px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 999px;
  border: 2px solid var(--navy-border);
  overflow: hidden;
  position: relative;
}

.squid-progress-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.squid-progress-bar.purple {
  background: linear-gradient(90deg, #A855F7 0%, #7C3AED 100%);
}
.squid-progress-bar.lime {
  background: linear-gradient(90deg, #D9F99D 0%, #A3E635 100%);
}
.squid-progress-bar.coral {
  background: linear-gradient(90deg, #F87171 0%, #EF4444 100%);
}
.squid-progress-bar.sky {
  background: linear-gradient(90deg, #7DD3FC 0%, #0284C7 100%);
}

/* Modals */
.game-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 24, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}

.game-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.game-modal-content {
  background: var(--navy-surface);
  border: 4px solid var(--navy-border);
  border-radius: 28px;
  padding: 2.25rem;
  width: 100%;
  max-width: 540px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.game-modal-overlay.active .game-modal-content {
  transform: scale(1);
}

.game-modal-title {
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

/* Daily Reward Calendar */
.daily-reward-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.daily-day-card {
  background: var(--navy-card);
  border: 2px solid var(--navy-border);
  border-radius: 16px;
  padding: 1rem 0.5rem;
  text-align: center;
  position: relative;
  transition: transform 0.2s;
}

.daily-day-card.claimed {
  opacity: 0.6;
  border-color: #64748B;
  background: #1A1A32;
}

.daily-day-card.today {
  border-color: var(--lime-pop);
  background: linear-gradient(180deg, #1E3A2E 0%, #152220 100%);
  box-shadow: 0 0 15px rgba(199, 244, 100, 0.35);
  transform: scale(1.05);
}

.daily-day-card.locked {
  opacity: 0.45;
}

.daily-day-num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.daily-day-icon {
  font-size: 2rem;
  margin: 0.4rem 0;
}

.daily-day-reward {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: #FEF08A;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.squid-toast {
  pointer-events: auto;
  background: var(--navy-surface);
  border: 3px solid var(--squid-purple);
  border-radius: 18px;
  padding: 0.85rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  animation: toastBounce 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.squid-toast.success { border-color: var(--lime-pop); }
.squid-toast.warning { border-color: var(--meme-coral); }
.squid-toast.info { border-color: var(--sky-blue); }

@keyframes toastBounce {
  0% { transform: translateY(30px) scale(0.9); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* 3D Character Preview Canvas Wrapper */
.character-preview-box {
  width: 100%;
  height: 420px;
  border-radius: 24px;
  background: radial-gradient(circle at center, #2F2F5E 0%, #15152A 100%);
  border: 3px solid var(--navy-border);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
}

.character-preview-canvas {
  width: 100% !important;
  height: 100% !important;
  outline: none;
  cursor: grab;
}

.character-preview-canvas:active {
  cursor: grabbing;
}

.preview-drag-hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.65);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  pointer-events: none;
}
