/*


 */

body {
  margin: 0;
  height: 100vh;
  font-family: monospace;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
}

.container {
  text-align: center;
  background: rgba(30, 41, 59, 0.9);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  width: 420px;
}

h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: 1px;
}

/* Loading overlay */
turbo-frame#bug {
  display: block;
  position: relative;
}

.bug-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  z-index: 20;
  font-family: "Courier New", monospace;
  color: #f87171;
  font-size: 13px;
  letter-spacing: 3px;
  cursor: wait;
  animation: loading-fade-in 0.12s ease;
}

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

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  color: #475569;
  font-size: 12px;
  text-decoration: none;
  transition: color 0.2s;
}

.github-link:hover {
  color: #f87171;
}

.github-link-ico {
  width: 15px;
  height: 15px;
}

.bug-category {
  display: inline-block;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  font-size: 11px;
  padding: 2px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
  letter-spacing: 0.8px;
}

.error-box {
  background: #020617;
  border: 2px solid #ef4444;
  color: #f87171;
  padding: 20px;
  border-radius: 12px;
  font-size: 16px;
  margin: 16px 0 24px;
  word-break: break-word;
  font-family: "Courier New", monospace;
  text-shadow: 0 0 8px rgba(248, 113, 113, 0.6);
  animation: bug-appear 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes bug-appear {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.button_to {
  margin: 0;
}

/* ボタン共通 */
.bug-btn,
.share-btn,
.button_to button {
  height: 44px;
  min-width: 140px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  border: none;
  box-sizing: border-box;
  transition: 0.2s;
}

.bug-btn {
  background: #ef4444;
  color: white;
}

.share-btn {
  background: #000;
  color: white;
  border: 1px solid #333;
}

.bug-counter {
  font-size: 12px;
  color: #475569;
  margin: -8px 0 16px;
  letter-spacing: 0.4px;
}

.bug-counter strong {
  color: #f87171;
  font-size: 14px;
}

.bug-btn:hover,
.share-btn:hover,
.copy-btn:hover {
  opacity: 0.85;
  transform: translateY(-2px) scale(1.03);
}

.copy-btn {
  background: rgba(255, 255, 255, 0.07);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: monospace;
}

.copy-btn--done {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.35);
}

.error-box.rare {
  border-color: #facc15;
  color: #facc15;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.6);
  animation: bug-appear 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both,
             rare-pulse 1.8s 0.5s ease-in-out infinite;
}

@keyframes rare-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.5), 0 0 0px rgba(250, 204, 21, 0);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 36px rgba(250, 204, 21, 0.9), 0 0 60px rgba(250, 204, 21, 0.3);
    transform: scale(1.015);
  }
}

@media (max-width: 480px) {
  body {
    align-items: flex-start;
    padding: 24px 16px;
    height: auto;
    min-height: 100vh;
    box-sizing: border-box;
  }

  .container {
    width: 100%;
    max-width: 420px;
    padding: 28px 20px;
    box-sizing: border-box;
  }

  h1 {
    font-size: 24px;
  }

  .error-box {
    font-size: 14px;
    padding: 16px;
  }

  .buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .bug-btn,
  .share-btn,
  .copy-btn,
  .button_to,
  .button_to button {
    width: 100%;
    min-width: unset;
  }
}
