/* Новогодний ивент «Новогодняя ёлка» — 3D-рамка, перелив ника, Праздничный обмен и админка */

/* 1. Новогодний перелив ника */
.sq-nickname--holiday {
  display: inline-flex;
  align-items: baseline;
  white-space: pre;
  color: #ffe3b0 !important;
  text-shadow: 0 1px 0 #5b1822, 0 0 11px rgba(255, 118, 128, 0.42);
}

.sq-holiday-letter {
  display: inline-block;
  color: #ffd57a;
  background: linear-gradient(
    112deg,
    #ff4b6b 4%,
    #ffd76a 24%,
    #fff7e2 44%,
    #5ef0a5 66%,
    #7ae4ff 84%,
    #ff4b6b 98%
  );
  background-size: 290% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: sq-holiday-letter-wave 3.4s ease-in-out infinite;
  animation-delay: calc(var(--letter-index, 0) * 80ms);
}

@keyframes sq-holiday-letter-wave {
  0%, 100% {
    background-position: 100% 50%;
    filter: brightness(0.95) drop-shadow(0 0 4px rgba(255, 86, 112, 0.35));
  }
  46% {
    background-position: 0% 50%;
    filter: brightness(1.26) drop-shadow(0 0 7px rgba(255, 221, 112, 0.52));
  }
}

/* Кнопка выбора цвета ника в профиле */
.pilot-color-options button[aria-label*="Новый год"] i {
  background: linear-gradient(135deg, #ff405e, #ffd86f 52%, #55e89a);
  box-shadow: 0 0 10px rgba(255, 107, 130, 0.55);
}

/* 2. Новогодняя рамка аватара (статичный корпус, мигают только гирлянды на самой рамке) */
.sq-frame--new-year,
.sq-frame--new-year .sq-frame-art,
.sq-frame--new-year .sq-frame-art img {
  perspective: none !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

.sq-frame--new-year .sq-frame-art img {
  filter: drop-shadow(0 0 8px rgba(255, 206, 120, 0.28));
}

.sq-frame--new-year .sq-frame-art:before,
.sq-frame--new-year .sq-frame-art:after {
  content: none !important;
  display: none !important;
  animation: none !important;
  transform: none !important;
}

html.sq-perf-hidden .sq-holiday-letter {
  animation-play-state: paused !important;
}

html.sq-perf-low .sq-holiday-letter {
  animation: none !important;
}

/* 3. Вкладка Праздничный обмен на Бирже */
.exchange-tabs button.sq-ex-holiday-tab {
  background: linear-gradient(125deg, rgba(164, 24, 52, 0.34), rgba(180, 128, 36, 0.24));
  border: 1px solid rgba(255, 198, 102, 0.42);
  color: #ffe3a8;
}

.exchange-tabs button.sq-ex-holiday-tab:hover {
  border-color: rgba(255, 222, 138, 0.78);
  color: #fff6dc;
}

.exchange-tabs button.sq-ex-holiday-tab.active {
  background: linear-gradient(125deg, #b51f3e, #c98f29);
  border-color: #ffe194;
  color: #fffaf0;
  box-shadow: 0 0 18px rgba(255, 90, 114, 0.35);
}

.sq-holiday-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 0 8px;
}

.sq-holiday-hero {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  padding: 18px 20px;
  background:
    radial-gradient(circle at 86% 24%, rgba(255, 212, 102, 0.18), transparent 46%),
    radial-gradient(circle at 14% 78%, rgba(220, 44, 78, 0.22), transparent 52%),
    linear-gradient(135deg, rgba(28, 14, 25, 0.94), rgba(14, 26, 40, 0.95));
  border: 1px solid rgba(255, 200, 106, 0.32);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}

.sq-holiday-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.sq-holiday-kicker {
  font-family: "Exo 2", sans-serif;
  font-size: calc(10px * var(--sq-font-scale, 1));
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #ffd37a;
}

.sq-holiday-hero h4 {
  margin: 6px 0 6px;
  font-size: calc(20px * var(--sq-font-scale, 1));
  color: #fff4df;
  letter-spacing: 0.4px;
}

.sq-holiday-hero p {
  font-size: calc(12px * var(--sq-font-scale, 1));
  line-height: 1.55;
  color: #c7d4e2;
  max-width: 680px;
}

.sq-holiday-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: "Exo 2", sans-serif;
  font-size: calc(11px * var(--sq-font-scale, 1));
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid rgba(114, 232, 165, 0.42);
  background: rgba(24, 92, 58, 0.45);
  color: #aaf8cc;
}

.sq-holiday-status-pill.paused {
  border-color: rgba(255, 145, 145, 0.42);
  background: rgba(105, 32, 42, 0.45);
  color: #ffc5c5;
}

.sq-holiday-progress-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}

.sq-holiday-progress-bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(8, 15, 24, 0.85);
  border: 1px solid rgba(255, 210, 128, 0.25);
  overflow: hidden;
}

.sq-holiday-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff4b66, #ffbf52, #6df2a7);
  box-shadow: 0 0 12px rgba(255, 198, 92, 0.55);
  transition: width 0.35s ease;
}

.sq-holiday-progress-count {
  font-family: "Exo 2", sans-serif;
  font-weight: 700;
  font-size: calc(13px * var(--sq-font-scale, 1));
  color: #ffe39c;
  white-space: nowrap;
}

.sq-holiday-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 960px) {
  .sq-holiday-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.sq-holiday-ornament {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 12px 10px 11px;
  border-radius: 7px;
  background: linear-gradient(160deg, rgba(16, 28, 44, 0.9), rgba(9, 17, 29, 0.94));
  border: 1px solid rgba(132, 168, 194, 0.16);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.sq-holiday-ornament.collected {
  background: linear-gradient(155deg, rgba(64, 22, 36, 0.88), rgba(20, 32, 46, 0.95));
  border-color: rgba(255, 202, 98, 0.52);
  box-shadow: 0 4px 16px rgba(255, 92, 116, 0.18), inset 0 0 14px rgba(255, 206, 114, 0.12);
}

.sq-holiday-ornament.missing {
  opacity: 0.58;
}

.sq-holiday-ornament img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55));
}

.sq-holiday-ornament.missing img {
  filter: grayscale(0.75) brightness(0.68) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
}

.sq-holiday-orn-cat {
  font-family: "Exo 2", sans-serif;
  font-size: calc(9px * var(--sq-font-scale, 1));
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #88a4bb;
}

.sq-holiday-ornament.collected .sq-holiday-orn-cat {
  color: #ffce76;
}

.sq-holiday-orn-name {
  font-weight: 600;
  font-size: calc(12px * var(--sq-font-scale, 1));
  color: #e4eef7;
  line-height: 1.25;
}

.sq-holiday-orn-badge {
  margin-top: auto;
  font-size: calc(10px * var(--sq-font-scale, 1));
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #8aa1b4;
}

.sq-holiday-ornament.collected .sq-holiday-orn-badge {
  background: rgba(94, 232, 148, 0.16);
  color: #8df6ba;
  border: 1px solid rgba(94, 232, 148, 0.35);
}

.sq-holiday-rewards-box {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .sq-holiday-rewards-box {
    grid-template-columns: 1fr;
  }
}

.sq-holiday-reward-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(35, 16, 28, 0.92), rgba(14, 24, 38, 0.94));
  border: 1px solid rgba(255, 198, 102, 0.32);
}

.sq-holiday-tree-row {
  display: flex;
  gap: 14px;
  align-items: center;
}

.sq-holiday-tree-art {
  width: 92px;
  height: 92px;
  border-radius: 8px;
  padding: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(255, 196, 86, 0.25), rgba(146, 18, 42, 0.48) 70%);
  border: 1px solid rgba(255, 210, 118, 0.48);
  box-shadow: 0 0 22px rgba(255, 86, 112, 0.26);
}

.sq-holiday-tree-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}

.sq-holiday-tree-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.sq-holiday-stat-chip {
  font-size: calc(11px * var(--sq-font-scale, 1));
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 210, 128, 0.22);
  color: #ffe8b5;
}

.sq-holiday-cosmetics {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sq-holiday-frame-preview-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sq-holiday-frame-preview-row .pilot-frame-preview {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
}

.sq-holiday-nick-preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(7, 14, 24, 0.72);
  border: 1px solid rgba(255, 190, 100, 0.22);
}

.sq-holiday-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(14, 24, 38, 0.88);
  border: 1px solid rgba(255, 200, 108, 0.28);
}

.sq-holiday-exchange-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 22px;
  border-radius: 6px;
  font-family: "Exo 2", sans-serif;
  font-weight: 700;
  font-size: calc(13px * var(--sq-font-scale, 1));
  letter-spacing: 0.4px;
  color: #200a0e;
  background: linear-gradient(120deg, #ffd66b, #ff9966 48%, #ffe799);
  border: 1px solid #fff0be;
  box-shadow: 0 4px 20px rgba(255, 174, 86, 0.35);
}

.sq-holiday-exchange-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 26px rgba(255, 186, 92, 0.55);
  color: #200a0e;
}

.sq-holiday-exchange-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sq-holiday-note {
  font-size: calc(12px * var(--sq-font-scale, 1));
  color: #b7c9d9;
  line-height: 1.45;
}

.sq-holiday-note.warn {
  color: #ffd38c;
}

/* 4. Поздравительный экран с конфетти */
.sq-holiday-congrats-shade {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(4, 9, 17, 0.82);
  backdrop-filter: blur(6px);
}

.sq-holiday-congrats-modal {
  position: relative;
  overflow: hidden;
  width: min(560px, 100%);
  padding: 26px 24px 22px;
  border-radius: 12px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 206, 98, 0.25), transparent 55%),
    linear-gradient(160deg, #27101c, #0f1b2d);
  border: 1px solid rgba(255, 214, 122, 0.65);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.65), 0 0 42px rgba(255, 92, 114, 0.25);
  animation: sq-ny-pop-in 0.36s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

@keyframes sq-ny-pop-in {
  from { opacity: 0; transform: scale(0.88) translateY(14px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.sq-holiday-confetti-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.sq-holiday-confetti-piece {
  position: absolute;
  top: -12px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  opacity: 0.92;
  animation: sq-ny-confetti-fall var(--dur, 3.2s) linear infinite;
  animation-delay: var(--del, 0s);
}

@keyframes sq-ny-confetti-fall {
  0% { transform: translateY(-14px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(440px) rotate(520deg); opacity: 0.15; }
}

.sq-holiday-congrats-modal h3 {
  position: relative;
  font-size: calc(22px * var(--sq-font-scale, 1));
  color: #ffe9aa;
  margin-bottom: 8px;
}

.sq-holiday-congrats-modal p {
  position: relative;
  color: #d6e2ee;
  font-size: calc(13px * var(--sq-font-scale, 1));
  line-height: 1.5;
  margin-bottom: 16px;
}

.sq-holiday-congrats-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  margin-bottom: 18px;
}

.sq-holiday-congrats-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 7px;
  background: rgba(8, 15, 25, 0.72);
  border: 1px solid rgba(255, 210, 118, 0.3);
}

.sq-holiday-congrats-item img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

/* 5. Карточка выпавшего украшения в окне трофеев */
.sq-salvage-holiday-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  margin-top: 8px;
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(64, 20, 35, 0.85), rgba(14, 26, 40, 0.94));
  border: 1px solid rgba(255, 204, 104, 0.56);
  box-shadow: 0 4px 16px rgba(255, 92, 118, 0.2);
}

.sq-salvage-holiday-card img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}

.sq-salvage-holiday-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.sq-salvage-holiday-copy small {
  font-family: "Exo 2", sans-serif;
  font-size: calc(10px * var(--sq-font-scale, 1));
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffd37a;
}

.sq-salvage-holiday-copy strong {
  font-size: calc(14px * var(--sq-font-scale, 1));
  color: #fff3da;
}

.sq-salvage-holiday-copy span {
  font-size: calc(11px * var(--sq-font-scale, 1));
  color: #b7f5cc;
}

/* 6. Админка — вкладка «Ивенты» */
.sq-admin-events-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sq-admin-events-card {
  padding: 18px;
  border-radius: 8px;
  background: rgba(12, 22, 35, 0.92);
  border: 1px solid rgba(135, 183, 206, 0.22);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sq-admin-events-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sq-admin-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.sq-admin-events-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: calc(12px * var(--sq-font-scale, 1));
  color: #a9c0d1;
}

.sq-admin-events-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.sq-admin-events-stat {
  padding: 12px;
  border-radius: 6px;
  background: rgba(8, 15, 25, 0.8);
  border: 1px solid rgba(135, 183, 206, 0.16);
}

.sq-admin-events-stat b {
  display: block;
  font-size: calc(20px * var(--sq-font-scale, 1));
  color: #8de6de;
  margin-top: 4px;
}
