:root {
  --background: #070b14;
  --panel: rgba(13, 19, 33, 0.82);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f7f8fc;
  --muted: #a8b0c0;
  --accent: #7c6cff;
}

* {
  box-sizing: border-box;   
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: "Inter", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.animation-page {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.animation-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem 1.5rem;
  background: rgba(7, 11, 20, 0.82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.animation-title {
  margin: 0;
  font-size: 1rem;
}

.animation-title span {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
}

.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  color: white;              /* White text */
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  transition:
    background 180ms ease,
    transform 180ms ease;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-2px);
}

.my-custom-button {
  background: rgba(124, 108, 255, 0.08); /* Green background */
  color: white;              /* White text */
  border: none;              /* Removes default border */
  padding: 10px 20px;        /* Adds padding around text */
}

.my-custom-button:hover {
  background: rgba(124, 108, 255, 0.13);
  transform: translateY(-2px);
}

.canvas-container {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: visible;
}

.canvas-container canvas {
  display: block;
}

.instructions {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 5;
  max-width: 280px;
  padding: 0.8rem 1rem;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 0.8rem;
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.instructions strong {
  color: var(--text);
}

@media (max-width: 600px) {
  .animation-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .back-button {
    width: 100%;
  }

  .instructions {
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    max-width: none;
  }
}
