:root {
  --bg-1: #130709;
  --bg-2: #22070d;
  --panel: rgba(27, 7, 11, 0.72);
  --panel-strong: rgba(38, 11, 16, 0.92);
  --border: rgba(255, 121, 149, 0.28);
  --shadow: rgba(153, 16, 37, 0.55);
  --glow: rgba(255, 91, 119, 0.8);
  --red-strong: #ff5c7f;
  --red-soft: #ff9cb1;
  --red-deep: #8d0b27;
  --red-mid: #c61d3f;
  --text: #f9ebee;
  --muted: #d0a6ae;
  --success: #62d6a9;
  --warn: #f7c56b;
  --danger: #ff4d6d;
  --page-max: 1360px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top, rgba(179, 24, 57, 0.28), transparent 32%),
    radial-gradient(circle at bottom right, rgba(255, 133, 158, 0.12), transparent 24%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  color: var(--text);
  overflow-x: hidden;
  cursor: none;
}

button,
input,
select,
a {
  font: inherit;
  cursor: none;
}

button {
  cursor: none;
  text-align: center;
}

.custom-cursor {
  --cursor-scale: 1;
  --cursor-rotation: 0deg;
  position: fixed;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  color: #f04463;
  font-size: 30px;
  line-height: 30px;
  text-align: center;
  pointer-events: none;
  z-index: 9999;
  will-change: left, top, transform;
  transform: translate(-50%, -50%) rotate(var(--cursor-rotation)) scale(var(--cursor-scale));
  transition: color 0.12s ease, text-shadow 0.12s ease;
}

.custom-cursor::before {
  content: "❤";
  position: absolute;
  inset: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  text-shadow: 0 0 8px rgba(255, 112, 62, 0.9), 0 0 18px rgba(255, 47, 86, 0.72);
}

.custom-cursor::after {
  display: none;
}

.cursor-tip {
  display: none;
}

.custom-cursor.is-hovering {
  color: #ff6b83;
  text-shadow: 0 0 10px rgba(255, 168, 75, 0.9), 0 0 24px rgba(255, 82, 106, 0.75);
  --cursor-scale: 1.12;
}

.custom-cursor.is-clicking {
  animation: cursorVibrate 0.2s ease-in-out 3;
}

@keyframes cursorVibrate {
  0% { transform: translate(-50%, -50%) rotate(var(--cursor-rotation)) scale(var(--cursor-scale)) translateX(0); }
  20% { transform: translate(-50%, -50%) rotate(var(--cursor-rotation)) scale(var(--cursor-scale)) translateX(-2px) translateY(2px); }
  40% { transform: translate(-50%, -50%) rotate(var(--cursor-rotation)) scale(var(--cursor-scale)) translateX(2px) translateY(-2px); }
  60% { transform: translate(-50%, -50%) rotate(var(--cursor-rotation)) scale(var(--cursor-scale)) translateX(-1px) translateY(1px); }
  80% { transform: translate(-50%, -50%) rotate(var(--cursor-rotation)) scale(var(--cursor-scale)) translateX(1px) translateY(-1px); }
  100% { transform: translate(-50%, -50%) rotate(var(--cursor-rotation)) scale(var(--cursor-scale)) translateX(0); }
}

@media (max-width: 768px) {
  body {
    cursor: auto;
  }

  button,
  input,
  select,
  a {
    cursor: pointer;
  }

  .custom-cursor {
    display: none;
  }
}

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.ambient-1 {
  width: 460px;
  height: 460px;
  left: 8%;
  top: 8%;
  background: rgba(255, 85, 115, 0.18);
}

.ambient-2 {
  width: 420px;
  height: 420px;
  right: 10%;
  bottom: 4%;
  background: rgba(137, 12, 31, 0.22);
}

.floating-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.floating-hearts span {
  position: absolute;
  font-size: 1.3rem;
  color: rgba(255, 168, 183, 0.22);
  animation: floatHeart 15s ease-in-out infinite;
}

.floating-hearts span:nth-child(1) { left: 8%; top: 12%; animation-delay: 0.5s; }
.floating-hearts span:nth-child(2) { left: 22%; top: 62%; animation-delay: 2s; }
.floating-hearts span:nth-child(3) { right: 18%; top: 20%; animation-delay: 4s; }
.floating-hearts span:nth-child(4) { right: 26%; bottom: 22%; animation-delay: 1.2s; }
.floating-hearts span:nth-child(5) { left: 56%; bottom: 18%; animation-delay: 3.5s; }

@keyframes floatHeart {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.15; }
  50% { transform: translateY(-28px) scale(1.15); opacity: 0.4; }
}

.page-shell {
  position: relative;
  z-index: 1;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 32px 24px 100px;
}

.glass-panel {
  background: linear-gradient(180deg, rgba(30, 9, 15, 0.8), rgba(19, 9, 12, 0.72));
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hero {
  padding: 32px clamp(20px, 3vw, 42px);
  margin-bottom: 26px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 98, 126, 0.14), transparent 35%, rgba(255, 255, 255, 0.02));
  pointer-events: none;
}

.eyebrow {
  position: relative;
  z-index: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--red-soft);
  margin-bottom: 14px;
}

.brand-title {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 0.34em;
  row-gap: 0.16em;
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-family: "Urbanist", sans-serif;
  font-weight: 800;
  color: var(--text);
}

.title-prefix,
.title-main,
.title-heart {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  height: 1.08em;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  align-self: center;
  transform: translateY(0.02em);
  transform-origin: center;
  filter: drop-shadow(0 0 8px rgba(255, 98, 126, 0.6));
  flex: 0 0 auto;
}

.title-device-icon {
  width: 1em;
  height: 1em;
  flex: 0 0 1em;
  object-fit: contain;
  border-radius: 0.22em;
  filter: drop-shadow(0 0 9px rgba(255, 98, 126, 0.7));
}

.title-heart {
  font-size: 0.8em;
  transform: translateY(-4px);
  filter: drop-shadow(0 0 10px rgba(255, 108, 128, 0.7));
}

.hero-text {
  position: relative;
  z-index: 1;
  margin: 16px 0 0;
  max-width: 650px;
  color: var(--muted);
  font-size: 1.03rem;
}

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

.section-card {
  padding: 24px;
}

.setup-card {
  grid-column: span 6;
}

.intensity-card {
  grid-column: span 3;
}

.controls-card {
  grid-column: span 3;
}

.fun-rule-card,
.stats-card,
.history-card,
.settings-card,
.safety-card {
  grid-column: span 6;
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.section-header-row h2 {
  margin: 0;
  font-size: 1.4rem;
}

.mini-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.live-dot {
  color: var(--red-soft);
}

.game-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.game-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  border-radius: 18px;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.game-btn:hover,
.game-btn:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 122, 148, 0.7);
  box-shadow: 0 0 0 1px rgba(255, 134, 164, 0.4), 0 12px 24px rgba(214, 26, 56, 0.18);
}

.game-btn.active {
  background: linear-gradient(135deg, rgba(211, 39, 72, 0.34), rgba(255, 138, 161, 0.12));
  border-color: rgba(255, 133, 154, 0.9);
  box-shadow: inset 0 0 20px rgba(255, 96, 129, 0.12), 0 0 16px rgba(255, 92, 127, 0.12);
}

.game-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.safety-note {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-left: 3px solid rgba(255, 122, 153, 0.9);
  border-radius: 12px;
  background: rgba(255, 95, 118, 0.08);
  color: var(--muted);
  line-height: 1.5;
}

.safety-note.compact {
  margin-top: 12px;
  margin-bottom: 0;
}

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

.setup-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

input,
select {
  background: linear-gradient(135deg, rgba(107, 17, 36, 0.82), rgba(39, 10, 18, 0.92));
  border: 1px solid rgba(255, 185, 197, 0.2);
  border-radius: 12px;
  color: var(--text);
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select {
  appearance: none;
  text-align: center;
  text-align-last: center;
  font-weight: 700;
  color: #ffe8ed;
  background-image:
    linear-gradient(45deg, transparent 50%, #ff9caf 50%),
    linear-gradient(135deg, #ff9caf 50%, transparent 50%),
    linear-gradient(135deg, rgba(107, 17, 36, 0.82), rgba(39, 10, 18, 0.92));
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%, 0 0;
  background-size: 6px 6px, 6px 6px, 100% 100%;
  background-repeat: no-repeat;
}

select option {
  background: #2a0b14;
  color: #ffe8ed;
  text-align: center;
}

input:focus,
select:focus {
  border-color: rgba(255, 135, 162, 0.8);
  box-shadow: 0 0 0 3px rgba(255, 90, 125, 0.12);
}

.quick-range {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-badge {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 999px;
  color: var(--text);
  padding: 8px 12px;
  min-width: 54px;
  text-align: center;
  transition: all 0.2s ease;
}

.quick-badge.active {
  background: linear-gradient(135deg, rgba(210, 33, 75, 0.32), rgba(255, 128, 155, 0.1));
  border-color: rgba(255, 135, 162, 0.8);
  box-shadow: 0 0 12px rgba(255, 92, 127, 0.2);
}

.primary-btn,
.soft-btn,
.kill-btn,
.emergency-floating {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 16px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.primary-btn,
.soft-btn {
  padding: 12px 16px;
}

.primary-btn {
  background: linear-gradient(135deg, #ff5e7d, #c5173d);
  color: white;
  box-shadow: 0 16px 25px rgba(179, 20, 57, 0.32);
}

.primary-btn:hover,
.soft-btn:hover,
.kill-btn:hover,
.emergency-floating:hover {
  transform: translateY(-2px) scale(1.01);
}

.wide-btn {
  width: 100%;
  margin-top: 18px;
}

.gauge-shell {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 8px;
}

.gauge-ring {
  --gauge-angle: 0deg;
  width: min(250px, 84%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 0 auto;
  background: conic-gradient(from 270deg, var(--red-soft) 0deg, var(--red-mid) var(--gauge-angle), rgba(255,255,255,0.06) var(--gauge-angle), rgba(255,255,255,0.06) 360deg);
  border-radius: 50%;
  position: relative;
  box-shadow: inset 0 0 24px rgba(255, 121, 150, 0.12), 0 0 25px rgba(255, 75, 108, 0.18);
  transition: background 0.35s ease, box-shadow 0.35s ease, transform 0.2s ease;
}

.gauge-ring::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 155, 181, 0.2), rgba(12, 5, 8, 0.9) 60%);
  border: 1px solid rgba(255, 173, 190, 0.16);
}

.gauge-center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.gauge-value {
  font-size: clamp(2.4rem, 3vw, 3.8rem);
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 0 14px rgba(255, 111, 133, 0.5);
}

.gauge-scale {
  font-size: 0.82rem;
  color: var(--muted);
}

.intensity-feedback {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 18px;
  min-height: 1.6em;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--red-soft);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.range-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  width: 100%;
}

.range-text strong {
  color: var(--text);
  font-weight: 700;
}

.intensity-warning {
  display: none;
  position: fixed;
  inset: 50% auto auto 50%;
  z-index: 100;
  width: min(50vw, 720px);
  min-height: 30vh;
  transform: translate(-50%, -50%);
  padding: 42px 48px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(255, 196, 112, 0.82);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(53, 12, 20, 0.97), rgba(24, 7, 12, 0.98));
  color: #fff3d4;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58), 0 0 36px rgba(255, 82, 83, 0.48), inset 0 0 28px rgba(255, 169, 77, 0.12);
  text-align: center;
  cursor: none;
}

.intensity-warning.is-visible,
.intensity-warning.is-relocated {
  display: flex;
}

.intensity-warning.is-visible {
  animation: warningVibrateOverlay 0.13s ease-in-out infinite alternate;
}

.intensity-warning.is-relocated {
  position: relative;
  left: auto;
  top: auto;
  z-index: auto;
  width: 100%;
  min-height: 0;
  transform: none;
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  animation: warningVibrateCard 0.18s ease-in-out infinite alternate;
}

.intensity-warning.is-relocated span {
  display: none;
}

.intensity-warning strong {
  color: #ffd38a;
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  letter-spacing: 0.1em;
}

.intensity-warning span {
  color: #f7c9c5;
  font-size: 0.95rem;
}

@keyframes warningVibrateOverlay {
  0% { transform: translate(-50%, -50%) translateX(-3px); }
  100% { transform: translate(-50%, -50%) translateX(3px); }
}

@keyframes warningVibrateCard {
  0% { margin-left: -3px; }
  100% { margin-left: 3px; }
}

.timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
}

.kill-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.kill-btn {
  padding: 22px 16px;
  color: white;
  font-size: 1.1rem;
  min-height: 82px;
  flex-direction: column;
  gap: 3px;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 18px 30px rgba(0,0,0,0.18);
  text-shadow: 0 0 8px rgba(255,255,255,0.2);
}

.kill-player {
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.1;
}

.kill-action {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.88;
}

.kill-change {
  margin-top: 2px;
  font-size: 1rem;
  line-height: 1;
}

.his-btn {
  background: linear-gradient(135deg, rgba(30, 76, 126, 0.96), rgba(8, 28, 57, 0.98));
}

.my-btn {
  background: linear-gradient(135deg, rgba(156, 48, 87, 0.96), rgba(74, 14, 39, 0.98));
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.soft-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.soft-btn.danger {
  border-color: rgba(255, 122, 143, 0.48);
  color: #ffd9e0;
}

.manual-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.manual-row input {
  flex: 1;
}

.rule-box {
  padding: 18px 18px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.55;
}

.fun-rule-card .section-header-row {
  justify-content: flex-start;
  text-align: left;
}

.rule-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.accepted-rule-box {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 99, 122, 0.06);
  border: 1px solid rgba(255, 121, 148, 0.14);
  color: var(--muted);
  text-align: center;
}

.accepted-label {
  color: var(--red-soft);
  font-weight: 700;
}

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

.stat-item {
  padding: 16px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-item strong {
  font-size: clamp(1.3rem, 2vw, 2rem);
}

.stat-label {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.full-span {
  grid-column: 1 / -1;
}

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.history-list li {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

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

.safety-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.safety-list div {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted);
}

.emergency-floating {
  position: fixed;
  right: 30px;
  bottom: 26px;
  z-index: 50;
  padding: 16px 20px;
  background: linear-gradient(135deg, #ff5d6d, #d91d45);
  color: white;
  box-shadow: 0 20px 32px rgba(190, 18, 51, 0.35);
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255, 111, 133, 0)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 16px rgba(255, 111, 133, 0.9)); }
}

.pulse-heart-box {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 99, 128, 0.08);
  border: 1px solid rgba(255, 126, 155, 0.25);
  animation: pulseGlow 1.8s ease-in-out infinite;
}

.pulse-heart-box span {
  color: var(--red-soft);
}

.intensity-bump {
  animation: intensityPop 0.4s ease;
}

@keyframes intensityPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@media (max-width: 1024px) {
  .setup-card,
  .intensity-card,
  .controls-card,
  .fun-rule-card,
  .stats-card,
  .history-card,
  .settings-card,
  .safety-card {
    grid-column: span 12;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 18px 14px 100px;
  }

  .dashboard {
    gap: 16px;
  }

  .section-card {
    padding: 18px 16px;
  }

  .game-selector,
  .setup-grid,
  .settings-grid,
  .action-grid,
  .safety-list {
    grid-template-columns: 1fr;
  }

  .brand-title {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .brand-logo {
    max-width: 150px;
  }

  .emergency-floating {
    right: 14px;
    bottom: 14px;
    width: calc(100% - 28px);
    font-size: 1rem;
  }
}
