/*


 */

@font-face {
  font-family: "Star Jedi";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/star-jedi-52e9e3b037380276c8d91ba4f91602c616da6b1c737a386ed83ae51717cead75.ttf) format("truetype");
}

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

html, body {
  height: 100%;
  overflow-x: hidden;
  background-color: #000;
  background-image: var(--bg-image-url);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body.bg-loaded {
  transition: background-image 0.5s ease-in;
}

.design-header {
  position: absolute;
  top: 2rem;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 2;
}

.design-title {
  font-family: "Star Jedi", sans-serif;
  font-size: 2.5rem;
  letter-spacing: 0.1em;
  text-shadow: 0 0 30px rgba(255, 255, 0, 0.4);
  margin-bottom: 0.5rem;
}

.design-punchline {
  font-size: 1.1rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
  position: relative;
  z-index: 1;
}

.code-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2rem clamp(1rem, 5vw, 3rem);
  max-width: calc(100vw - 2rem);
}

.code-digits {
  font-size: clamp(2rem, 10vw, 4rem);
  font-weight: 700;
  letter-spacing: clamp(0.15em, 3vw, 0.5em);
  font-family: "SF Mono", "Fira Code", "Courier New", monospace;
  text-align: center;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  max-width: 100%;
}

.code-timestamp {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.code-waiting {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.5);
  animation: pulse 2s ease-in-out infinite;
}

.copy-button {
  min-width: 44px;
  min-height: 44px;
  padding: 0.75rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.copy-button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.copy-button:active {
  background: rgba(255, 255, 255, 0.3);
}

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

.connection-status {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4caf50;
  opacity: 0.6;
  transition: background 0.3s;
  z-index: 10;
}

turbo-cable-stream-source:not([connected]) ~ .connection-status {
  background: #f44336;
  animation: pulse 2s ease-in-out infinite;
}

/* Tablet and up */
@media (min-width: 768px) {
  .code-digits {
    font-size: 5rem;
  }

  .design-title {
    font-size: 3rem;
  }
}

/* Desktop and up */
@media (min-width: 1024px) {
  .code-digits {
    font-size: 6rem;
  }

  .design-title {
    font-size: 3.5rem;
  }

  .design-punchline {
    font-size: 1.25rem;
  }
}
