/* Цвета взяты из экспорта «Главный экран.svg» (node 15:152): фон #1C1C1C, жёлтый #FDB813, обводка блока #FFC53B, карточки #282828 / #353535 */

:root {
  --bg: #1c1c1c;
  --yellow: #fdb813;
  --yellow-frame: #ffc53b;
  --card: #282828;
  --card-stroke: #353535;
  --card-inner: #1c1c1c;
  --text-on-yellow: #1c1c1c;
  --text-muted: #a3a3a3;
  --text-white: #f5f5f5;
  --radius-xl: 28px;
  --radius-lg: 24px;
  --radius-md: 20px;
  --radius-pill: 27px;
  --font: "Manrope", "Montserrat", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  background: #0f0f0f;
  color: var(--text-white);
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.phone {
  max-width: 393px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* —— Status bar —— */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-on-yellow);
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.95;
}

/* —— Жёлтый фон 670px по Figma (node 15:279) —— */
.home-yellow-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 670px;
  background: #FDB813;
  border-radius: 0 0 40px 40px;
  overflow: hidden;
  z-index: 0;
}

.home-yellow-bg__mask {
  position: absolute;
  inset: 0;
  background: url('../assets/maskgroup-fill.svg') no-repeat center / cover;
  mix-blend-mode: plus-lighter;
  opacity: 0.6;
  pointer-events: none;
}

/* —— Header по Figma (130px зона) —— */
.home-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 75px 12px 5px;
  gap: 10px;
}

.home-header__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.home-header__right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(28, 28, 28, 0.15);
}

.user-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.user-welcome {
  font-size: 11px;
  font-weight: 500;
  color: rgba(28, 28, 28, 0.72);
  line-height: 1.2;
}

.user-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-on-yellow);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-circle {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--text-on-yellow);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.icon-bell {
  margin-top: -1px;
}

.icon-bell__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 30px;
  background: var(--yellow);
  color: #1c1c1c;
  font-size: 9px;
  font-weight: 800;
  line-height: 15px;
  text-align: center;
  box-sizing: border-box;
  z-index: 1;
}

.badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--text-on-yellow);
  color: var(--yellow);
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.chip-status {
  max-width: 180px;
  padding: 10px 14px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.98);
  color: #0e0e0e;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(25px);
}

.chip-status__time {
  font-weight: 500;
  color: #0e0e0e;
}

.chip-status__hall {
  font-weight: 500;
  color: rgba(14, 14, 14, 0.5);
}

/* —— Контент поверх жёлтого фона —— */
.home-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 8px 12px 0;
}

/* Карусель событий */
.events-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.events-carousel::-webkit-scrollbar {
  display: none;
}

.events-dots {
  display: flex;
  gap: 5px;
  margin-top: 10px;
}

.events-dots__dot {
  flex: 1;
  height: 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.2s ease;
}

.events-dots__dot.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 80%;
  height: 100%;
  background: #fff;
  border-radius: 10px;
}

/* Баннер турнира (Figma node 15:284) */
.home-event-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 100%;
  height: 205px;
  padding: 18px;
  border-radius: 29px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  scroll-snap-align: start;
  flex-shrink: 0;
}

.home-event-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  border-radius: 29px;
}

.home-event-card__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28, 28, 28, 0) 38.82%, #1C1C1C 100%);
  backdrop-filter: blur(7.5px);
  pointer-events: none;
}

.home-event-card__date {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 10px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(25px);
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  z-index: 1;
}

.home-event-card__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-event-card__title {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  line-height: 30px;
  color: #fff;
}

.home-event-card__desc {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 19px;
  color: #fff;
}

.home-event-card__link {
  color: var(--yellow);
  text-decoration: underline;
}

/* legacy dots внутри карточки — убраны в пользу .events-dots */

/* CTA wrap внизу */
.home-cta-wrap {
  position: relative;
  z-index: 1;
  padding: 10px 12px 8px;
  background: linear-gradient(180deg, rgba(21, 21, 21, 0) 0%, #151515 100%);
}

.cta-main--raised {
  margin-top: 0;
  box-shadow: 0 5px 10px rgba(253, 184, 19, 0.1);
}

/* Hero legacy (если остались в других экранах) */
.hero-card {
  margin-bottom: 18px;
}

.hero-card__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #111;
}

.hero-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-card__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.85) 100%);
  pointer-events: none;
}

.hero-card__date {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
}

.hero-card__copy {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 36px;
}

.hero-card__title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #fff;
}

.hero-card__desc {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.link-more {
  color: var(--yellow);
  font-weight: 700;
  text-decoration: none;
}

.link-more:hover {
  text-decoration: underline;
}

.hero-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  align-items: center;
}

.hero-dots span {
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dots span.is-active {
  background: #fff;
  width: 22px;
}

/* Быстрые функции (Figma node 15:302) */
.quick-panel {
  background: radial-gradient(111.38% 77.97% at 50% 0%, #282828 0%, #1C1C1C 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(7.5px);
  border-radius: 29px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-panel__title {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 27px;
  color: #fff;
}

.quick-panel__inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Карточка баланса (Figma node 15:306) */
.balance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  border-radius: 20px;
  background: radial-gradient(56.59% 100% at 50% 0%, #FFCC27 0%, #FDB813 100%);
  border: 1px solid #FFC53B;
  color: #1C1C1C;
  cursor: pointer;
}

.balance-card__text {
  display: flex;
  flex-direction: column;
}

.balance-card__label {
  font-size: 14px;
  font-weight: 400;
  color: #1C1C1C;
  opacity: 0.5;
  line-height: 19px;
}

.balance-card__value {
  font-size: 30px;
  font-weight: 800;
  line-height: 41px;
  color: #1C1C1C;
}

.balance-card__add {
  width: 57px;
  height: 57px;
  border-radius: 10px;
  border: 1px solid #272727;
  background: #1C1C1C;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.balance-card__add img {
  filter: brightness(10);
}

/* Карточка «Мои брони» (Figma node 15:314) */
.bookings-preview {
  padding: 10px 12px;
  border-radius: 20px;
  background: #282828;
  border: 1px solid #353535;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  overflow: hidden;
}

.bookings-preview__label {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  line-height: 19px;
}

.bookings-preview__value {
  font-size: 20px;
  font-weight: 500;
  line-height: 27px;
  color: #fff;
}

.last-club-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, #2a2520, #1e1c18);
  border: 1px solid var(--card-stroke);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.last-club-card__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.last-club-card__name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-white);
}

.last-club-card__addr,
.last-club-card__meta {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}

.last-club-card__cta {
  margin-top: 4px;
  align-self: flex-start;
  padding: 10px 18px;
  font-size: 14px;
}

.clubs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.clubs-list__item {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--card);
  border: 1px solid var(--card-stroke);
}

.clubs-list__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 6px;
}

.clubs-list__sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.quick-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pill-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 10px;
  border-radius: 58px;
  background: #282828;
  border: 1px solid #353535;
  color: #fff;
  font-size: 20px;
  font-weight: 400;
  text-decoration: none;
  overflow: hidden;
  transition: background 0.15s ease;
}

.pill-btn:hover {
  background: #323232;
}

.pill-btn__ico {
  width: 36px;
  height: 36px;
  border-radius: 120px;
  background: #1C1C1C;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}

.pill-btn__ico img {
  width: 24px;
  height: 24px;
}

/* CTA */
.cta-main {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  width: 100%;
  height: 77px;
  border-radius: 20px;
  background: radial-gradient(56.59% 100% at 50% 0%, #FFC722 0%, #FDB813 100%);
  color: #191919;
  font-family: var(--font);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 5px 10px rgba(253, 184, 19, 0.1);
  border: none;
  cursor: pointer;
}

.cta-main:hover {
  filter: brightness(1.03);
}

/* Нижняя навигация (Figma node 15-356) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 393px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 18px 40px 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
  background: #1c1c1c;
  border-top: 1px solid #151515;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.bottom-nav__item {
  color: #4b4b4b;
  display: grid;
  place-items: center;
  padding: 8px 16px;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.bottom-nav__item.is-active {
  color: #ffb801;
}

.bottom-nav__handle {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.home-indicator {
  display: none;
}

@media (min-width: 394px) {
  .phone {
    min-height: 852px;
    margin-top: 12px;
    margin-bottom: 12px;
    border-radius: 48px;
    overflow: hidden;
  }

  .bottom-nav {
    max-width: 393px;
    border-radius: 0 0 48px 48px;
  }
}
