﻿.rust-side {
  display: none;
}

body.theme-rust {
  --bg-1: #180f0a;
  --bg-2: #2a1a11;
  --panel: rgba(37, 22, 14, 0.9);
  --panel-border: rgba(214, 129, 72, 0.36);
  --text: #f3e6d8;
  --muted: #ccb7a1;
  --accent: #ff9348;
  --accent-2: #d8b07a;
  --danger: #ff6f63;
  --shadow: 0 24px 42px rgba(0, 0, 0, 0.45);
  --side-rail-width: clamp(280px, 24vw, 440px);
  --side-rail-gap: clamp(8px, 0.9vw, 16px);

  background-color: #170f0b;
  background-image: url("assets/theme-rust/wall_tile.png");
  background-repeat: repeat;
  background-size: 420px 420px;
  background-attachment: fixed;
}

body.theme-rust .ambient {
  display: none;
}

body.theme-rust::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(14, 8, 5, 0.16), rgba(10, 6, 4, 0.34)),
    radial-gradient(circle at 50% -5%, rgba(255, 170, 100, 0.1), transparent 35%);
}

body.theme-rust .hero,
body.theme-rust .layout,
body.theme-rust .license-layout {
  position: relative;
  z-index: 2;
  max-width: min(
    1120px,
    calc(100vw - (var(--side-rail-width) * 2) - (var(--side-rail-gap) * 2) - 44px)
  );
}

body.theme-rust .rust-side {
  display: block;
  position: fixed;
  top: 0;
  bottom: 0;
  width: var(--side-rail-width);
  z-index: 1;
  pointer-events: none;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.theme-rust .rust-side-left {
  left: var(--side-rail-gap);
}

body.theme-rust .rust-side-right {
  right: var(--side-rail-gap);
}

body.theme-rust .rust-side::after {
  content: none;
}

body.theme-rust .rust-side-gif,
body.theme-rust .rust-side-video {
  width: auto;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center center;
  filter: brightness(1.08) contrast(1.06) saturate(1.04);
  opacity: 1;
  transform-origin: center center;
}

body.theme-rust .rust-side-left .rust-side-gif {
  transform: translateX(20%) scale(1.6);
  clip-path: inset(0 0 16% 0);
}

body.theme-rust .rust-side-right .rust-side-gif {
  transform: translateX(-20%) scale(0.8);
}

body.theme-rust .hero-topline {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.75rem;
  letter-spacing: 0.14em;
  color: #ffbe84;
  text-shadow: 0 0 16px rgba(255, 137, 57, 0.22);
}

body.theme-rust h1,
body.theme-rust h2,
body.theme-rust .plugin-title,
body.theme-rust .plugin-modal-title {
  font-family: "Bebas Neue", sans-serif;
  font-weight: 400;
  letter-spacing: 0.03em;
}

body.theme-rust h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1;
}

body.theme-rust .hero-subtitle {
  max-width: 760px;
  color: #d9c8b5;
}

body.theme-rust .theme-toggle {
  border-color: rgba(255, 170, 104, 0.45);
  background: linear-gradient(150deg, rgba(85, 42, 18, 0.9), rgba(124, 60, 28, 0.9));
  color: #fbe7cf;
}

body.theme-rust .theme-toggle:hover {
  border-color: rgba(255, 164, 95, 0.88);
  background: linear-gradient(150deg, rgba(104, 49, 19, 0.95), rgba(152, 70, 29, 0.95));
}

body.theme-rust .card {
  background:
    linear-gradient(165deg, rgba(55, 33, 20, 0.9), rgba(29, 18, 11, 0.88)),
    var(--panel);
  border-color: rgba(213, 127, 70, 0.34);
}

body.theme-rust .policy-box,
body.theme-rust .plugin-card,
body.theme-rust .cart-row,
body.theme-rust .plugin-image-wrap,
body.theme-rust .plugin-modal-main-image-wrap,
body.theme-rust .plugin-modal-thumb,
body.theme-rust .order-lines-note,
body.theme-rust .payment-comment {
  background: rgba(24, 14, 9, 0.72);
  border-color: rgba(214, 129, 72, 0.35);
}

body.theme-rust .plugin-card:hover {
  border-color: rgba(255, 160, 88, 0.78);
  background: rgba(34, 20, 12, 0.9);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4);
}

body.theme-rust .plugin-tag {
  color: #ffb270;
}

body.theme-rust .plugin-open-hint {
  color: #ffd0a4;
}

body.theme-rust .btn-primary {
  color: #2d1408;
  background: linear-gradient(160deg, #ffb268, #ff8332);
}

body.theme-rust .btn-ghost {
  background: rgba(22, 13, 8, 0.65);
  border-color: rgba(214, 129, 72, 0.42);
}

body.theme-rust .btn-brand {
  border-color: rgba(238, 147, 85, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.theme-rust input,
body.theme-rust textarea,
body.theme-rust select,
body.theme-rust .plan-select {
  border-color: rgba(226, 138, 78, 0.38);
  background: rgba(17, 10, 7, 0.82);
}

body.theme-rust input:focus,
body.theme-rust textarea:focus,
body.theme-rust select:focus,
body.theme-rust .plan-select:focus {
  border-color: #ff9e5a;
  box-shadow: 0 0 0 1px rgba(255, 158, 90, 0.32);
}

body.theme-rust .license-inline-link,
body.theme-rust .contacts a,
body.theme-rust .plugin-modal-links a,
body.theme-rust .policy-list a {
  color: #ffc287;
}

body.theme-rust .brand-logo {
  background: rgba(255, 255, 255, 0.08);
}

body.theme-rust .hint,
body.theme-rust .small-note,
body.theme-rust .plugin-desc,
body.theme-rust .order-lines-note,
body.theme-rust .payment-comment-label,
body.theme-rust .catalog-page-info {
  color: var(--muted);
}

body.theme-rust .reveal {
  animation: rise-rust 560ms cubic-bezier(0.21, 0.89, 0.34, 1) both;
}

@keyframes rise-rust {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1200px) {
  body.theme-rust {
    --side-rail-width: clamp(220px, 20vw, 320px);
  }

  body.theme-rust .rust-side-left .rust-side-gif {
    transform: translateX(18%) scale(1.6);
    clip-path: inset(0 0 16% 0);
  }

  body.theme-rust .rust-side-right .rust-side-gif {
    transform: translateX(-18%) scale(0.8);
  }
}

@media (max-width: 980px) {
  body.theme-rust h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  body.theme-rust .rust-side {
    display: none;
  }

  body.theme-rust .hero,
  body.theme-rust .layout,
  body.theme-rust .license-layout {
    max-width: 1120px;
  }
}
