@import url("https://cipr.ru/expo/wp-content/uploads/fonts2/font-NeueMachina-init.css");

:root {
  --cipr-green: #78e150;
  --cipr-black: #09080c;
  --cipr-white: #ffffff;
  --steel-gray: #bfc5cc;
  --dark-gray: #3b3b3b;
  --soft-gray: #edf1f4;
  --green-glow: rgba(120, 225, 80, 0.56);
  --button-shadow: 0 12px 26px rgba(9, 8, 12, 0.14), 0 0 18px rgba(120, 225, 80, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cipr-white);
  color: var(--cipr-black);
  font-family: "NeueMachina", "Neue Machina", Arial, Helvetica, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--cipr-black);
  text-decoration-color: var(--cipr-green);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(20px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(191, 197, 204, 0.7);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 32px rgba(9, 8, 12, 0.06);
}

.brand,
.top-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  color: var(--cipr-black);
  font-weight: 700;
  text-transform: uppercase;
}

.brand-mark {
  width: 16px;
  height: 16px;
  background: var(--cipr-green);
  display: inline-block;
}

.nav-button,
.secondary-button {
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--steel-gray);
  border-radius: 8px;
  background: var(--cipr-white);
  color: var(--dark-gray);
  box-shadow: var(--button-shadow);
  font-weight: 500;
  transition: transform 160ms ease, box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
}

.nav-button.active,
.secondary-button:hover {
  border-color: var(--cipr-green);
  color: var(--cipr-black);
  box-shadow: 0 14px 30px rgba(9, 8, 12, 0.15), 0 0 24px var(--green-glow);
}

.nav-button:active,
.secondary-button:active,
.primary-button:active,
.vote-button:active {
  transform: translateY(2px) scale(0.985);
  box-shadow: 0 6px 14px rgba(9, 8, 12, 0.13), 0 0 12px rgba(120, 225, 80, 0.25);
}

main {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 72px) 72px;
}

.hero {
  padding: clamp(42px, 7vw, 92px) 0 clamp(26px, 4vw, 54px);
}

.hero.compact {
  padding-bottom: 32px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--dark-gray);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 1120px;
  margin-bottom: 0;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 0 30px rgba(120, 225, 80, 0.22);
}

h2 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
}

.page-section {
  display: none;
}

.page-section.active {
  display: block;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.section-head h2 {
  margin-bottom: 0;
}

.search-panel {
  display: grid;
  gap: 10px;
  width: min(720px, 100%);
  margin: 0 0 34px;
}

.search-panel label {
  margin: 0;
  color: var(--dark-gray);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
}

.search-panel input {
  min-height: 62px;
  border: 1px solid rgba(191, 197, 204, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 34px rgba(9, 8, 12, 0.08);
  color: var(--cipr-black);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.search-panel input:focus {
  border-color: var(--cipr-green);
  box-shadow: 0 16px 34px rgba(9, 8, 12, 0.1), 0 0 0 3px rgba(120, 225, 80, 0.24);
}

.scale-label {
  color: var(--dark-gray);
  font-weight: 700;
}

.stands-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
}

.stand-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(191, 197, 204, 0.55);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 22px 44px rgba(9, 8, 12, 0.08);
  backdrop-filter: blur(12px);
}

.flip-shell {
  height: 420px;
  perspective: 1200px;
}

.photo-button {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 1px solid rgba(191, 197, 204, 0.78);
  border-radius: 8px;
  background: var(--cipr-white);
  box-shadow: 0 18px 34px rgba(9, 8, 12, 0.12);
  transform-style: preserve-3d;
  transition: transform 400ms ease, box-shadow 240ms ease;
}

.photo-button:hover {
  box-shadow: 0 22px 42px rgba(9, 8, 12, 0.15);
}

.stand-card.flipped .photo-button {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  display: flex;
  overflow: hidden;
  border-radius: 8px;
  backface-visibility: hidden;
}

.front-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.front-face .image-placeholder {
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 8px;
}

.back-face {
  flex-direction: column;
  gap: 16px;
  justify-content: flex-start;
  padding: 34px;
  color: var(--cipr-black);
  background:
    linear-gradient(145deg, rgba(120, 225, 80, 0.12), rgba(255, 255, 255, 0.92) 42%),
    var(--cipr-white);
  border: 1px solid rgba(191, 197, 204, 0.78);
  box-shadow: inset 0 0 36px rgba(120, 225, 80, 0.2);
  transform: rotateY(180deg);
  text-align: left;
}

.about-label {
  color: var(--dark-gray);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.about-text {
  max-height: 285px;
  overflow: hidden;
  color: var(--cipr-black);
  line-height: 1.45;
}

.stand-card-footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding-top: 18px;
}

.stand-card h3 {
  min-height: 56px;
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.15;
}

.vote-button,
.primary-button {
  position: relative;
  overflow: hidden;
  min-height: 56px;
  padding: 0 24px;
  border: 1px solid var(--cipr-green);
  border-radius: 8px;
  background: var(--cipr-green);
  color: var(--cipr-white);
  box-shadow: 0 12px 26px rgba(9, 8, 12, 0.18), 0 0 20px rgba(120, 225, 80, 0.46);
  font-weight: 500;
  text-transform: uppercase;
  transition: transform 160ms ease, box-shadow 320ms ease, opacity 320ms ease, background 240ms ease, border-color 240ms ease;
}

.vote-button::before,
.vote-button::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.vote-button::before {
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  opacity: 0;
  transform: translateY(-120%);
}

.vote-button::after {
  left: 50%;
  bottom: -120%;
  width: 20%;
  height: 220%;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(120, 225, 80, 0.95), rgba(255, 255, 255, 0.75), transparent);
  filter: blur(8px);
  opacity: 0;
  transform: translateX(-50%);
}

.vote-button.sending,
.vote-button.cooldown {
  border-color: var(--steel-gray);
  background: #9fa7af;
  color: var(--cipr-white);
  box-shadow: 0 10px 22px rgba(9, 8, 12, 0.16);
}

.vote-button.sending {
  box-shadow: 0 0 0 2px rgba(120, 225, 80, 0.42), 0 0 46px rgba(120, 225, 80, 0.72), 0 14px 30px rgba(9, 8, 12, 0.18);
}

.vote-button.sending::before {
  animation: button-scan 900ms ease forwards;
  opacity: 1;
}

.vote-button.sending::after {
  animation: vote-beam 1100ms ease-out forwards;
}

.vote-button:disabled {
  cursor: wait;
  opacity: 1;
}

@keyframes button-scan {
  0% {
    transform: translateY(-120%);
  }
  100% {
    transform: translateY(120%);
  }
}

@keyframes vote-beam {
  0% {
    bottom: -120%;
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    bottom: 110%;
    opacity: 0;
  }
}

.rating-list {
  display: grid;
  gap: 14px;
}

.rating-row,
.admin-row {
  display: grid;
  grid-template-columns: 52px 124px 1fr;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(191, 197, 204, 0.7);
}

.rating-place {
  color: var(--dark-gray);
  font-size: 24px;
  font-weight: 800;
}

.rating-row img,
.admin-row img {
  width: 124px;
  height: 82px;
  object-fit: cover;
  border: 1px solid rgba(191, 197, 204, 0.78);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(9, 8, 12, 0.1);
}

.rating-title-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}

.rating-title-line h3,
.admin-row h3 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.15;
}

.rating-title-line strong {
  color: var(--cipr-black);
  font-size: 26px;
}

.rating-bar {
  height: 16px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--soft-gray);
  box-shadow: inset 0 0 0 1px rgba(191, 197, 204, 0.55);
}

.rating-bar span {
  display: block;
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--cipr-green), #ffffff 52%, var(--cipr-green));
  box-shadow: 0 0 20px var(--cipr-green), 0 0 34px rgba(120, 225, 80, 0.68);
}

.empty-state {
  padding: 32px 0;
  color: var(--dark-gray);
  font-weight: 700;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-panel,
.admin-form {
  width: min(480px, 100%);
  padding: 32px;
  border: 1px solid var(--steel-gray);
  border-radius: 8px;
  background: var(--cipr-white);
}

.login-panel h1,
.admin-form h2 {
  margin-bottom: 24px;
  font-size: 34px;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--dark-gray);
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--steel-gray);
  border-radius: 8px;
  padding: 14px;
  background: var(--cipr-white);
  color: var(--cipr-black);
}

textarea {
  resize: vertical;
}

.form-error {
  padding: 14px;
  border: 1px solid var(--cipr-green);
  border-radius: 8px;
  color: var(--cipr-black);
  font-weight: 700;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 34px;
}

.admin-tab-button {
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid rgba(191, 197, 204, 0.85);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--button-shadow);
  color: var(--dark-gray);
  font-weight: 500;
  transition: transform 160ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.admin-tab-button.active {
  border-color: var(--cipr-green);
  color: var(--cipr-black);
  box-shadow: 0 14px 30px rgba(9, 8, 12, 0.15), 0 0 24px rgba(120, 225, 80, 0.34);
}

.admin-tab-button:active {
  transform: translateY(2px) scale(0.985);
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.active {
  display: block;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 40px;
  align-items: start;
}

.admin-rating {
  min-width: 0;
}

.admin-row {
  grid-template-columns: 96px 1fr auto;
}

.admin-row img {
  width: 96px;
  height: 64px;
}

.admin-row p {
  margin-bottom: 10px;
  color: var(--dark-gray);
  font-weight: 700;
}

.admin-form.standalone {
  width: min(620px, 100%);
}

.edit-stands-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.edit-stand-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid rgba(191, 197, 204, 0.7);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 22px 44px rgba(9, 8, 12, 0.08);
}

.edit-preview,
.image-placeholder {
  width: 100%;
  height: 220px;
  margin-bottom: 18px;
  border: 1px solid rgba(191, 197, 204, 0.78);
  border-radius: 8px;
}

.edit-preview {
  object-fit: cover;
}

.image-placeholder {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 16%, rgba(120, 225, 80, 0.34), rgba(255, 255, 255, 0) 24%),
    radial-gradient(circle at 84% 82%, rgba(191, 197, 204, 0.5), rgba(255, 255, 255, 0) 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(237, 241, 244, 0.94));
  color: var(--dark-gray);
  text-align: center;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.84),
    inset 0 -28px 56px rgba(191, 197, 204, 0.2),
    0 18px 38px rgba(9, 8, 12, 0.08);
}

.image-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(191, 197, 204, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(191, 197, 204, 0.22) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, #09080c, transparent 72%);
}

.image-placeholder::after {
  content: "";
  position: absolute;
  inset: auto -18% 16% -18%;
  z-index: -1;
  height: 42px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(120, 225, 80, 0.52), rgba(255, 255, 255, 0));
  filter: blur(10px);
  transform: rotate(-8deg);
}

.placeholder-frame {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 1px solid rgba(120, 225, 80, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(237, 241, 244, 0.88));
  box-shadow:
    0 0 28px rgba(120, 225, 80, 0.28),
    0 16px 28px rgba(9, 8, 12, 0.1);
}

.placeholder-monogram {
  color: var(--cipr-black);
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.placeholder-caption {
  display: grid;
  gap: 4px;
  color: var(--dark-gray);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.placeholder-caption strong {
  color: var(--cipr-black);
  font-size: 14px;
  font-weight: 800;
}

.placeholder-caption span {
  font-weight: 500;
}

.image-placeholder.small {
  width: 124px;
  height: 82px;
  margin: 0;
  gap: 0;
  box-shadow: 0 10px 22px rgba(9, 8, 12, 0.08);
}

.image-placeholder.small .placeholder-frame {
  width: 44px;
  height: 44px;
}

.image-placeholder.small .placeholder-monogram {
  font-size: 18px;
}

.image-placeholder.small .placeholder-caption {
  display: none;
}

@media (max-width: 860px) {
  .site-header,
  .section-head,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .site-header,
  .section-head {
    align-items: stretch;
  }

  .site-header {
    display: grid;
  }

  .top-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .rating-row {
    grid-template-columns: 38px 92px 1fr;
    gap: 12px;
  }

  .rating-row img {
    width: 92px;
    height: 66px;
  }

  .edit-stands-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  main {
    padding-inline: 16px;
  }

  .site-header {
    padding-inline: 16px;
  }

  h1 {
    font-size: 40px;
  }

  .flip-shell {
    height: 360px;
  }

  .stands-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .rating-row,
  .admin-row {
    grid-template-columns: 1fr;
  }

  .rating-place {
    display: none;
  }

  .rating-row img,
  .admin-row img {
    width: 100%;
    height: 180px;
  }
}

@media (pointer: coarse) {
  .nav-button,
  .vote-button,
  .primary-button,
  .secondary-button {
    min-height: 64px;
  }

  .flip-shell {
    height: 440px;
  }
}
