@font-face {
  font-family: "Ruslan Display";
  src: url("fonts/RuslanDisplay.ttf");
}

:root {
  --bg-main: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --surface-overlay: rgba(255, 255, 255, 0.6);
  --text-main: #111111;
  --text-muted: #6b6b6b;
  --border: #e5e7eb;
  --border-soft: #f2f4f6;
  --accent: #2b6cff;
  --accent-strong: #ff3b30;
  --success: #22c55e;
}

body.theme-dark {
  --bg-main: #111111;
  --surface: #111111;
  --surface-soft: #3B3B3B;
  --surface-overlay: rgba(17, 17, 17, 0.6);
  --text-main: #f3f5f7;
  --text-muted: #6B6B6B;
  --border: #3B3B3B;
  --border-soft: #3B3B3B;
  --accent: #2B6CFF;
  --accent-strong: #ff5a50;
  --success: #4ade80;
}

html {
  height: 100%;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  background: var(--bg-main);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

button,
a,
input,
textarea,
select {
  font: inherit;
}

.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

.page {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 190px 0 96px;
}

.site-header {
  display: flex;
  align-items: center;
  padding: 16px 0 64px;
}

.site-title {
  display: flex;
  align-items: center;
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 40px;
  line-height: 32px;
  color: var(--accent-strong);
}

.news-section {
  margin-bottom: 64px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.news-card {
  display: flex;
  flex-direction: column;
  min-height: 373px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.news-card__image {
  position: relative;
  width: 100%;
  height: 192px;
  background-color: var(--surface-soft);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.news-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.2);
}

body.theme-dark .news-card__overlay {
  background: rgba(0, 0, 0, 0.16);
}

.news-card__content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 20px;
  background: var(--surface-overlay);
  -webkit-backdrop-filter: blur(4px) brightness(100%);
  backdrop-filter: blur(4px) brightness(100%);
}

.news-card__title {
  margin: 0;
  min-height: 48px;
  font-family: "Segoe UI", sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  color: var(--text-main);
}

.news-card__text {
  margin: 0;
  min-height: 40px;
  font-family: "Segoe UI", sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-muted);
}

.news-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.news-card__date {
  display: flex;
  align-items: center;
  font-family: "Segoe UI", sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-muted);
}

.news-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 33554400px;
  background: var(--accent);
  color: #ffffff;
  font-family: "Segoe UI", sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
}

.offers-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.rating-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.rating-title {
  display: flex;
  align-items: center;
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 30px;
  line-height: 36px;
  color: var(--text-main);
}

.rating-action {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-family: "Segoe UI", sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  cursor: pointer;
}

.rating-action__arrow {
  font-size: 20px;
  line-height: 1;
}

.offers {
  width: 100%;
}

.offers__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.card-offer,
.skeleton-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.card-offer {
  cursor: pointer;
}

.card-offer__row {
  display: grid;
  grid-template-columns: max-content minmax(320px, 1fr) max-content;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.card-offer__lead {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
  width: max-content;
}

.card-offer__meta {
  display: grid;
  grid-template-columns: 32px 177px;
  align-items: center;
  gap: 24px;
  min-width: 0;
  flex: 0 0 auto;
}

.card-offer__pos {
  display: flex;
  align-items: center;
  min-width: 32px;
  font-family: "Segoe UI", sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 24px;
  line-height: 32px;
  color: var(--text-muted);
}

.card-offer__logo {
  display: flex;
  align-items: center;
  width: 177px;
  min-width: 177px;
  height: 48px;
  overflow: hidden;
}

.card-offer__logo img {
  display: block;
  max-width: 100%;
  max-height: 48px;
  object-fit: contain;
}

.card-offer__rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}

.card-offer__stars {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 136px;
  height: 24px;
}

.card-offer__stars-base,
.card-offer__stars-fill {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  white-space: nowrap;
}

.card-offer__stars-base {
  color: #e5e5e5;
}

.card-offer__stars-fill {
  color: #ffa500;
}

.card-offer__stars .star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.card-offer__stars .star-icon {
  display: block;
  width: 24px;
  height: 24px;
}

.card-offer__rating-value {
  display: flex;
  align-items: center;
  font-family: "Segoe UI", sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 20px;
  line-height: 28px;
  color: var(--text-main);
}

.card-offer__bonus-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  width: 100%;
  justify-self: stretch;
  text-align: center;
  padding: 0 16px;
}

.card-offer__bonus {
  display: block;
  width: 100%;
  font-family: "Segoe UI", sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  color: var(--text-main);
  white-space: normal;
  max-width: 100%;
  text-align: center;
}

.card-offer__period {
  display: flex;
  align-items: center;
  font-family: "Segoe UI", sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-muted);
  justify-content: center;
}

.card-offer__actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
}

.card-offer__btn {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 12px 32px;
  border-radius: 10px;
  cursor: pointer;
  font-family: "Segoe UI", sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
}

.card-offer__btn {
  position: relative;
  min-width: 131px;
  background: var(--accent);
  color: #ffffff;
  overflow: hidden;
}

.card-offer__divider {
  width: 100%;
  height: 1px;
  background: var(--border-soft);
}

.card-offer__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-offer__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: "Segoe UI", sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-main);
}

.card-offer__badge svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: var(--success);
}

.card-offer__btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -70%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.7) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-18deg);
  animation: shine 2.8s ease-in-out infinite;
}

.skeleton-card {
  min-height: 176px;
}

.skeleton-card__row {
  display: grid;
  grid-template-columns: max-content minmax(320px, 1fr) max-content;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.skeleton-card__lead {
  display: flex;
  align-items: center;
  gap: 24px;
}

.skeleton-card__meta {
  display: grid;
  grid-template-columns: 32px 177px;
  align-items: center;
  gap: 24px;
}

.skeleton-card__rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.skeleton-card__bonus-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0 16px;
}

.skeleton-card__actions {
  display: inline-flex;
  justify-self: end;
}

.skeleton-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skeleton-box {
  position: relative;
  overflow: hidden;
  background: var(--surface-soft);
  border-radius: 8px;
}

.skeleton-box--pos {
  width: 24px;
  height: 28px;
}

.skeleton-box--logo {
  width: 177px;
  height: 48px;
  border-radius: 12px;
}

.skeleton-box--stars {
  width: 136px;
  height: 24px;
}

.skeleton-box--score {
  width: 32px;
  height: 28px;
}

.skeleton-box--bonus {
  width: min(100%, 320px);
  height: 24px;
}

.skeleton-box--period {
  width: min(100%, 180px);
  height: 20px;
}

.skeleton-box--button {
  width: 131px;
  height: 48px;
  border-radius: 10px;
}

.skeleton-box--badge {
  width: 144px;
  height: 38px;
  border-radius: 10px;
}

.skeleton-box--badge-wide {
  width: 190px;
}

.skeleton-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-100%);
  animation: shimmer 1.5s infinite;
}

.site-footer {
  padding: 48px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer__copy,
.site-footer__notice,
.site-footer__text {
  color: var(--text-muted);
}

.empty-state {
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(2, 12, 27, 0.7);
}

.modal-window {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: calc(100vh - 48px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 16px;
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.modal-body {
  flex: 1;
  overflow: auto;
}

.modal-iframe {
  width: 100%;
  height: 70vh;
  border: none;
  display: block;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  cursor: pointer;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

@keyframes shine {
  100% {
    left: 120%;
  }
}

@media (max-width: 1440px) {
  .container {
    max-width: 1392px;
  }
}

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

  .card-offer__row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card-offer__lead {
    flex-wrap: wrap;
  }

  .card-offer__meta {
    grid-template-columns: 32px 177px;
  }

  .card-offer__actions {
    justify-content: flex-start;
    justify-self: start;
  }

  .skeleton-card__row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .skeleton-card__lead {
    flex-wrap: wrap;
  }

  .skeleton-card__actions {
    justify-self: start;
  }

  .skeleton-card__bonus-wrap {
    align-items: flex-start;
    padding: 0;
  }

  .card-offer__bonus-wrap {
    align-items: flex-start;
    text-align: left;
    padding: 0;
  }

  .card-offer__bonus,
  .card-offer__period {
    text-align: left;
    justify-content: flex-start;
  }

  .card-offer__bonus {
    white-space: normal;
  }
}

@media (max-width: 900px) {
  .page {
    padding: 80px 0 56px;
  }

  .site-header {
    padding-bottom: 32px;
  }

  .news-section {
    margin-bottom: 40px;
  }

  .rating-header {
    flex-wrap: wrap;
  }
}

@media (max-width: 840px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .site-title {
    font-size: 32px;
    line-height: 32px;
  }

  .rating-title {
    font-size: 26px;
    line-height: 32px;
  }

  .card-offer,
  .skeleton-card {
    padding: 20px;
  }

  .card-offer__lead,
  .card-offer__meta {
    gap: 16px;
  }

  .card-offer__logo {
    width: 140px;
    min-width: 140px;
    height: 38px;
  }

  .card-offer__meta {
    grid-template-columns: 32px 140px;
  }

  .card-offer__actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .skeleton-card__meta {
    grid-template-columns: 32px 140px;
    gap: 16px;
  }

  .skeleton-box--logo {
    width: 140px;
    height: 38px;
  }

  .skeleton-card__actions,
  .skeleton-box--button {
    width: 100%;
  }

  .card-offer__btn {
    width: 100%;
  }
}
