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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #caa352;
  background: #000;
  min-height: 100vh;
}

body.is-in-shell {
  background: transparent !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* Utility classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

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

/* Common button styles - STYLE DORÉ TRANSPARENT UNIFORME */
.btn,
.btn-muhu,
.gjs-t-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #caa352;
  text-decoration: none;
  background: rgba(202, 163, 82, 0.15);
  color: #caa352;
  font-size: 15px;
}

.btn:hover,
.btn-muhu:hover,
.gjs-t-button:hover {
  background: rgba(202, 163, 82, 0.25);
}

.btn:active,
.btn-muhu:active,
.gjs-t-button:active {
  background: rgba(202, 163, 82, 0.3);
}

.btn-primary,
.gjs-t-button {
  background: rgba(202, 163, 82, 0.15);
  color: #caa352;
  border: 1px solid #caa352;
}

.btn-primary:hover,
.gjs-t-button:hover {
  background: rgba(202, 163, 82, 0.25);
}

/* Bouton secondaire - même style doré transparent */
.btn-secondary {
  background: rgba(202, 163, 82, 0.15);
  color: #caa352;
  border: 1px solid #caa352;
  padding: 10px 20px;
}

.btn-secondary:hover {
  background: rgba(202, 163, 82, 0.25);
}

/* Card styles */
.card,
.why-card,
.gjs-t-border {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 30px;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

/* Owned parts: cover behind title (marketplace-like) */
.parts-owned-card {
  position: relative;
  overflow: hidden;
}

.parts-owned-titleCover {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  margin-bottom: 10px;
  border: 1px solid rgba(202, 163, 82, 0.1);
}

.parts-owned-titleCover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--muhu-cover-bg);
  background-size: cover;
  background-position: center;
  filter: saturate(1.1) contrast(1.05);
  transform: scale(1.03);
}

.parts-owned-titleCover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.78));
}

.parts-owned-titleCoverInner {
  position: relative;
  z-index: 1;
  padding: 10px 12px;
}

.parts-owned-title {
  margin: 0;
  color: #caa352;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}

.parts-owned-artist {
  margin-top: 2px;
  color: rgba(202, 163, 82, 0.7);
  font-weight: 600;
  font-size: 0.9rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}

/* Table styles */
table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  text-align: left;
}

th {
  color: #caa352;
  font-weight: 700;
}

/* Form styles */
input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #caa352;
  outline-offset: 2px;
}

/* Status pills */
.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.pill.green {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid #22c55e;
}

.pill.red {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  h1 {
    font-size: 2rem !important;
  }
}

/* Ensure avatars are always circular and never distorted */
.muhu-avatar,
#profileAvatar,
.friend-avatar,
.group-avatar,
.message-avatar,
.auth-section img,
.favorite-artist-card img {
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  flex-shrink: 0 !important;
  border-radius: 50% !important;
}

/* Tutorial attention ping */
@keyframes muse-pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.4;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }

  100% {
    transform: scale(0.95);
    opacity: 0.4;
  }
}

.muse-needs-attention .muse-pulse-bg {
  animation: muse-pulse 2s infinite ease-in-out;
  opacity: 1 !important;
}

.muse-needs-attention {
  cursor: pointer;
}

/* === MOBILE TUTORIAL FIXES === */
@media (max-width: 768px) {
  #global-muse-widget {
    bottom: 90px !important;
    /* Move above bottom nav if present */
    right: 15px !important;
  }

  #muse-widget-avatar {
    width: 80px !important;
    /* Make Muse larger on mobile */
    height: 80px !important;
  }

  #muse-widget-bubble {
    width: calc(100vw - 30px) !important;
    /* Full width minus margins */
    right: 0 !important;
    /* Reset right offset to align with margin */
    bottom: 95px !important;
    /* Position it above the avatar */
    transform: none !important;
    padding-top: 30px !important;
    /* Adjust padding for mobile text */
  }
}