@import url("./shared.css");

.menu-quick-actions {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, 52px);
  gap: 8px;
}

.menu-quick-actions a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 52px;
  padding: 8px 6px 6px;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.menu-quick-actions a:hover {
  transform: scale(1.06);
}

.boss-emblem-btn {
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(69, 10, 10, 0.75);
  color: #fb923c;
}

.boss-emblem-btn:hover {
  border-color: rgba(249, 115, 22, 0.6);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3), 0 0 12px rgba(249, 115, 22, 0.25);
}

.boss-event-btn {
  border: 1px solid rgba(167, 139, 250, 0.4);
  background: rgba(46, 16, 101, 0.78);
  color: #c4b5fd;
}

.boss-event-btn:hover {
  border-color: rgba(167, 139, 250, 0.7);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3), 0 0 12px rgba(124, 58, 237, 0.3);
}

.boss-event-btn.boss-event-live {
  animation: boss-event-pulse 2.4s ease-in-out infinite;
}

.boss-event-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 10px var(--emblem-glow, rgba(167, 139, 250, 0.35)));
}

.boss-event-icon svg {
  width: 100%;
  height: 100%;
}

.boss-event-btn .boss-emblem-label {
  color: #ddd6fe;
}

@keyframes boss-event-pulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 10px rgba(124, 58, 237, 0.25); }
  50% { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3), 0 0 18px rgba(167, 139, 250, 0.45); }
}

.battle-pass-btn {
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(69, 26, 3, 0.78);
  color: #fde047;
}

.battle-pass-btn:hover {
  border-color: rgba(251, 191, 36, 0.75);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3), 0 0 12px rgba(251, 191, 36, 0.25);
}

.battle-pass-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.35));
}

.battle-pass-btn .boss-emblem-label {
  color: #fef08a;
}

.combat-arena-btn {
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(69, 10, 10, 0.78);
  color: #fca5a5;
}

.combat-arena-btn:hover {
  border-color: rgba(248, 113, 113, 0.75);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3), 0 0 12px rgba(248, 113, 113, 0.25);
}

.combat-arena-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  filter: drop-shadow(0 0 8px rgba(248, 113, 113, 0.35));
}

.combat-arena-btn .boss-emblem-label {
  color: #fecaca;
}

.bp-menu-widget {
  display: block;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: linear-gradient(135deg, rgba(46, 16, 101, 0.35), rgba(15, 23, 42, 0.85));
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.bp-menu-widget:hover {
  border-color: rgba(196, 181, 253, 0.55);
  transform: translateY(-1px);
}

.bp-menu-widget strong {
  color: #e9d5ff;
}

.bp-menu-widget .bp-menu-bar {
  height: 6px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.bp-menu-widget .bp-menu-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #c084fc);
}

.bp-menu-widget .bp-menu-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--muted);
}

.boss-emblem-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 10px var(--emblem-glow, rgba(249, 115, 22, 0.25)));
}

.boss-emblem-icon svg {
  width: 100%;
  height: 100%;
}

.boss-emblem-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fecaca;
}

.menu-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  position: relative;
  overflow: hidden;
}

.menu-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 20%, var(--menu-glow-blue), transparent 40%),
    radial-gradient(circle at 85% 75%, var(--menu-glow-pink), transparent 35%),
    radial-gradient(circle at 50% 100%, var(--menu-glow-green), transparent 40%);
}

.menu-bg span {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  animation: float-orb 12s ease-in-out infinite;
}

.menu-bg span:nth-child(1) {
  width: 220px;
  height: 220px;
  background: rgba(59, 130, 246, 0.25);
  top: 10%;
  left: 8%;
}

.menu-bg span:nth-child(2) {
  width: 180px;
  height: 180px;
  background: rgba(217, 119, 6, 0.2);
  bottom: 12%;
  right: 10%;
  animation-delay: -4s;
}

.menu-bg span:nth-child(3) {
  width: 140px;
  height: 140px;
  background: rgba(52, 211, 153, 0.22);
  top: 55%;
  left: 55%;
  animation-delay: -7s;
}

@keyframes float-orb {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(24px, -18px);
  }
}

.menu-card {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
}

.menu-intro {
  text-align: center;
  margin-bottom: 28px;
  padding-right: 124px;
}

.menu-title-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.menu-title-text {
  text-align: center;
}

.menu-cat-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: min(320px, 88vw);
}

.menu-cat {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.menu-cat:hover {
  transform: translateY(-2px);
}

.menu-cat.meowing {
  animation: cat-meow 0.45s ease;
}

.menu-cat-art {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.menu-cat-bubble {
  margin: 0;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: #fdba74;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.menu-cat-hint {
  margin: 0;
  min-height: 1.2em;
  color: #fdba74;
  font-size: 0.86rem;
  line-height: 1.4;
  text-align: center;
}

.cat-tutorial-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}

.tutorial-progress {
  font-size: 0.72rem;
  color: var(--muted);
  margin-right: 4px;
}

.tutorial-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: var(--surface-deep);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.tutorial-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.menu-profile {
  margin-top: 28px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  background: var(--surface-raised);
}

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

.profile-header h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.profile-header .profile-lead {
  margin: 0;
}

.profile-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--avatar-bg, #334155);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.profile-avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 2rem;
}

.profile-avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 0.95rem;
}

.avatar-menu {
  margin-bottom: 16px;
}

.avatar-menu-toggle {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: var(--surface-deep);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}

.avatar-menu-toggle:hover {
  border-color: var(--accent);
}

.avatar-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: var(--surface-deep);
}

.avatar-choice {
  display: grid;
  gap: 4px;
  place-items: center;
  padding: 10px 6px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.avatar-choice.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.avatar-choice-emoji {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--avatar-bg, #334155);
  font-size: 1.35rem;
}

.avatar-choice-label {
  font-size: 0.62rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
}

.title-menu {
  margin-bottom: 16px;
}

.title-menu-toggle {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: var(--surface-deep);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}

.title-menu-toggle:hover {
  border-color: var(--accent);
}

.profile-title-display {
  margin: 8px 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.title-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: var(--surface-deep);
}

.title-picker-empty {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.title-chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--title-color, var(--text));
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.title-chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent);
}

.menu-profile h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.profile-lead {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.profile-field {
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}

.profile-field input {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--surface-deep);
  color: var(--text);
  font: inherit;
}

.code-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.code-row code {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-deep);
  border: 1px solid var(--panel-border);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.code-row button,
.sync-actions button {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--surface-deep);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
}

.friends-panel,
.limits-panel,
.sync-panel,
.achievements-panel,
.quests-panel,
.daily-panel {
  margin-top: 16px;
}

.friends-panel h3,
.limits-panel h3,
.sync-panel h3,
.achievements-panel h3,
.quests-panel h3,
.daily-panel h3 {
  margin: 0 0 8px;
  font-size: 0.92rem;
}

.daily-lead {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.daily-rewards-host {
  display: grid;
  gap: 12px;
}

.daily-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.25);
  background: rgba(120, 53, 15, 0.15);
}

.daily-head strong {
  display: block;
  font-size: 0.88rem;
  color: #fde68a;
}

.daily-cycle-note,
.daily-finale-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
}

.daily-finale-hint {
  color: #fcd34d;
  font-weight: 600;
}

.daily-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

@media (max-width: 640px) {
  .daily-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.daily-cell {
  display: grid;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--surface-deep);
  text-align: center;
  min-height: 88px;
}

.daily-cell.claimed {
  opacity: 0.65;
  border-color: rgba(74, 222, 128, 0.35);
}

.daily-cell.today.ready {
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.25);
}

.daily-cell.finale {
  border-color: rgba(192, 132, 252, 0.4);
  background: rgba(76, 29, 149, 0.18);
}

.daily-day {
  font-size: 0.62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.daily-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.daily-label {
  font-size: 0.62rem;
  color: var(--text-soft);
  line-height: 1.25;
  min-height: 2.4em;
}

.daily-status {
  font-size: 0.68rem;
  font-weight: 700;
  color: #86efac;
}

.daily-cell.today .daily-status {
  color: #fcd34d;
}

.daily-claim-btn {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(120, 53, 15, 0.45);
  color: #fde68a;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.daily-claim-btn:hover {
  border-color: #fcd34d;
}

.daily-wait,
.daily-reset-note {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.quests-lead {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.quests-list {
  display: grid;
  gap: 14px;
}

.quest-group h3 {
  margin: 0 0 8px;
  font-size: 0.78rem;
  color: #c4b5fd;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quest-row {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: var(--surface-deep);
}

.quest-row.ready {
  border-color: rgba(74, 222, 128, 0.45);
}

.quest-row.claimed {
  opacity: 0.72;
}

.quest-copy {
  display: grid;
  gap: 2px;
}

.quest-copy strong {
  font-size: 0.85rem;
}

.quest-copy span {
  font-size: 0.75rem;
  color: var(--muted);
}

.quest-reward {
  color: #fbbf24 !important;
  font-weight: 600;
}

.quest-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quest-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.quest-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #c084fc);
}

.quest-progress,
.quest-claimed {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.quest-claimed {
  color: #86efac;
}

.quest-claim {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(74, 222, 128, 0.45);
  background: rgba(22, 101, 52, 0.35);
  color: #bbf7d0;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.quest-claim:hover {
  border-color: #86efac;
}

.quest-reset-note {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.limits-panel h3 {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.limits-chart {
  margin: 0;
  padding: 8px 10px;
  list-style: none;
  display: grid;
  gap: 5px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(13, 18, 24, 0.65);
}

.limits-chart li {
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--muted);
  padding-left: 0.65rem;
  border-left: 2px solid rgba(148, 163, 184, 0.35);
}

.limits-chart strong {
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.68rem;
}

.friends-list {
  display: grid;
  gap: 6px;
}

.friends-empty {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.friend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-deep);
  font-size: 0.82rem;
}

.friend-remove {
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: transparent;
  color: #fca5a5;
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}

.sync-note {
  margin: 0 0 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

.sync-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sync-actions input {
  flex: 1;
  min-width: 180px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--surface-deep);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
}

.achievements-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.linkish {
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
  text-decoration: underline;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.ach-chip {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: var(--surface-deep);
  opacity: 0.5;
}

.ach-chip.unlocked {
  opacity: 1;
  border-color: rgba(52, 211, 153, 0.45);
}

.ach-icon {
  font-size: 1.2rem;
}

.ach-copy {
  display: grid;
  gap: 2px;
  font-size: 0.72rem;
  color: var(--muted);
}

.ach-copy strong {
  color: var(--text);
  font-size: 0.82rem;
}

.profile-message {
  margin: 12px 0 0;
  min-height: 1.2em;
  font-size: 0.82rem;
  color: var(--success);
}

.profile-message[data-state="err"] {
  color: var(--danger);
}

@keyframes cat-meow {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  35% {
    transform: translateY(-4px) scale(1.04);
  }
  70% {
    transform: translateY(-1px) scale(1.01);
  }
}

.menu-title-text h1 {
  margin: 0 0 6px;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
}

.menu-credit {
  margin: 0 0 10px;
}

.menu-title-text p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.menu-btn {
  display: grid;
  gap: 10px;
  padding: 24px 22px;
  border-radius: 20px;
  border: 1px solid var(--panel-border);
  background: var(--surface-raised);
  color: inherit;
  text-decoration: none;
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  backdrop-filter: blur(10px);
}

.menu-btn:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.menu-btn-icon {
  font-size: 2rem;
}

.menu-btn strong {
  font-size: 1.15rem;
}

.menu-beta {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fbbf24;
  letter-spacing: 0.02em;
}

.menu-btn span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.menu-btn.whiteboard:hover {
  border-color: #60a5fa;
}

.menu-btn.games:hover {
  border-color: #f472b6;
}

.menu-btn.music:hover {
  border-color: #34d399;
}

.menu-btn.animation:hover {
  border-color: #fbbf24;
}

@media (max-width: 720px) {
  .menu-quick-actions {
    position: static;
    margin: 0 auto 20px;
    width: fit-content;
  }

  .menu-intro {
    padding-right: 0;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }
}
