:root {
  color-scheme: light;
  --bg: #1d1b24;
  --panel: #2d2a36;
  --card: #3b3846;
  --accent: #f075b4;
  --accent-2: #8be1c6;
  --text: #f5f5f7;
  --muted: #c2bcd3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #2f2b3f, var(--bg));
  color: var(--text);
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background: #24212c;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  box-shadow: 10px 0 20px rgba(0, 0, 0, 0.35);
}

.profile-card {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.profile-card h1 {
  margin: 0;
  font-size: 1.4rem;
  color: var(--accent);
}

.tagline {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 0.5rem;
  background: #1f1b24;
  border: 2px solid #4c4759;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 110%;
  object-fit: cover;
  display: block;
  object-position: center 20%;
}

.menu {
  display: grid;
  gap: 0.75rem;
}

.menu-button {
  background: #312c3a;
  color: var(--text);
  border: 1px solid transparent;
  padding: 0.75rem 1.2rem;
  border-radius: 1rem;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}

.menu-button.active {
  background: var(--accent);
  border-color: #f3a9cf;
  color: #1d1b24;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2.5rem 0;
  gap: 2rem;
  flex-wrap: wrap;
}

.currency-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  background: var(--panel);
  padding: 1rem 1.5rem;
  border-radius: 1.25rem;
  min-width: 360px;
}

.currency-strip .label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
}

.currency-strip .value {
  font-size: 1.6rem;
  font-weight: 700;
}

.buy-panel {
  background: var(--panel);
  padding: 0.75rem 1.25rem;
  border-radius: 1.25rem;
  display: grid;
  gap: 0.5rem;
}

.buy-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pill {
  background: #3f3a4c;
  color: var(--text);
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-weight: 600;
  min-height: 36px;
}

.pill.active {
  background: var(--accent-2);
  color: #1d1b24;
}

.layout {
  display: grid;
  gap: 1.5rem;
  padding: 1.5rem 2.5rem 2rem;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.panel {
  background: var(--panel);
  padding: 1.5rem;
  border-radius: 1.25rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.panel h2 {
  margin-top: 0;
  color: var(--accent-2);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.panel-header p {
  margin: 0;
}

.workplace-list {
  display: grid;
  gap: 1.25rem;
}

.workplace-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--card);
  border-radius: 1.5rem;
}

.workplace-icon {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: #2b2733;
  border: 3px solid #4c4759;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
}

.workplace-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.workplace-info h3 {
  margin: 0;
}

.workplace-info p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.workplace-stats {
  display: grid;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.workplace-actions {
  display: grid;
  gap: 0.4rem;
  justify-items: end;
}

.workplace-progress {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.workplace-progress span {
  display: block;
  height: 100%;
  background: var(--accent-2);
}

.workplace-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.tag {
  background: rgba(240, 117, 180, 0.2);
  color: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.tag button {
  background: transparent;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0;
}

.assignment-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
}

.assignment-row select {
  background: #262230;
  border: 1px solid #3f3a4c;
  color: var(--text);
  border-radius: 0.6rem;
  padding: 0.25rem 0.5rem;
}

.assignment-row button {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.card-list {
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--card);
  border-radius: 1rem;
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
}

.card h3 {
  margin: 0;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.card .meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

.rarity-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.rarity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px currentColor;
}

.rarity-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rarity-dot.uncommon,
.rarity-label.uncommon {
  color: #b5f59b;
}

.rarity-dot.common,
.rarity-label.common {
  color: #1f7a3b;
}

.rarity-dot.rare,
.rarity-label.rare {
  color: #53d7ff;
}

.rarity-dot.ultra-rare,
.rarity-label.ultra-rare {
  color: #1b6cff;
}

.rarity-dot.epic,
.rarity-label.epic {
  color: #9b59ff;
}

.rarity-dot.legendary,
.rarity-label.legendary {
  color: #ffd700;
}

.rarity-dot.exotic,
.rarity-label.exotic {
  color: #ff7a18;
}

.manager-actions {
  display: grid;
  gap: 0.5rem;
}

.liquid-grid {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.liquid-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
}

.card button,
.workplace-actions button {
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  font-weight: 700;
  color: #1d1b24;
  cursor: pointer;
  transition: transform 0.15s ease;
  min-height: 40px;
}

.work-button {
  background: var(--accent-2);
}

.upgrade-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.time-warp {
  margin-top: 1rem;
  background: #262230;
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.prestige-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  background: #262230;
  border-radius: 1rem;
  padding: 1rem;
}

.event-status {
  margin-bottom: 1rem;
  background: #262230;
  padding: 1rem;
  border-radius: 1rem;
}

.crate-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #262230;
  padding: 1rem 1.2rem;
  border-radius: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.girl-card {
  display: grid;
  gap: 0.4rem;
}

.girl-card .meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}

.card button[disabled],
.workplace-actions button[disabled] {
  background: #5c556a;
  cursor: help;
  color: #b7b0c4;
}

.card button:not([disabled]):hover,
.workplace-actions button:not([disabled]):hover {
  transform: translateY(-1px) scale(1.01);
}

.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 1.5rem 0;
}

.muted {
  color: var(--muted);
  margin-top: 0;
}

.prestige-card {
  display: grid;
  gap: 1rem;
}

.prestige-card ul {
  padding-left: 1.1rem;
  color: var(--muted);
}

.prestige-status {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cta {
  align-self: flex-start;
  background: var(--accent-2);
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  color: #1d1b24;
  cursor: pointer;
  min-height: 44px;
}

.guide-section {
  display: grid;
  gap: 1.25rem;
}

.guide-block {
  background: #262230;
  border-radius: 1rem;
  padding: 1rem 1.2rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.guide-block h3 {
  margin: 0 0 0.5rem;
  color: var(--accent);
}

.guide-block p {
  margin: 0;
  color: var(--muted);
}

.guide-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  display: grid;
  gap: 0.35rem;
}

.guide-note {
  margin-top: 0.75rem;
  color: var(--accent-2);
  font-weight: 600;
}

footer {
  padding: 0 2.5rem 2.5rem;
  color: var(--muted);
}

@media (max-width: 960px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.5rem;
  }

  .menu {
    grid-auto-flow: column;
    grid-auto-columns: minmax(140px, 1fr);
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scroll-snap-type: x mandatory;
  }

  .menu-button {
    scroll-snap-align: start;
  }
}

@media (max-width: 700px) {
  .sidebar {
    flex-direction: column;
    align-items: stretch;
  }

  .top-bar {
    padding: 1.5rem;
    gap: 1rem;
  }

  .layout {
    padding: 1.5rem;
  }

  footer {
    padding: 0 1.5rem 2rem;
  }

  .currency-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    width: 100%;
  }

  .buy-panel {
    width: 100%;
  }

  .buy-buttons {
    width: 100%;
  }

  .pill {
    flex: 1 1 70px;
    text-align: center;
  }

  .workplace-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .workplace-actions {
    justify-items: center;
  }

  .time-warp {
    flex-direction: column;
    align-items: flex-start;
  }

  .crate-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .field-row {
    flex-direction: column;
    align-items: stretch;
  }

  .field-row input,
  .field-row button {
    width: 100%;
  }

  .quest-meta {
    flex-direction: column;
    align-items: flex-start;
  }

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

}

@media (max-width: 560px) {
  .sidebar {
    padding: 1.25rem;
  }

  .menu {
    grid-auto-columns: minmax(160px, 1fr);
  }

  .top-bar {
    padding: 1.25rem;
  }

  .layout {
    padding: 1.25rem;
  }

  .panel {
    padding: 1.25rem;
  }

  .workplace-card {
    padding: 1rem;
  }

  .workplace-icon {
    margin: 0 auto;
  }
}
/* ===== Profile (nickname + badges) ===== */
.player-line{
  margin: 0.35rem 0 0;
  font-weight: 700;
  color: rgba(255,255,255,.92);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.player-line #player-badge{
  filter: drop-shadow(0 0 8px rgba(240,117,180,.35));
}

.profile-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.field-row{
  display:flex;
  gap:0.75rem;
  align-items:center;
  flex-wrap:wrap;
}

.field-row input{
  flex:1;
  min-width: 180px;
  background:#1b1822;
  border:1px solid rgba(255,255,255,.10);
  color: var(--text);
  padding: 0.65rem 0.9rem;
  border-radius: 0.4rem;
  outline: none;
}

.field-row input:focus{
  border-color: rgba(240,117,180,.55);
  box-shadow: 0 0 0 4px rgba(240,117,180,.12);
}

.small{ font-size: 0.85rem; }

.selected-badge{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 0.75rem;
  background:#221f2b;
  border:1px solid rgba(255,255,255,.10);
  border-radius: 0.4rem;
  padding: 0.75rem 0.9rem;
}

.badge-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.badge-controls{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.6rem;
}

.badge-controls select{
  background:#1b1822;
  border:1px solid rgba(255,255,255,.10);
  color: var(--text);
  padding: 0.45rem 0.6rem;
  border-radius: 0.25rem;
  outline: none;
}

.badge-controls select:focus{
  border-color: rgba(240,117,180,.55);
  box-shadow: 0 0 0 4px rgba(240,117,180,.12);
}

/* Badge requirements + tooltip */
.badge{
  position: relative;
}

.badge .req{
  color: #0f0f14;
  font-size: 0.82rem;
  line-height: 1.2;
}

.badge .req-meta{
  color: #0f0f14;
  font-size: 0.82rem;
  line-height: 1.2;
}

.badge[data-tooltip]:hover::after,
.badge[data-tooltip]:focus-visible::after{
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  background: #14121a;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 0.25rem;
  padding: 0.55rem 0.65rem;
  max-width: 260px;
  width: max-content;
  white-space: pre-line;
  color: var(--text);
  box-shadow: 0 16px 30px rgba(0,0,0,.45);
  z-index: 50;
  pointer-events: none;
}

.badge[data-tooltip]:hover::before,
.badge[data-tooltip]:focus-visible::before{
  content:"";
  position:absolute;
  left: 16px;
  top: calc(100% + 3px);
  width: 10px;
  height: 10px;
  background: #14121a;
  border-left: 1px solid rgba(255,255,255,.14);
  border-top: 1px solid rgba(255,255,255,.14);
  transform: rotate(45deg);
  z-index: 51;
  pointer-events: none;
}


.badge{
  background:#1b1822;
  border:1px solid rgba(255,255,255,.10);
  box-shadow: 0 10px 22px rgba(0,0,0,.14);
  border-radius: 0.25rem !important;
  padding: 0.75rem;
  text-align:left;
  cursor:pointer;
  display:grid;
  gap: 0.25rem;
}

.badge .row{
  display:flex;
  align-items:center;
  gap:0.5rem;
}

.badge .icon{
  font-size: 1.1rem;
}

.badge .name{
  font-weight: 800;
}

.badge .desc{
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.2;
}

.badge.locked{
  opacity: 0.55;
  cursor: help;
  box-shadow: none;
}

.badge.locked .req,
.badge.locked .req-meta{
  color: #0f0f14;
}


.badge.selected{
  background: var(--accent);
  border-color: rgba(243,169,207,.85);
  box-shadow: 0 10px 22px rgba(0,0,0,.22);
}

.badge.selected .name{
  color: #1d1b24;
}

.badge.selected .desc{
  color: #39ff14;
}

.badge:not(.locked):not(.selected) .desc{
  color: #2efcff;
}

.badge.selected .icon{
  filter: drop-shadow(0 0 8px rgba(255,255,255,.12));
}


.profile-stats{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.profile-stat{
  background:#221f2b;
  border:1px solid rgba(255,255,255,.10);
  border-radius: 0.4rem;
  padding: 0.75rem 0.9rem;
  display:flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.profile-stat span{ color: var(--muted); }
.profile-stat strong{ color: var(--text); }

/* Profile badge progress */
.mini-progress{
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,.08);
  border-radius: 0.15rem;
  overflow: hidden;
  margin-top: 0.55rem;
}

.mini-progress .fill{
  height: 100%;
  background: rgba(240,117,180,.65);
  box-shadow: 0 0 18px rgba(240,117,180,.18);
}


/* ===== Quests (Daily / Weekly) ===== */
.quests-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.quests-head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.quest-list{
  display:grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.quest-card{
  background: #1b1822;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 0.9rem;
  padding: 0.85rem;
  display:grid;
  gap: 0.45rem;
}

.quest-card.complete{
  border-color: rgba(140, 255, 140, .35);
}

.quest-card.claimed{
  opacity: 0.55;
}

.quest-top{
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.quest-title{
  font-weight: 900;
  letter-spacing: .2px;
  min-width: 0;
}

.quest-reward{
  background: #2a2633;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 0.65rem;
  padding: 0.25rem 0.55rem;
  font-weight: 800;
  font-size: 0.85rem;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quest-desc{
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.2;
}

.quest-progress{
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.35rem;
  overflow: hidden;
}

.quest-progress span{
  display:block;
  height: 100%;
  background: var(--accent-2);
  width: 0%;
}

.quest-meta{
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.15rem;
}

.quest-claim{
  background: var(--accent);
  border: none;
  border-radius: 0.75rem;
  padding: 0.45rem 0.75rem;
  font-weight: 900;
  color: #1d1b24;
  cursor: pointer;
}

.quest-claim:disabled{
  opacity: 0.5;
  cursor: not-allowed;
}

.quest-claim.secondary{
  background: #3f3a4c;
  color: var(--text);
}


/* ===== Milestones ===== */
.milestone-summary{
  display:grid;
  gap: 0.75rem;
}

.milestone-summary .meta{
  display:flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

.milestone-progress{
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  overflow: hidden;
}

.milestone-progress span{
  display:block;
  height: 100%;
  background: var(--accent-2);
}

.milestone-card h3{
  margin: 0;
}

.milestone-list-items{
  display:grid;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.milestone-item{
  display:flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0.6rem;
  border-radius: 0.6rem;
  background: rgba(0,0,0,.15);
  color: var(--muted);
  font-size: 0.85rem;
}

.milestone-item.reached{
  background: rgba(139,225,198,.18);
  color: var(--text);
}

.milestone-item span:last-child{
  font-weight: 700;
  color: var(--accent-2);
}

.milestone-item.reached span:last-child{
  color: #1d1b24;
  background: var(--accent-2);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
}





/* ===== Advancement (Fejlesztési mérföldkövek / achievements) ===== */
.advancement-summary{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 1rem;
}

.advancement-summary .adv-sum-left{
  display:flex;
  flex-direction: column;
  gap: .25rem;
}

.advancement-summary .adv-sum-title{
  font-weight: 900;
  letter-spacing: .2px;
}

.advancement-summary .adv-sum-meta{
  color: var(--muted);
  font-size: .9rem;
}

.advancement-summary .adv-sum-bar{
  height: 10px;
  width: min(320px, 42vw);
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
}

.advancement-summary .adv-sum-bar span{
  display:block;
  height:100%;
  width: 0;
  background: var(--accent);
}

.advancement-category-list{
  display: grid;
  gap: 1rem;
}

.adv-category{
  padding: 1rem;
}

.adv-category-head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .85rem;
}

.adv-category-head h3{
  margin: 0;
  font-size: 1.05rem;
}

.adv-category-head .adv-category-meta{
  color: var(--muted);
  font-size: .85rem;
  white-space: nowrap;
}

.adv-list{
  display: grid;
  gap: .65rem;
}

.adv-item{
  display:grid;
  grid-template-columns: 52px 1fr 140px;
  align-items:center;
  gap: .85rem;
  padding: .75rem .8rem;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(10, 9, 14, 0.30);
}

.adv-item.unlocked{
  border-color: rgba(154, 230, 110, 0.35);
}

.adv-iconbox{
  width: 46px;
  height: 46px;
  border-radius: 0.35rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 1.35rem;
  line-height: 1;
  user-select: none;
}

.adv-item.locked .adv-iconbox{
  opacity: .55;
  filter: grayscale(1);
}

.adv-text .adv-name{
  font-weight: 900;
  letter-spacing: .15px;
}

.adv-text .adv-desc{
  color: var(--muted);
  font-size: .88rem;
  margin-top: .2rem;
}

.adv-right{
  text-align: right;
  display:flex;
  flex-direction: column;
  gap: .35rem;
}

.adv-status{
  font-weight: 800;
  font-size: .85rem;
}

.adv-mini{
  color: var(--muted);
  font-size: .8rem;
}

.adv-progress{
  height: 9px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
}

.adv-progress span{
  display:block;
  height:100%;
  width: 0;
  background: var(--accent-2);
}

@media (max-width: 560px) {
  .adv-item{
    grid-template-columns: 52px 1fr;
  }
  .adv-right{
    grid-column: 1 / -1;
    text-align: left;
  }
}


/* ===== FX / UI Feedback ===== */
.fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

.fx-banner-host {
  position: absolute;
  top: 86px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
}

.fx-banner {
  background: rgba(15, 13, 20, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f7f5ff;
  padding: 0.55rem 0.9rem;
  border-radius: 0.65rem; /* squared-ish */
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  transform: translateY(-8px);
  opacity: 0;
  animation: fxBannerIn 180ms ease forwards;
}

.fx-banner.good {
  border-color: rgba(154, 230, 110, 0.35);
}

.fx-banner.info {
  border-color: rgba(95, 217, 255, 0.35);
}

.fx-banner.out {
  animation: fxBannerOut 180ms ease forwards;
}

@keyframes fxBannerIn {
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fxBannerOut {
  to { transform: translateY(-10px); opacity: 0; }
}



.fx-adv-host {
  position: fixed;
  top: 86px;
  left: 14px;
  display: grid;
  gap: 0.55rem;
  width: min(340px, calc(100vw - 28px));
  z-index: 999;
}

.fx-adv-toast {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.7rem;
  align-items: center;
  padding: 0.65rem 0.8rem;
  background: rgba(15, 13, 20, 0.90);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 3px solid rgba(154, 230, 110, 0.55);
  color: #f7f5ff;
  border-radius: 0.8rem;
  box-shadow: 0 12px 28px rgba(0,0,0,0.38);
  transform: translateY(-12px);
  opacity: 0;
  animation: fxAdvIn 220ms ease forwards;
}

.fx-adv-toast.out {
  animation: fxAdvOut 220ms ease forwards;
}

.fx-adv-icon {
  width: 44px;
  height: 44px;
  border-radius: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 1.35rem;
}

.fx-adv-title {
  font-weight: 900;
  font-size: 0.82rem;
  color: rgba(154, 230, 110, 0.95);
}

.fx-adv-name {
  font-weight: 900;
  letter-spacing: 0.2px;
}

@keyframes fxAdvIn {
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fxAdvOut {
  to { transform: translateY(-10px); opacity: 0; }
}

.fx-toast-host {
  position: absolute;
  top: 86px;
  right: 14px;
  display: grid;
  gap: 0.55rem;
  width: min(340px, calc(100vw - 28px));
}

.fx-toast {
  background: rgba(15, 13, 20, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f7f5ff;
  padding: 0.65rem 0.8rem;
  border-radius: 0.65rem;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  transform: translateX(12px);
  opacity: 0;
  animation: fxToastIn 180ms ease forwards;
}

.fx-toast.good { border-color: rgba(154, 230, 110, 0.35); }
.fx-toast.info { border-color: rgba(95, 217, 255, 0.35); }

.fx-toast-title {
  font-weight: 900;
  margin-bottom: 0.15rem;
}

.fx-toast-body {
  opacity: 0.85;
  font-size: 0.92rem;
}

.fx-toast.out {
  animation: fxToastOut 200ms ease forwards;
}

@keyframes fxToastIn {
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fxToastOut {
  to { transform: translateX(16px); opacity: 0; }
}

.fx-pop {
  position: fixed;
  padding: 0.25rem 0.55rem;
  border-radius: 0.6rem;
  background: rgba(15, 13, 20, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 900;
  letter-spacing: 0.2px;
  transform: translate(-50%, 0);
  opacity: 0;
  animation: fxPopUp 950ms ease forwards;
  white-space: nowrap;
}

.fx-pop.cash { color: var(--accent-2); }
.fx-pop.event { color: var(--accent); }

@keyframes fxPopUp {
  0% { transform: translate(-50%, 2px) scale(0.98); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(-50%, -26px) scale(1.02); opacity: 0; }
}

/* Card flashes */
.fx-flash {
  animation: fxFlash 280ms ease;
}

.fx-flash-good {
  animation: fxFlashGood 280ms ease;
}

@keyframes fxFlash {
  0% { box-shadow: 0 0 0 rgba(240,117,180,0); }
  40% { box-shadow: 0 0 0.0rem rgba(240,117,180,0.0), 0 0 0.65rem rgba(240,117,180,0.35); }
  100% { box-shadow: 0 0 0 rgba(240,117,180,0); }
}

@keyframes fxFlashGood {
  0% { box-shadow: 0 0 0 rgba(154,230,110,0); }
  40% { box-shadow: 0 0 0.65rem rgba(154,230,110,0.35); }
  100% { box-shadow: 0 0 0 rgba(154,230,110,0); }
}

/* Top bar pulses */
.fx-pulse-cash {
  animation: fxPulseCash 380ms ease;
}

.fx-pulse-ggl {
  animation: fxPulseGgl 380ms ease;
}

.fx-pulse-angels {
  animation: fxPulseAngels 380ms ease;
}

@keyframes fxPulseCash {
  0% { transform: scale(1); text-shadow: none; }
  50% { transform: scale(1.07); text-shadow: 0 0 16px rgba(95,217,255,0.45); }
  100% { transform: scale(1); text-shadow: none; }
}

@keyframes fxPulseGgl {
  0% { transform: scale(1); text-shadow: none; }
  50% { transform: scale(1.07); text-shadow: 0 0 16px rgba(240,117,180,0.55); }
  100% { transform: scale(1); text-shadow: none; }
}

@keyframes fxPulseAngels {
  0% { transform: scale(1); text-shadow: none; }
  50% { transform: scale(1.07); text-shadow: 0 0 16px rgba(154,230,110,0.45); }
  100% { transform: scale(1); text-shadow: none; }
}

/* Smoother progress bars */
.workplace-progress span {
  transition: width 160ms linear;
}


/* ===== Crate icons + flashy crate reveal ===== */
.fx-adv-host{
  right: 14px;
  left: auto;
}

.crate-mini-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 26px;
  height: 26px;
  border-radius: 0.55rem;
  margin-right: 0.55rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 1rem;
  line-height: 1;
  user-select: none;
}

.crate-btn-ico{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 1.35rem;
  height: 1.35rem;
  margin-right: 0.5rem;
  border-radius: 0.45rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.95rem;
  line-height: 1;
  vertical-align: -0.15rem;
  user-select: none;
}

/* Prevent background scrolling when crate reveal is open */
body.crate-reveal-open{
  overflow: hidden;
}

.crate-reveal-layer{
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.crate-reveal-layer.show{
  display: flex;
}

.crate-reveal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.64);
  backdrop-filter: blur(2px);
  opacity: 0;
  animation: crateBackdropIn 180ms ease forwards;
}

.crate-reveal-layer.hide .crate-reveal-backdrop{
  animation: crateBackdropOut 180ms ease forwards;
}

@keyframes crateBackdropIn{
  to { opacity: 1; }
}

@keyframes crateBackdropOut{
  to { opacity: 0; }
}

.crate-reveal-modal{
  position: relative;
  width: min(560px, calc(100vw - 28px));
  background: rgba(15,13,20,0.95);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 1.25rem;
  padding: 1rem 1.05rem 1.15rem;
  box-shadow: 0 18px 44px rgba(0,0,0,0.48);
  transform: translateY(10px) scale(0.98);
  opacity: 0;
  z-index: 1;
}

.crate-reveal-layer.show .crate-reveal-modal{
  animation: crateModalIn 200ms ease forwards;
}

.crate-reveal-layer.hide .crate-reveal-modal{
  animation: crateModalOut 180ms ease forwards;
}

@keyframes crateModalIn{
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes crateModalOut{
  to { transform: translateY(14px) scale(0.98); opacity: 0; }
}

.crate-reveal-x{
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 36px;
  height: 36px;
  border-radius: 0.9rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}

.crate-reveal-x:hover{
  transform: translateY(-1px);
}

.crate-reveal-head{
  padding-right: 2.6rem;
}

.crate-reveal-title{
  display:flex;
  align-items:center;
  gap: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.2px;
  font-size: 1.1rem;
}

.crate-reveal-title-ico{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 34px;
  height: 34px;
  border-radius: 0.8rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 1.15rem;
  user-select: none;
}

.crate-reveal-sub{
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.crate-reveal-crate{
  position: relative;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 0.9rem 0 0.7rem;
}

.crate-reveal-cratebox{
  width: 98px;
  height: 98px;
  border-radius: 1.05rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 2.35rem;
  user-select: none;
}

.crate-reveal-modal.opening .crate-reveal-cratebox{
  animation: crateShake 620ms ease;
}

@keyframes crateShake{
  0% { transform: rotate(0) scale(1); }
  15% { transform: rotate(-4deg) scale(1.03); }
  30% { transform: rotate(5deg) scale(1.05); }
  45% { transform: rotate(-6deg) scale(1.06); }
  60% { transform: rotate(4deg) scale(1.04); }
  75% { transform: rotate(-3deg) scale(1.02); }
  100% { transform: rotate(0) scale(1); }
}

.crate-reveal-glow{
  position:absolute;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(240,117,180,0.18), rgba(95,217,255,0.08), transparent 65%);
  filter: blur(0.2px);
  opacity: 0.9;
  pointer-events:none;
}

.crate-reveal-grid{
  display:grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
  padding: 0.4rem 0.1rem 0.2rem;
}

@media (max-width: 560px){
  .crate-reveal-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.crate-loot-card{
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  border-radius: 1rem;
  padding: 0.55rem 0.6rem;
  min-height: 78px;
  display:flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.45rem;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
}

.crate-loot-card.in{
  animation: crateLootIn 280ms ease forwards;
}

@keyframes crateLootIn{
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.crate-loot-top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 0.5rem;
}

.crate-loot-drop{
  font-size: 1.05rem;
  opacity: 0.9;
}

.crate-loot-rarity{
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.9;
}

.crate-loot-qty{
  font-weight: 900;
  font-size: 1.05rem;
}

/* rarity highlights */
.crate-loot-card.uncommon{ --loot: #b5f59b; border-color: rgba(181,245,155,0.55); box-shadow: 0 0 18px rgba(181,245,155,0.10); }
.crate-loot-card.common{ --loot: #1f7a3b; border-color: rgba(31,122,59,0.55); box-shadow: 0 0 18px rgba(31,122,59,0.10); }
.crate-loot-card.rare{ --loot: #53d7ff; border-color: rgba(83,215,255,0.55); box-shadow: 0 0 18px rgba(83,215,255,0.10); }
.crate-loot-card.ultra-rare{ --loot: #1b6cff; border-color: rgba(27,108,255,0.55); box-shadow: 0 0 18px rgba(27,108,255,0.10); }
.crate-loot-card.epic{ --loot: #9b59ff; border-color: rgba(155,89,255,0.55); box-shadow: 0 0 18px rgba(155,89,255,0.10); }
.crate-loot-card.legendary{ --loot: #ffd700; border-color: rgba(255,215,0,0.55); box-shadow: 0 0 18px rgba(255,215,0,0.12); }
.crate-loot-card.exotic{ --loot: #ff7a18; border-color: rgba(255,122,24,0.55); box-shadow: 0 0 18px rgba(255,122,24,0.12); }

.crate-loot-card.uncommon .crate-loot-rarity{ color: #b5f59b; }
.crate-loot-card.common .crate-loot-rarity{ color: #1f7a3b; }
.crate-loot-card.rare .crate-loot-rarity{ color: #53d7ff; }
.crate-loot-card.ultra-rare .crate-loot-rarity{ color: #1b6cff; }
.crate-loot-card.epic .crate-loot-rarity{ color: #9b59ff; }
.crate-loot-card.legendary .crate-loot-rarity{ color: #ffd700; }
.crate-loot-card.exotic .crate-loot-rarity{ color: #ff7a18; }

.crate-reveal-actions{
  display:flex;
  justify-content:flex-end;
  padding-top: 0.75rem;
}



/* ===== Prestige rewards table ===== */
.prestige-rewards{
  margin-top: 1.25rem;
  background: var(--panel);
  border-radius: 1.25rem;
  padding: 1.25rem 1.25rem;
}

.prestige-table-wrap{
  margin-top: 0.75rem;
  overflow: auto;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.10);
}

.prestige-table{
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.prestige-table th,
.prestige-table td{
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: left;
  white-space: nowrap;
}

.prestige-table thead th{
  position: sticky;
  top: 0;
  background: rgba(15, 13, 20, 0.75);
  backdrop-filter: blur(8px);
  font-size: 0.85rem;
  color: var(--muted);
}

.prestige-row-current{
  background: rgba(240, 117, 180, 0.12);
}

.prestige-row-next{
  outline: 1px solid rgba(139, 225, 198, 0.40);
  outline-offset: -1px;
}


/* ===== Premium Shop (Prémium bolt) ===== */
.premium-shopkeeper{
  display:flex;
  gap:12px;
  align-items:center;
}

.shopkeeper-avatar{
  width:56px;
  height:56px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  overflow:hidden;
  flex-shrink:0;
}

.shopkeeper-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.shopkeeper-name{
  font-weight:700;
}

.premium-shop-grid{
  display:grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap:14px;
  align-items:start;
}

@media (max-width: 900px){
  .premium-shop-grid{ grid-template-columns: 1fr; }
}

.premium-section-head{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.premium-card-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.premium-item{
  display:grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap:12px;
  align-items:center;
  padding:10px;
  border-radius:14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.14);
}

.premium-item.active{
  outline: 2px solid rgba(255,255,255,0.18);
}

.premium-item.owned{
  opacity: 0.92;
}

.premium-icon{
  width:44px;
  height:44px;
  border-radius:12px;
  display:grid;
  place-items:center;
  font-size:20px;
  background: rgba(255,255,255,0.06);
}

.premium-meta{
  min-width:0;
}

.premium-meta h4,
.premium-meta p{
  overflow-wrap:anywhere;
  word-break:break-word;
}

.premium-meta h4{
  margin:0;
  font-size: 15px;
}

.premium-meta p{
  margin: 3px 0 0;
}

.premium-actions{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
}

.premium-tag{
  font-size:12px;
  padding:2px 10px;
  border-radius:999px;
  border: 1px solid rgba(255,255,255,0.16);
  opacity:0.9;
}

.premium-slots{
  display:flex;
  gap:10px;
  margin-top:8px;
}

.premium-slot{
  width:44px;
  height:44px;
  border-radius:12px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,0.06);
  border: 1px dashed rgba(255,255,255,0.18);
}

@media (max-width: 560px){
  .premium-item{
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .premium-actions{
    grid-column: 1 / -1;
    justify-content:flex-start;
  }
}
