@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700;900&family=Creepster&family=JetBrains+Mono:wght@300;400;600;700&family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
  --bg-deep: #07070a;
  --bg-surface: #0e111a;
  --bg-glass: rgba(18, 22, 34, 0.75);
  --border-glass: rgba(0, 255, 157, 0.2);
  --border-warm: rgba(255, 159, 28, 0.35);

  --spectral-green: #00ff9d;
  --spectral-cyan: #4deeea;
  --ghost-glitch: #ff0055;
  --cempasuchil-gold: #ff9f1c;
  --cempasuchil-orange: #ff5400;
  --candle-glow: #ffeaa7;
  --text-primary: #e6edf3;
  --text-muted: #8b949e;
  
  --font-mono: 'JetBrains Mono', monospace;
  --font-display: 'Cinzel Decorative', cursive, serif;
  --font-spooky: 'Creepster', cursive;
  --font-ui: 'Space Grotesk', -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-ui);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* Background Canvas */
#spectral-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
}

/* CRT Scanlines Overlay */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.35) 50%
  ), linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.03),
    rgba(0, 255, 0, 0.01),
    rgba(0, 0, 255, 0.03)
  );
  background-size: 100% 3px, 6px 100%;
  opacity: 0.65;
  transition: opacity 0.3s ease;
}

body.no-crt .crt-overlay {
  opacity: 0;
}

/* Top App Bar */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(7, 7, 10, 0.85);
  border-bottom: 1px solid rgba(0, 255, 157, 0.2);
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  font-size: 1.8rem;
  animation: pulse-ghost 3s infinite ease-in-out;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  background: linear-gradient(90deg, var(--spectral-green), var(--spectral-cyan), var(--cempasuchil-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(0, 255, 157, 0.3);
}

.brand-subtitle {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.model-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: rgba(0, 255, 157, 0.08);
  border: 1px solid rgba(0, 255, 157, 0.3);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--spectral-green);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--spectral-green);
  box-shadow: 0 0 8px var(--spectral-green);
  animation: pulse-glow 2s infinite;
}

.btn-ctrl {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-ctrl:hover {
  background: rgba(0, 255, 157, 0.15);
  border-color: var(--spectral-green);
  color: var(--spectral-green);
}

.btn-ctrl.active {
  background: rgba(255, 159, 28, 0.2);
  border-color: var(--cempasuchil-gold);
  color: var(--cempasuchil-gold);
}

/* Tab Navigation */
.tabs-bar {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem 0;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 12px 12px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  background: rgba(14, 17, 26, 0.5);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.25s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(18, 22, 34, 0.8);
}

.tab-btn.active {
  color: #fff;
  background: var(--bg-surface);
  border-color: rgba(0, 255, 157, 0.3);
  box-shadow: 0 -4px 15px rgba(0, 255, 157, 0.1);
}

.tab-btn.ofrenda-tab.active {
  border-color: rgba(255, 159, 28, 0.4);
  box-shadow: 0 -4px 15px rgba(255, 159, 28, 0.15);
}

/* App Main Container */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 2.5rem;
  position: relative;
  z-index: 10;
}

.tab-content {
  display: none;
  background: var(--bg-surface);
  border: 1px solid rgba(0, 255, 157, 0.25);
  border-radius: 0 0 16px 16px;
  padding: 1.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

.tab-content.ofrenda-theme {
  border-color: rgba(255, 159, 28, 0.35);
}

/* TAB 1: HAUNTED TERMINAL */
.terminal-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
}

@media (max-width: 860px) {
  .terminal-layout {
    grid-template-columns: 1fr;
  }
}

.spirit-panel {
  background: rgba(10, 12, 18, 0.85);
  border: 1px solid rgba(0, 255, 157, 0.2);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.spirit-avatar-container {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 157, 0.4);
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.2);
}

.spirit-avatar {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  filter: contrast(1.1) brightness(0.95);
  transition: transform 0.3s ease;
}

.spirit-avatar-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 255, 157, 0.15), transparent 80%);
  pointer-events: none;
}

.meter-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.meter-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 157, 0.2);
}

.meter-fill {
  height: 100%;
  width: 84%;
  background: linear-gradient(90deg, var(--spectral-green), var(--spectral-cyan));
  box-shadow: 0 0 10px var(--spectral-green);
  transition: width 0.5s ease;
  animation: meter-flicker 4s infinite;
}

.quick-commands {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quick-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cmd-pill {
  background: rgba(0, 255, 157, 0.06);
  border: 1px solid rgba(0, 255, 157, 0.2);
  color: var(--spectral-green);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cmd-pill:hover {
  background: rgba(0, 255, 157, 0.2);
  box-shadow: 0 0 12px rgba(0, 255, 157, 0.3);
  transform: translateX(4px);
}

/* Terminal Screen */
.terminal-screen {
  background: #050608;
  border: 1px solid rgba(0, 255, 157, 0.3);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  box-shadow: inset 0 0 40px rgba(0, 255, 157, 0.05), 0 10px 30px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.terminal-header {
  background: #0d1117;
  border-bottom: 1px solid rgba(0, 255, 157, 0.2);
  padding: 0.6rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #21262d;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-body {
  flex: 1;
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--spectral-green);
  overflow-y: auto;
  max-height: 440px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.term-entry {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.term-input-line {
  color: #fff;
  display: flex;
  gap: 0.5rem;
  word-break: break-all;
}

.term-prompt {
  color: var(--spectral-cyan);
  font-weight: 600;
  user-select: none;
}

.term-ghost-response {
  color: var(--spectral-green);
  padding-left: 1.25rem;
  border-left: 2px solid rgba(0, 255, 157, 0.4);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.term-ghost-response.glitch-text {
  text-shadow: 1px 0 var(--ghost-glitch), -1px 0 var(--spectral-cyan);
}

.term-input-wrapper {
  border-top: 1px solid rgba(0, 255, 157, 0.2);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #080a0f;
}

.term-input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.term-btn-send {
  background: rgba(0, 255, 157, 0.15);
  border: 1px solid var(--spectral-green);
  color: var(--spectral-green);
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.term-btn-send:hover {
  background: var(--spectral-green);
  color: #000;
}

/* TAB 2: DIGITAL OFRENDA */
.ofrenda-hero {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-warm);
  margin-bottom: 2rem;
  box-shadow: 0 0 35px rgba(255, 159, 28, 0.15);
}

.ofrenda-img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
}

.ofrenda-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(7, 7, 10, 0.95) 75%);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ofrenda-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--cempasuchil-gold);
  text-shadow: 0 0 20px rgba(255, 159, 28, 0.4);
}

.ofrenda-desc {
  color: #d1d5db;
  max-width: 750px;
  font-size: 0.95rem;
}

/* Interactive Candle Shrine */
.shrine-section {
  margin-bottom: 2rem;
}

.section-heading {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--cempasuchil-gold);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.candles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.candle-card {
  background: rgba(20, 16, 24, 0.7);
  border: 1px solid rgba(255, 159, 28, 0.3);
  border-radius: 10px;
  padding: 1.25rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.candle-card:hover {
  transform: translateY(-4px);
  border-color: var(--cempasuchil-gold);
  box-shadow: 0 8px 25px rgba(255, 159, 28, 0.25);
}

.candle-flame-wrapper {
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: 0.75rem;
}

.flame {
  width: 14px;
  height: 28px;
  background: radial-gradient(circle at 50% 80%, #fff 15%, var(--candle-glow) 60%, var(--cempasuchil-orange) 100%);
  border-radius: 50% 50% 20% 20% / 60% 60% 40% 40%;
  box-shadow: 0 0 15px var(--cempasuchil-gold), 0 0 35px var(--cempasuchil-orange);
  animation: flicker 1.8s infinite ease-in-out;
}

.candle-card.extinguished .flame {
  display: none;
}

.candle-card.extinguished {
  opacity: 0.5;
  border-color: rgba(255, 255, 255, 0.1);
}

.candle-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--candle-glow);
}

.candle-status {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Offerings Selector */
.offerings-shelf {
  background: rgba(14, 18, 28, 0.85);
  border: 1px solid var(--border-warm);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.offerings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.offering-item {
  background: rgba(255, 159, 28, 0.05);
  border: 1px solid rgba(255, 159, 28, 0.2);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.offering-item:hover, .offering-item.active {
  background: rgba(255, 159, 28, 0.18);
  border-color: var(--cempasuchil-gold);
  transform: translateY(-2px);
}

.offering-icon {
  font-size: 2rem;
}

.offering-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--cempasuchil-gold);
}

.offering-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Altar Remembrance Generator */
.blessing-box {
  background: linear-gradient(135deg, rgba(255, 159, 28, 0.08), rgba(255, 84, 0, 0.04));
  border: 1px solid rgba(255, 159, 28, 0.4);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blessing-input-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.blessing-input {
  flex: 1;
  min-width: 250px;
  background: rgba(7, 7, 10, 0.8);
  border: 1px solid rgba(255, 159, 28, 0.3);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.95rem;
}

.blessing-input:focus {
  outline: none;
  border-color: var(--cempasuchil-gold);
  box-shadow: 0 0 12px rgba(255, 159, 28, 0.3);
}

.btn-bless {
  background: linear-gradient(90deg, var(--cempasuchil-gold), var(--cempasuchil-orange));
  border: none;
  border-radius: 8px;
  color: #000;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(255, 159, 28, 0.35);
}

.btn-bless:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 159, 28, 0.5);
}

.blessing-result {
  background: rgba(7, 7, 10, 0.6);
  border-left: 3px solid var(--cempasuchil-gold);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  color: #ffd8a8;
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.7;
  min-height: 60px;
}

/* TAB 3: LANGUAGE SÉANCE */
.seance-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
}

@media (max-width: 860px) {
  .seance-layout {
    grid-template-columns: 1fr;
  }
}

.ouija-panel {
  background: rgba(14, 16, 24, 0.9);
  border: 1px solid rgba(77, 238, 234, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ouija-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--spectral-cyan);
}

.spirit-channels {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.channel-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(77, 238, 234, 0.2);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  color: var(--text-primary);
  text-align: left;
  transition: all 0.2s ease;
}

.channel-btn:hover, .channel-btn.active {
  background: rgba(77, 238, 234, 0.15);
  border-color: var(--spectral-cyan);
  box-shadow: 0 0 15px rgba(77, 238, 234, 0.2);
  transform: translateX(4px);
}

.channel-icon {
  font-size: 1.5rem;
}

.channel-info h4 {
  font-size: 0.9rem;
  color: var(--spectral-cyan);
  font-family: var(--font-mono);
}

.channel-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* EVP Visualizer */
.evp-box {
  background: #050608;
  border: 1px solid rgba(77, 238, 234, 0.3);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.evp-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--spectral-cyan);
}

.evp-bars {
  height: 36px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.evp-bar {
  flex: 1;
  background: var(--spectral-cyan);
  height: 15%;
  border-radius: 2px;
  transition: height 0.1s ease;
}

/* Séance Chat Chamber */
.seance-chat-window {
  background: #06070a;
  border: 1px solid rgba(77, 238, 234, 0.3);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  overflow: hidden;
}

.seance-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  max-height: 440px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.msg-bubble {
  max-width: 80%;
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  line-height: 1.5;
  font-size: 0.95rem;
}

.msg-bubble.spirit {
  align-self: flex-start;
  background: rgba(77, 238, 234, 0.08);
  border: 1px solid rgba(77, 238, 234, 0.3);
  color: #c9f9f7;
  font-family: var(--font-mono);
}

.msg-bubble.user {
  align-self: flex-end;
  background: rgba(255, 159, 28, 0.15);
  border: 1px solid rgba(255, 159, 28, 0.4);
  color: #fff;
}

.seance-input-row {
  border-top: 1px solid rgba(77, 238, 234, 0.2);
  padding: 0.75rem 1.25rem;
  display: flex;
  gap: 0.75rem;
  background: #080a0f;
}

.seance-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.95rem;
}

.btn-seance-send {
  background: rgba(77, 238, 234, 0.18);
  border: 1px solid var(--spectral-cyan);
  color: var(--spectral-cyan);
  padding: 0.45rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-seance-send:hover {
  background: var(--spectral-cyan);
  color: #000;
}

/* TAB 4: ABOUT & OPEN-SOURCE AI */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.about-card {
  background: rgba(14, 18, 28, 0.85);
  border: 1px solid rgba(0, 255, 157, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.about-card h3 {
  color: var(--spectral-green);
  font-family: var(--font-mono);
  font-size: 1.1rem;
}

.about-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.draft-box {
  background: #050608;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #a0aec0;
  max-height: 250px;
  overflow-y: auto;
  white-space: pre-wrap;
  user-select: all;
}

/* Keyframe Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-ghost {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.8; }
  50% { transform: scale(1.1) rotate(5deg); opacity: 1; }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

@keyframes meter-flicker {
  0%, 100% { opacity: 1; }
  45% { opacity: 0.85; }
  48% { opacity: 0.3; }
  52% { opacity: 0.95; }
}

@keyframes flicker {
  0%, 100% { transform: scale(1) rotate(-1deg); opacity: 0.95; }
  25% { transform: scale(1.08, 0.95) rotate(2deg); opacity: 1; }
  50% { transform: scale(0.92, 1.05) rotate(-2deg); opacity: 0.88; }
  75% { transform: scale(1.04, 0.98) rotate(1deg); opacity: 1; }
}
