/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;800&family=Outfit:wght@300;400;600;700&display=swap');

:root {
  --bg-color: #0b0f19;
  --panel-bg: rgba(15, 23, 42, 0.75);
  --border-color: rgba(255, 255, 255, 0.08);
  --accent-color: #3b82f6;
  --accent-light: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.3);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --success-color: #10b981;
  --success-glow: rgba(16, 185, 129, 0.2);
  --danger-color: #ef4444;
  --water-color: #0ea5e9;
  --shadow-color: rgba(0, 0, 0, 0.5);
  --font-title: 'Cinzel', serif;
  --font-body: 'Outfit', sans-serif;
}

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

[hidden] {
  display: none !important;
}

body {
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(at 0% 0%, rgba(14, 165, 233, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.1) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(16, 185, 129, 0.05) 0px, transparent 60%);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.high-score-screen {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: clamp(1rem, 3vw, 2rem);
  background: #020617;
  overflow: hidden;
}

.high-score-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("start_page_background.png");
  background-size: cover;
  background-position: center;
  filter: saturate(1.04);
}

.high-score-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.05) 0%, rgba(2, 6, 23, 0.18) 42%, rgba(2, 6, 23, 0.72) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.12) 0%, rgba(2, 6, 23, 0.32) 100%);
}

.high-score-screen.is-hidden {
  display: none;
}

.high-score-shell {
  position: relative;
  z-index: 1;
  align-self: flex-end;
  width: min(440px, 100%);
  margin: 0 clamp(0.5rem, 2vw, 1.5rem) clamp(0.5rem, 2vw, 1.5rem) 0;
  max-height: calc(100vh - 4rem);
  overflow: auto;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
  padding: 1.5rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.high-score-header {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.high-score-header h1 {
  font-family: var(--font-title);
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.65);
}

.high-score-header p,
.high-score-status,
.final-score-panel p {
  color: var(--text-secondary);
  line-height: 1.45;
}

.desktop-notice {
  display: none;
  color: #fbbf24 !important;
  font-size: 0.9rem;
  font-weight: 800;
  margin-top: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.start-game-btn,
.high-score-form button {
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #10b981, #0ea5e9);
  color: #ffffff;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 800;
  padding: 0.85rem 1.2rem;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.24);
  width: 100%;
}

.start-game-btn:hover,
.high-score-form button:hover {
  filter: brightness(1.08);
}

.final-score-panel {
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.final-score-panel p {
  margin-bottom: 0.8rem;
}

.high-score-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.high-score-form input,
.high-score-form textarea {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-primary);
  font: inherit;
  padding: 0.8rem 0.9rem;
}

.high-score-form textarea {
  min-height: 86px;
  resize: vertical;
  user-select: text;
}

.high-score-table-wrap {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.42);
}

.high-score-table-head,
.high-score-list li {
  display: grid;
  grid-template-columns: 52px 1fr 82px;
  gap: 0.5rem;
  align-items: center;
}

.high-score-table-head {
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.high-score-list {
  list-style: none;
}

.high-score-list li {
  min-height: 46px;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.high-score-list li:last-child {
  border-bottom: none;
}

.high-score-rank {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.high-score-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.high-score-statement {
  display: block;
  color: #cbd5e1;
  font-size: 0.78rem;
  line-height: 1.3;
  margin-top: 0.15rem;
  overflow-wrap: anywhere;
}

.high-score-coins {
  color: #fbbf24;
  font-weight: 900;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.high-score-status {
  min-height: 1.4rem;
  margin-top: 0.8rem;
  font-size: 0.9rem;
}

body.landing-active .game-container {
  display: none;
}

/* App Layout Grid */
.game-container {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1.2rem;
  width: 100%;
  max-width: 1200px;
  height: 95vh;
  max-height: 900px;
}

/* Header styling */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 0.8rem 1.5rem;
  box-shadow: 0 10px 30px var(--shadow-color);
}

.logo-section h1 {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #f8fafc 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.logo-section p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-top: 2px;
}

/* Audio & Settings Buttons */
.controls-top {
  display: flex;
  gap: 0.8rem;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 0.6rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-color);
  box-shadow: 0 0 15px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-icon:active {
  transform: translateY(0);
}

.btn-icon.active {
  background: linear-gradient(135deg, var(--accent-color), #2563eb);
  border-color: var(--accent-light);
  box-shadow: 0 0 15px var(--accent-glow);
}

/* Viewport Layout */
.viewport-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  background: #020617;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 40px var(--shadow-color);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  background-color: #1b2f15; /* Fallback grass color */
}

/* HUD System */
.hud-overlay {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  pointer-events: none;
}

.hud-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.8rem 1.2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 1rem;
  pointer-events: auto;
  justify-content: center;
  flex-shrink: 0;
}

.hud-panel:nth-child(1) { width: 145px; } /* Current State */
.hud-panel:nth-child(2) { width: 190px; } /* H2O2 Tank Level */
.hud-panel:nth-child(3) { width: 170px; } /* Boat Cargo */
.hud-panel:nth-child(4) { width: 580px; justify-content: space-evenly; } /* Score Tracking */
.hud-panel:nth-child(5) { width: 190px; justify-content: space-evenly; } /* Stats (Distance/Speed) */

.hud-stat {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.badge-mode {
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
}

.badge-mode.walking {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success-color);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-mode.rowing {
  background: rgba(14, 165, 233, 0.15);
  color: var(--water-color);
  border: 1px solid rgba(14, 165, 233, 0.3);
}

/* Control Prompt Card */
.prompt-overlay {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  padding: 0.7rem 1.8rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  pointer-events: none;
  animation: pulse-glow 2s infinite ease-in-out;
  transition: all 0.3s ease;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.6), 0 0 0px rgba(59, 130, 246, 0);
    border-color: rgba(255, 255, 255, 0.15);
  }
  50% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 12px var(--accent-glow);
    border-color: var(--accent-light);
  }
}

.prompt-icon {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.2rem 0.6rem;
  font-family: monospace;
  font-weight: bold;
  font-size: 0.9rem;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.prompt-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}

/* Footer Instructions & Credits */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 0.8rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.control-guide {
  display: flex;
  gap: 1.5rem;
}

.control-key {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

kbd {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.1rem 0.4rem;
  font-family: monospace;
  color: var(--text-primary);
  font-size: 0.8rem;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

/* Responsive adjust */
@media (max-width: 768px) {
  .desktop-notice {
    display: block;
  }

  .high-score-shell {
    padding: 1rem;
  }

  .high-score-header {
    align-items: stretch;
    flex-direction: column;
  }

  .start-game-btn,
  .high-score-form button {
    width: 100%;
  }

  .high-score-form {
    grid-template-columns: 1fr;
  }

  .high-score-table-head,
  .high-score-list li {
    grid-template-columns: 52px 1fr 82px;
    gap: 0.5rem;
  }

  .game-container {
    height: auto;
    max-height: none;
    gap: 0.8rem;
  }
  
  .viewport-wrapper {
    height: 60vh;
  }
  
  footer {
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
    text-align: center;
  }
  
  .control-guide {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Middle East Crisis News Flash */
.news-flash-overlay {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(185, 28, 28, 0.85); /* deep red semi-transparent alert */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid #ef4444;
  border-radius: 16px;
  padding: 1.2rem 2.5rem;
  box-shadow: 0 15px 40px rgba(239, 68, 68, 0.4), 0 0 20px rgba(0, 0, 0, 0.8);
  z-index: 1000;
  text-align: center;
  pointer-events: auto;
  width: 90%;
  max-width: 600px;
  animation: alert-bounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes alert-bounce {
  0% { transform: translate(-50%, -150%) scale(0.8); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.news-flash-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}

.flash-alert-title {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.news-flash-content {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fef08a; /* soft yellow text */
  margin-bottom: 0.6rem;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.news-flash-subtext {
  font-size: 0.8rem;
  color: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
}

/* White House Press Briefing Overlay Card */
.press-overlay-card {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15, 23, 42, 0.9); /* slate blue */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid rgba(59, 130, 246, 0.4);
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(59, 130, 246, 0.15);
  width: 90%;
  max-width: 580px;
  color: #f8fafc;
  z-index: 1050;
  pointer-events: auto; /* enable mouse clicks and interactions */
  animation: card-fade-in 0.3s ease-out;
}

@keyframes card-fade-in {
  0% { opacity: 0; transform: translate(-50%, -45%); }
  100% { opacity: 1; transform: translate(-50%, -50%); }
}

.press-card-header h3 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  letter-spacing: 1.5px;
  color: #60a5fa;
  text-align: center;
  margin-bottom: 0.8rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.press-crisis-text {
  background: rgba(15, 23, 42, 0.5);
  border-left: 3px solid #ef4444;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  line-height: 1.35;
}

.press-crisis-text strong {
  color: #ef4444;
}

.press-options-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.press-option-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.press-option-row:hover, .press-option-row.selected {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.55);
  transform: translateX(4px);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.25);
}

.press-option-row:active {
  transform: translateX(2px) scale(0.99);
  background: rgba(59, 130, 246, 0.25);
}

.press-key-badge {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  font-family: monospace;
  font-weight: bold;
  font-size: 0.85rem;
  box-shadow: 0 1.5px 0 rgba(0, 0, 0, 0.3);
}

.press-option-text {
  font-size: 0.85rem;
  line-height: 1.3;
}

.press-card-footer {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Game Over / Victory Overlay Dialog */
.game-over-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.85); /* dark slate back drop */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  animation: fade-in 0.4s ease;
}

.game-over-card {
  background: rgba(30, 41, 59, 0.9);
  border: 3px solid rgba(244, 63, 94, 0.4);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(244, 63, 94, 0.2);
  color: #f8fafc;
  animation: zoom-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-over-card h2 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.game-over-card p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.restart-btn {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border: none;
  color: white;
  padding: 0.8rem 2.2rem;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
  transition: all 0.2s ease;
}

.restart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.restart-btn:active {
  transform: translateY(0);
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Bottom Approval Rating Overlay */
.approval-bottom-overlay {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.75); /* transparent slate */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.6rem 1rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5), 0 0 15px rgba(59, 130, 246, 0.1);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  z-index: 1000;
  width: 90%;
  max-width: 480px;
  pointer-events: auto;
}

.approval-left {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.approval-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.approval-value {
  font-family: monospace;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
  transition: color 0.3s ease;
}

.approval-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.approval-bar-fill {
  height: 100%;
  width: 47%;
  background: linear-gradient(90deg, #f43f5e, #10b981);
  transition: width 0.3s ease, background 0.3s ease;
}

.approval-right {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#approvalGraph {
  background: rgba(0,0,0,0.25);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: block;
}

/* Mini News Flash Toast System */
.mini-news-container {
  position: absolute;
  bottom: 110px; /* Stay just above the bottom approval panel */
  right: 20px;
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  z-index: 1020;
}

.mini-toast {
  background: rgba(15, 23, 42, 0.85); /* slate */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: toast-slide-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: auto;
}

.mini-toast.up {
  border-left: 3px solid #10b981; /* emerald green */
  border-top: 1px solid rgba(16, 185, 129, 0.2);
  border-right: 1px solid rgba(16, 185, 129, 0.1);
  border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

.mini-toast.down {
  border-left: 3px solid #f43f5e; /* red-rose */
  border-top: 1px solid rgba(244, 63, 94, 0.2);
  border-right: 1px solid rgba(244, 63, 94, 0.1);
  border-bottom: 1px solid rgba(244, 63, 94, 0.1);
}

.mini-toast-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.mini-toast-icon {
  font-size: 0.9rem;
}

.mini-toast-title {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-family: var(--font-title);
}

.mini-toast.up .mini-toast-title {
  color: #34d399; /* light green */
}

.mini-toast.down .mini-toast-title {
  color: #fb7185; /* light red */
}

.mini-toast-body {
  font-size: 0.78rem;
  line-height: 1.25;
  color: #f1f5f9;
  font-weight: 500;
}

.mini-toast.fade-out {
  opacity: 0;
  transform: translateY(-10px);
}

@keyframes toast-slide-in {
  0% { opacity: 0; transform: translateY(20px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
