/* غرفتي — profile, level, badges, wardrobe */

.room-page { padding-bottom: 130px; transition: background 0.6s; background: var(--bg-room, linear-gradient(180deg, #eaf5ff, #fff7e8)); min-height: 100vh; }
.room-page.bg-space { --bg-room: radial-gradient(circle at 20% 10%, #3b2a8a, #0a1440 60%); }
.room-page.bg-sea { --bg-room: linear-gradient(180deg, #8fe3ff, #1e9fd6 70%, #0f6fa8); }
.room-page.bg-forest { --bg-room: linear-gradient(180deg, #d6f5c9, #7fcf6b 70%, #3f9b3a); }
.room-page.bg-space .block-head h2, .room-page.bg-space .block-head .count,
.room-page.bg-sea .block-head h2, .room-page.bg-forest .block-head h2 { color: var(--white); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.room-page.bg-space .block-head .count { opacity: 0.8; }

.room { padding-top: 26px; }

.empty { text-align: center; padding: 50px 20px; max-width: 520px; margin: 30px auto; }
.empty .big { font-size: 5rem; }
.empty h1 { margin: 0; color: var(--blue-900); }
.empty p { color: var(--ink-soft); font-size: 1.15rem; }

/* me card */
.me-card {
  display: grid; grid-template-columns: 260px 1fr; gap: 30px; align-items: center;
  background: var(--white); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow-soft);
}
.me-scene { position: relative; justify-self: center; }
.me-big {
  width: 230px; height: 230px; border-radius: 50%;
  object-fit: cover; object-position: top;
  border: 8px solid var(--blue-100); background: var(--white);
  animation: floaty 4s ease-in-out infinite;
}
.me-pet {
  position: absolute; bottom: 0; left: -14px; font-size: 4rem; line-height: 1;
  animation: floaty 3s ease-in-out infinite reverse;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.15));
}
.me-info .hello { color: var(--orange); font-weight: 800; }
.me-info h1 { margin: 0; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.2; color: var(--blue-900); }
.me-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 16px; }
.me-tags .tag { background: var(--sky); color: var(--blue-800); padding: 2px 14px; border-radius: 999px; font-weight: 700; }

.level-head { display: flex; justify-content: space-between; gap: 10px; font-size: 1.05rem; flex-wrap: wrap; }
.level-head b { color: var(--purple); font-size: 1.25rem; }
.level-head span { color: var(--ink-soft); font-weight: 700; }
.level-bar { height: 22px; background: #eef2f9; border-radius: 999px; overflow: hidden; margin-top: 6px; }
.level-bar i {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, #8b5cf6, #1e6fe0);
  transition: width 1.2s var(--bounce);
}
.me-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* blocks */
.block { margin-top: 34px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.block-head h2 { margin: 0; font-size: 1.8rem; color: var(--blue-900); }
.block-head .count { font-weight: 700; color: var(--ink-soft); }

/* badges */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.badge {
  background: var(--white); border-radius: var(--radius); padding: 18px 10px 14px;
  text-align: center; box-shadow: var(--shadow-soft);
  transition: transform 0.3s var(--bounce);
}
.badge .medal {
  width: 82px; height: 82px; margin: 0 auto 8px; border-radius: 50%;
  display: grid; place-items: center; font-size: 2.6rem;
  background: radial-gradient(circle at 35% 30%, #fff8d6, #ffc531);
  border: 5px solid #f7931e; box-shadow: 0 5px 0 #d9740a;
}
.badge b { display: block; font-size: 1.1rem; color: var(--blue-900); }
.badge small { color: var(--ink-soft); font-weight: 600; }
.badge:hover { transform: translateY(-6px) rotate(-2deg); }
.badge.locked .medal { background: #eef2f9; border-color: #d6e2f5; box-shadow: 0 5px 0 #c9d6ee; filter: grayscale(1); opacity: 0.55; }
.badge.locked b { color: #8a9bbd; }

/* wardrobe */
.shelf { display: grid; gap: 18px; }
.shelf-row { background: var(--white); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-soft); }
.shelf-row h3 { margin: 0 0 10px; font-size: 1.2rem; color: var(--blue-900); }
.items { display: flex; gap: 12px; flex-wrap: wrap; }
.item {
  position: relative; width: 104px; padding: 10px 6px 8px;
  border-radius: 18px; border: 4px solid #e3eaf6; background: var(--white);
  text-align: center; font-weight: 800; font-size: 0.95rem; color: var(--ink);
  box-shadow: 0 5px 0 #e3eaf6;
  transition: transform 0.2s var(--bounce), border-color 0.2s;
}
.item .pv {
  width: 56px; height: 56px; margin: 0 auto 6px; border-radius: 50%;
  display: grid; place-items: center; font-size: 2rem; background: var(--sky);
  border: 4px solid #d6e2f5;
}
.item:hover:not(.locked) { transform: translateY(-4px); border-color: var(--blue-300); }
.item.on { border-color: var(--green); background: var(--green-soft); box-shadow: 0 5px 0 #86efac; }
.item.on::after {
  content: "✓"; position: absolute; top: -10px; left: -10px; width: 26px; height: 26px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--green); color: var(--white); font-size: 0.9rem;
}
.item.locked { opacity: 0.6; cursor: not-allowed; }
.item.locked .pv { filter: grayscale(1); }
.item .need { display: block; font-size: 0.8rem; color: #b45309; font-weight: 800; }

/* quests */
.quests { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.quest {
  display: flex; align-items: center; gap: 14px;
  background: var(--white); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-soft);
}
.quest .qi { font-size: 2.4rem; }
.quest .qb { flex: 1; }
.quest b { display: block; color: var(--blue-900); font-size: 1.1rem; }
.quest .qbar { height: 10px; background: #eef2f9; border-radius: 999px; overflow: hidden; margin-top: 6px; }
.quest .qbar i { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.quest small { color: var(--ink-soft); font-weight: 700; }
.quest.soon { opacity: 0.6; }

@media (max-width: 760px) {
  .me-card { grid-template-columns: 1fr; text-align: center; padding: 20px; }
  .me-tags, .me-actions { justify-content: center; }
  .me-big { width: 170px; height: 170px; }
  .me-pet { font-size: 3rem; }
  .item { width: calc(33.333% - 8px); }
}
