/* ============================================
   像素风视觉小说 - 《且听风吟》
   ============================================ */

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

/* --- CSS Variables --- */
:root {
  --bg-page: #1a1a24;
  --bg-frame: #e2ddd5;
  --bg-screen: #1a202c;
  --bg-screen-border: #111;
  --bg-start: #000;

  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;

  --blue-400: #60a5fa;
  --blue-600: #2563eb;
  --blue-900: #1e3a8a;
  --blue-950: #172554;

  --indigo-700: #4338ca;
  --indigo-900: #312e81;

  --yellow-300: #fde047;
  --yellow-400: #facc15;
  --yellow-500: #eab308;

  --red-500: #ef4444;
  --red-600: #dc2626;

  --neutral-300: #d4d4d4;
  --neutral-400: #a3a3a3;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #171717;

  --white-20: rgba(255, 255, 255, 0.2);
  --white-50: rgba(255, 255, 255, 0.5);
  --white-80: rgba(255, 255, 255, 0.8);

  --font-pixel: "DotGothic16", sans-serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --shadow-frame: inset 0 0 20px rgba(0, 0, 0, 0.2), 0 20px 50px rgba(0, 0, 0, 0.5);
  --shadow-inner-screen: inset 0 0 30px rgba(0, 0, 0, 0.6);
  --shadow-vignette: inset 0 0 60px rgba(0, 0, 0, 0.8);
}

/* --- Base --- */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100dvh;
}

.novel-page {
  min-height: 100dvh;
  background-color: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  user-select: none;
  position: relative;
  overflow: hidden;
}

@media (min-width: 640px) {
  .novel-page {
    padding: 1rem;
  }
}

@media (min-width: 768px) {
  .novel-page {
    padding: 2rem;
  }
}

/* --- Frame --- */
.novel-frame {
  width: 100%;
  max-width: 64rem;
  height: 100dvh;
  background-color: var(--bg-frame);
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.5rem 0;
  box-shadow: var(--shadow-frame);
}

@media (min-width: 640px) {
  .novel-frame {
    height: 85vh;
    padding: 1rem;
    border-radius: 1rem;
    border-top: 1px solid var(--white-50);
  }
}

@media (min-width: 768px) {
  .novel-frame {
    height: 90vh;
    padding: 1.5rem;
  }
}

/* --- Brand Bar --- */
.brand-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding: 0 0.5rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .brand-bar {
    margin-bottom: 1rem;
  }
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .brand-left {
    gap: 1rem;
  }
}

.brand-label {
  color: var(--neutral-500);
  font-weight: bold;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  border-left: 4px solid var(--red-500);
  padding-left: 0.5rem;
}

.crt-toggle {
  padding: 0.125rem 0.5rem;
  background-color: var(--neutral-300);
  color: var(--neutral-600);
  border-radius: 0.25rem;
  font-size: 0.5625rem;
  border: 1px solid var(--neutral-400);
  font-family: var(--font-sans);
  font-weight: bold;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease;
}

.crt-toggle:hover {
  color: var(--neutral-900);
  background-color: var(--neutral-200);
}

.crt-toggle:active {
  transform: translateY(1px);
}

.rec-indicator {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.rec-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--red-500);
  animation: pulse 2s infinite;
}

.rec-text {
  font-size: 0.625rem;
  color: var(--neutral-400);
}

/* --- Screen Bezel --- */
.screen-bezel {
  background-color: var(--bg-screen-border);
  padding: 0.5rem;
  box-shadow: var(--shadow-inner-screen);
  position: relative;
  overflow: hidden;
  border-top: 4px solid #333;
  border-bottom: 4px solid #333;
  flex: 1;
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .screen-bezel {
    padding: 1rem;
    border-radius: 0.75rem;
    border-top: none;
  }
}

@media (min-width: 768px) {
  .screen-bezel {
    padding: 1.5rem;
  }
}

/* --- Screen Inner --- */
.screen-inner {
  background-color: var(--bg-screen);
  width: 100%;
  border-radius: 0.125rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.screen-inner:hover .mute-overlay {
  opacity: 1;
}

/* --- CRT Effects --- */
.crt::before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    to bottom,
    rgba(18, 16, 16, 0) 50%,
    rgba(0, 0, 0, 0.25) 50%
  );
  background-size: 100% 4px;
  z-index: 50;
  pointer-events: none;
}

.crt::after {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: radial-gradient(
    circle,
    rgba(0, 0, 0, 0) 60%,
    rgba(0, 0, 0, 0.4) 100%
  );
  z-index: 51;
  pointer-events: none;
}

.scanlines {
  animation: flicker 0.15s infinite;
}

/* --- Start Screen --- */
.start-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-start);
  cursor: pointer;
  transition: background-color 300ms ease;
  z-index: 20;
}

.start-screen:hover {
  background-color: var(--neutral-900);
}

.start-screen.hidden {
  display: none;
}

.start-icon-wrap {
  animation: float 2s ease-in-out infinite;
}

.start-icon {
  width: 4rem;
  height: 4rem;
  color: var(--green-400);
  filter: drop-shadow(0 0 10px rgba(74, 222, 128, 0.8));
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .start-icon {
    width: 5rem;
    height: 5rem;
  }
}

.start-title {
  color: var(--green-400);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 0 #000;
  letter-spacing: 0.1em;
  text-align: center;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .start-title {
    font-size: 1.875rem;
  }
}

.start-subtitle {
  font-size: 0.875rem;
  color: var(--green-600);
  margin-top: 0.5rem;
  display: block;
}

.start-hint {
  color: rgba(74, 222, 128, 0.6);
  font-size: 0.875rem;
  margin-top: 2rem;
  animation: pulse 2s infinite;
}

/* --- Scene Content --- */
.scene-content {
  width: 100%;
  height: 100%;
  flex-direction: column;
}

/* --- Visual Wrapper --- */
.visual-wrapper {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.visual-wrapper.is-active {
  opacity: 1;
}

/* --- Scene transition --- */
.scene-visual,
.scene-text-area {
  opacity: 1;
}

/* --- Visual Area --- */
.scene-visual {
  flex: 1;
  width: 100%;
  background-color: #000;
  position: relative;
  border-bottom: 1px solid #333;
  overflow: hidden;
}

.scene-visual .vignette {
  position: absolute;
  inset: 0;
  box-shadow: var(--shadow-vignette);
  pointer-events: none;
  z-index: 10;
}

/* --- Text Area --- */
.scene-text-area {
  flex-shrink: 0;
  height: 35%;
  width: 100%;
  background-color: rgba(23, 37, 84, 0.9);
  color: #fff;
  padding: 1rem;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .scene-text-area {
    height: 10rem;
  }
}

@media (min-width: 768px) {
  .scene-text-area {
    height: 12rem;
  }
}

@media (min-width: 1024px) {
  .scene-text-area {
    height: 14rem;
  }
}

.text-border-decor {
  border-top: 2px solid var(--white-20);
  border-left: 2px solid var(--white-20);
  border-right: 2px solid var(--white-20);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1rem;
  border-radius: 0.375rem 0.375rem 0 0;
  margin: 0.5rem 0.5rem 0;
  pointer-events: none;
}

.scene-title-badge {
  position: absolute;
  top: -1rem;
  left: 1rem;
  background-color: var(--indigo-900);
  color: var(--yellow-300);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  border: 1px solid var(--indigo-700);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  z-index: 5;
}

@media (min-width: 640px) {
  .scene-title-badge {
    left: 1.5rem;
  }
}

.text-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.625;
  letter-spacing: 0.05em;
  color: #eff6ff;
}

@media (min-width: 640px) {
  .text-content {
    padding: 0 1rem;
  }
}

@media (min-width: 768px) {
  .text-content {
    font-size: 1rem;
  }
}

.text-content span {
  white-space: pre-line;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  overflow-wrap: break-word;
}

.text-arrow {
  display: inline-block;
  margin-left: 0.5rem;
  animation: bounce 1s infinite;
  color: var(--yellow-400);
}

/* --- Mute Overlay --- */
.mute-overlay {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  gap: 0.5rem;
  z-index: 50;
  opacity: 0;
  transition: opacity 300ms ease;
}

.mute-btn {
  padding: 0.5rem;
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  border-radius: 0.25rem;
  border: none;
  cursor: pointer;
  transition: background-color 150ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mute-btn:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* --- Hardware Buttons --- */
.hardware-bar {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  padding: 0 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .hardware-bar {
    margin-top: 1.5rem;
    margin-bottom: 0;
    padding: 0 1rem;
  }
}

.vent {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 2rem;
}

@media (min-width: 640px) {
  .vent {
    width: 3rem;
  }
}

.vent-line {
  height: 0.25rem;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.controls-group {
  display: flex;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .controls-group {
    gap: 1rem;
  }
}

.hw-btn {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-weight: bold;
  font-size: 0.625rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 150ms ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border: 2px solid;
  border-bottom-width: 4px;
  font-family: var(--font-pixel);
}

@media (min-width: 640px) {
  .hw-btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
  }
}

.hw-btn:active {
  transform: translateY(1px);
  border-bottom-width: 2px;
}

.hw-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hw-btn-back {
  background: linear-gradient(to bottom, #b3aaa0, #9c938a);
  border-color: #7a736a;
  color: var(--neutral-700);
}

.hw-btn-next {
  background: linear-gradient(to bottom, #e74c3c, #c0392b);
  border-color: #922b21;
  color: #fff;
}

.hw-btn-end {
  background: linear-gradient(to bottom, #2ecc71, #27ae60);
  border-color: #1e8449;
  color: #fff;
}

.display-label {
  position: absolute;
  bottom: 0;
  right: 0.5rem;
  font-size: 0.5rem;
  color: var(--neutral-600);
  font-family: var(--font-sans);
}

@media (min-width: 640px) {
  .display-label {
    bottom: 0.25rem;
    right: 0.75rem;
  }
}

/* --- Icons --- */
.icon {
  width: 0.75rem;
  height: 0.75rem;
  display: inline-block;
  vertical-align: middle;
}

@media (min-width: 640px) {
  .icon {
    width: 1rem;
    height: 1rem;
  }
}

.icon-lg {
  width: 1.25rem;
  height: 1.25rem;
}

/* ============================================
   PIXEL ART VISUALS
   ============================================ */

/* --- Ocean --- */
.visual-ocean {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(to bottom, #f97316, #fb7185);
}

.ocean-sun {
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  background-color: #fde047;
  box-shadow: 0 0 20px rgba(253, 224, 71, 0.8);
  position: absolute;
  top: 5rem;
  animation: sun-in 2s ease-out;
}

@keyframes sun-in {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.ocean-water {
  width: 100%;
  height: 50%;
  background: linear-gradient(to bottom, #2563eb, #1e3a8a);
  border-top: 4px solid #60a5fa;
  opacity: 0.9;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ocean-waves {
  width: 100%;
  display: flex;
  justify-content: space-around;
  margin-top: 1rem;
  opacity: 0.5;
}

.wave {
  height: 0.5rem;
  background-color: #93c5fd;
  border-radius: 999px;
  animation: pulse 2s infinite;
}

.wave-1 { width: 4rem; }
.wave-2 { width: 6rem; animation-delay: 0.2s; }
.wave-3 { width: 3rem; animation-delay: 0.4s; }

/* --- Bar --- */
.visual-bar {
  width: 100%;
  height: 100%;
  background-color: #2a1705;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 3rem;
}

.bar-table {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 8rem;
  background-color: #4a2e15;
  border-top: 8px solid #301b0a;
}

.beer-glass {
  position: relative;
  z-index: 2;
  margin-right: 3rem;
  animation: beer-in 0.5s ease-out;
}

@keyframes beer-in {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.beer-body {
  width: 5rem;
  height: 7rem;
  background-color: #eab308;
  border: 4px solid var(--white-80);
  border-radius: 0 0 0.75rem 0.75rem;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
  position: relative;
  display: flex;
  flex-direction: column-reverse;
  overflow: hidden;
}

.beer-liquid {
  width: 100%;
  height: 80%;
  background-color: rgba(250, 204, 21, 0.8);
  border-radius: 0 0 0.5rem 0.5rem;
}

.beer-foam {
  position: absolute;
  top: -1rem;
  left: -0.5rem;
  width: 6rem;
  height: 2rem;
  background-color: #fff;
  border-radius: 999px;
  display: flex;
  justify-content: space-between;
  padding-right: 0.5rem;
}

.foam-bubble {
  background-color: #fff;
  border-radius: 50%;
}

.foam-bubble-1 {
  width: 1.5rem;
  height: 1.5rem;
  margin-top: -0.5rem;
  margin-left: 0.5rem;
}

.foam-bubble-2 {
  width: 2rem;
  height: 2rem;
  margin-top: -1rem;
}

.ashtray {
  position: relative;
  z-index: 2;
  width: 4rem;
  height: 1rem;
  background-color: #9ca3af;
  border-radius: 50%;
  margin-top: auto;
  margin-bottom: 0.5rem;
  opacity: 0.8;
  animation: ashtray-in 0.5s ease-out 0.3s both;
}

@keyframes ashtray-in {
  from { opacity: 0; }
  to { opacity: 0.8; }
}

.cigarette {
  position: absolute;
  bottom: 1rem;
  left: 1.5rem;
  width: 0.25rem;
  height: 3rem;
  background-color: rgba(255, 255, 255, 0.5);
  transform: rotate(15deg);
}

.cigarette-tip {
  width: 100%;
  height: 0.5rem;
  background-color: #ef4444;
  border-radius: 0.25rem 0.25rem 0 0;
  box-shadow: 0 -5px 15px rgba(255, 0, 0, 1);
  animation: pulse 2s infinite;
}

.smoke {
  position: absolute;
  top: -1rem;
  left: -0.25rem;
  width: 0.5rem;
  height: 0.5rem;
  background-color: #d1d5db;
  border-radius: 50%;
  filter: blur(2px);
  animation: smoke-rise 2s ease-out infinite;
}

@keyframes smoke-rise {
  0% { transform: translate(0, 0); opacity: 0.8; }
  100% { transform: translate(-10px, -40px); opacity: 0; }
}

/* --- Girl --- */
.visual-girl {
  width: 100%;
  height: 100%;
  background-color: #0a0a1a;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.girl-spotlight {
  position: absolute;
  top: 0;
  width: 16rem;
  height: 100%;
  background: linear-gradient(to bottom, rgba(30, 58, 138, 0.4), transparent);
  filter: blur(24px);
  pointer-events: none;
}

.hand {
  position: relative;
  width: 8rem;
  height: 8rem;
  animation: hand-in 0.5s ease-out;
}

@keyframes hand-in {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.hand-palm {
  position: absolute;
  bottom: 0;
  right: 1rem;
  width: 6rem;
  height: 4rem;
  background-color: #e1b899;
  border-radius: 1.5rem 1.5rem 0 0;
}

.finger {
  position: absolute;
  border-radius: 999px 999px 0 0;
}

.finger-thumb {
  bottom: 3rem;
  right: 0;
  width: 1.5rem;
  height: 3rem;
  background-color: #e1b899;
  transform: rotate(30deg);
}

.finger-index {
  bottom: 4rem;
  right: 2rem;
  width: 1.5rem;
  height: 4rem;
  background-color: #d1a889;
  transform: rotate(10deg);
}

.finger-middle {
  bottom: 4rem;
  right: 3.5rem;
  width: 1.5rem;
  height: 4.5rem;
  background-color: #e1b899;
}

.finger-ring {
  bottom: 3.5rem;
  right: 5rem;
  width: 1.5rem;
  height: 4rem;
  background-color: #c19879;
  transform: rotate(-10deg);
}

.missing-finger {
  position: absolute;
  bottom: 2.5rem;
  right: 7rem;
  width: 1rem;
  height: 2.5rem;
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 999px;
  filter: blur(4px);
  animation: blackhole 3s ease-in-out infinite;
}

@keyframes blackhole {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

.star {
  position: absolute;
  width: 0.25rem;
  height: 0.25rem;
  background-color: #fff;
  border-radius: 50%;
  animation: ping 2s infinite;
}

.star-1 { top: 2.5rem; left: 2.5rem; }
.star-2 { top: 8rem; right: 5rem; animation-delay: 0.3s; }

/* --- Radio --- */
.visual-radio {
  width: 100%;
  height: 100%;
  background-color: #1e293b;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radio-body {
  width: 7rem;
  height: 5rem;
  background-color: #451a03;
  border-radius: 0.5rem;
  border: 3px solid #78350f;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), -4px 0 0 rgba(0, 0, 0, 0.5);
  position: relative;
  padding: 0.5rem;
  display: flex;
  animation: radio-in 0.5s ease-out;
}

@keyframes radio-in {
  from { transform: scale(0.9); }
  to { transform: scale(1); }
}

.radio-speaker {
  width: 50%;
  height: 100%;
  background-color: #291002;
  border-radius: 0.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  padding: 0.25rem;
  position: relative;
}

.speaker-grill {
  width: 100%;
  height: 0.25rem;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 999px;
}

.radio-visualizer {
  position: absolute;
  left: 0.75rem;
  top: 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background-color: rgba(124, 45, 18, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 1.5s infinite;
}

.radio-visualizer.hidden {
  display: none;
}

.radio-visualizer-inner {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background-color: rgba(249, 115, 22, 0.8);
  filter: blur(2px);
}

.radio-panel {
  width: 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding-left: 0.5rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.radio-display {
  width: 100%;
  height: 1rem;
  background-color: #fbbf24;
  border: 2px solid #000;
  border-radius: 0.25rem;
  position: relative;
  overflow: hidden;
}

.radio-needle {
  position: absolute;
  width: 0.2rem;
  height: 100%;
  background-color: #dc2626;
  left: 1.25rem;
  animation: needle-move 10s linear infinite;
}

@keyframes needle-move {
  0% { left: 1.25rem; }
  25% { left: 2rem; }
  50% { left: 1rem; }
  75% { left: 2.25rem; }
  100% { left: 1.25rem; }
}

.radio-knobs {
  display: flex;
  width: 100%;
  justify-content: space-between;
  margin-top: 0.25rem;
}

.knob {
  width: 1rem;
  height: 1rem;
  background-color: #d1d5db;
  border-radius: 50%;
  border-bottom: 2px solid #6b7280;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.knob-marked {
  display: flex;
  align-items: center;
  justify-content: center;
}

.knob-mark {
  width: 0.2rem;
  height: 0.5rem;
  background-color: #ef4444;
  transform: rotate(45deg);
  border-radius: 999px;
}

.radio-antenna {
  position: absolute;
  top: -2.5rem;
  right: 0.5rem;
  width: 0.2rem;
  height: 2.5rem;
  background-color: #9ca3af;
  transform: rotate(15deg);
  transform-origin: bottom;
  box-shadow: -2px 0 0 rgba(0, 0, 0, 0.5);
}

/* --- End --- */
.visual-end {
  width: 100%;
  height: 100%;
  background-color: #f8fafc;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.75rem;
  overflow: hidden;
}

.end-bg {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at top, #fef9c3, #f3f4f6, #d1d5db);
}

.end-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: end-fade-in 2s ease-out;
}

@keyframes end-fade-in {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.end-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: #1e293b;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.end-title {
  font-size: 1rem;
  color: #1e293b;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.end-author {
  color: #475569;
  font-size: 0.875rem;
}

.wind {
  position: absolute;
  left: 0;
  height: 0.25rem;
  background-color: #fff;
  filter: blur(2px);
}

.wind-1 {
  top: 33%;
  width: 16rem;
  transform: rotate(12deg);
  animation: wind-blow 4s ease-in-out infinite;
}

.wind-2 {
  bottom: 33%;
  width: 12rem;
  transform: rotate(-6deg);
  animation: wind-blow 3s ease-in-out 1s infinite;
}

@keyframes wind-blow {
  0% { transform: translateX(100%) rotate(12deg); opacity: 0; }
  50% { opacity: 0.5; }
  100% { transform: translateX(-100%) rotate(12deg); opacity: 0; }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes flicker {
  0% { opacity: 0.95; }
  5% { opacity: 0.85; }
  10% { opacity: 0.95; }
  15% { opacity: 1; }
  100% { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes ping {
  0% { transform: scale(1); opacity: 1; }
  75%, 100% { transform: scale(2); opacity: 0; }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
