/* Minimal development CSS - replace with Tailwind build output for production */
/* Run: npx tailwindcss -i frontend-src/input.css -o backend/public/css/output.css --minify */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

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

body {
  font-family: 'Noto Sans SC', 'Noto Sans JP', sans-serif;
  background: linear-gradient(to bottom, #991b1b, #7f1d1d, #450a0a);
  color: white;
  min-height: 100vh;
}

.container { width: 100%; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 768px) { .container { max-width: 56rem; } }

/* Layout */
.flex { display: flex; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }

/* Spacing */
.p-2 { padding: 0.5rem; } .p-3 { padding: 0.75rem; } .p-4 { padding: 1rem; } .p-6 { padding: 1.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.mb-1 { margin-bottom: 0.25rem; } .mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; } .mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; } .mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; } .mt-8 { margin-top: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Sizing */
.w-full { width: 100%; } .w-10 { width: 2.5rem; } .w-12 { width: 3rem; } .w-20 { width: 5rem; }
.h-12 { height: 3rem; } .h-20 { height: 5rem; } .h-24 { height: 6rem; } .h-48 { height: 12rem; }
.h-64 { height: 16rem; } .h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.max-w-md { max-width: 28rem; } .max-w-lg { max-width: 32rem; } .max-w-4xl { max-width: 56rem; }

/* Typography */
.text-xs { font-size: 0.75rem; } .text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; } .text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; } .text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; } .text-6xl { font-size: 3.75rem; }
.font-bold { font-weight: 700; } .font-medium { font-weight: 500; }
.font-mono { font-family: 'Courier New', monospace; }
.text-center { text-align: center; } .text-left { text-align: left; } .text-right { text-align: right; }
.leading-relaxed { line-height: 1.625; }
.break-all { word-break: break-all; }
.whitespace-pre-wrap { white-space: pre-wrap; }

/* Colors */
.text-white { color: white; }
.text-white\/30 { color: rgba(255,255,255,0.3); }
.text-white\/40 { color: rgba(255,255,255,0.4); }
.text-white\/50 { color: rgba(255,255,255,0.5); }
.text-white\/60 { color: rgba(255,255,255,0.6); }
.text-white\/70 { color: rgba(255,255,255,0.7); }
.text-white\/80 { color: rgba(255,255,255,0.8); }
.text-white\/90 { color: rgba(255,255,255,0.9); }
.text-black { color: black; }
.text-red-400 { color: #f87171; }
.text-green-400 { color: #4ade80; }
.text-festival-gold, .text-\[festival-gold\] { color: #D4A017; }
.text-mano, .speaker-mano { color: #FFB6C1; }
.text-hiori, .speaker-hiori { color: #4A90D9; }
.text-meguru, .speaker-meguru { color: #FFD700; }

/* Backgrounds */
.bg-black\/20 { background: rgba(0,0,0,0.2); }
.bg-black\/30 { background: rgba(0,0,0,0.3); }
.bg-black\/50 { background: rgba(0,0,0,0.5); }
.bg-black\/80 { background: rgba(0,0,0,0.8); }
.bg-white\/10 { background: rgba(255,255,255,0.1); }
.bg-white\/20 { background: rgba(255,255,255,0.2); }
.bg-white\/30 { background: rgba(255,255,255,0.3); }
.bg-red-500\/20 { background: rgba(239,68,68,0.2); }
.bg-green-500\/20 { background: rgba(34,197,94,0.2); }
.bg-green-500\/30 { background: rgba(34,197,94,0.3); }
.bg-festival-gold\/20 { background: rgba(212,160,23,0.2); }
.bg-festival-gold\/30 { background: rgba(212,160,23,0.3); }
.bg-festival-red\/20 { background: rgba(220,38,38,0.2); }
.bg-mano\/20 { background: rgba(255,182,193,0.2); }
.bg-mano\/30 { background: rgba(255,182,193,0.3); }
.bg-hiori\/20 { background: rgba(74,144,217,0.2); }
.bg-hiori\/30 { background: rgba(74,144,217,0.3); }
.bg-meguru\/20 { background: rgba(255,215,0,0.2); }
.bg-meguru\/30 { background: rgba(255,215,0,0.3); }

/* Borders */
.border { border: 1px solid; }
.border-2 { border: 2px solid; }
.border-white\/10 { border-color: rgba(255,255,255,0.1); }
.border-white\/20 { border-color: rgba(255,255,255,0.2); }
.border-white\/30 { border-color: rgba(255,255,255,0.3); }
.border-red-500\/50 { border-color: rgba(239,68,68,0.5); }
.border-green-500\/50 { border-color: rgba(34,197,94,0.5); }
.border-green-400\/50 { border-color: rgba(74,222,128,0.5); }
.border-festival-gold { border-color: #D4A017; }
.border-festival-gold\/30 { border-color: rgba(212,160,23,0.3); }
.rounded { border-radius: 0.25rem; }
.rounded-sm { border-radius: 0.125rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }

/* Effects */
.shadow-lg { box-shadow: 0 10px 15px rgba(0,0,0,0.3); }
.shadow-md { box-shadow: 0 4px 6px rgba(0,0,0,0.2); }
.backdrop-blur-md { backdrop-filter: blur(12px); }
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.resize-none { resize: none; }
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.relative { position: relative; }
.fixed { position: fixed; }
.bottom-0 { bottom: 0; } .left-0 { left: 0; } .right-0 { right: 0; }
.z-50 { z-index: 50; }
.opacity-40 { opacity: 0.4; }
.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.transition-all { transition: all 0.3s; }
.transition-colors { transition: color 0.2s, background-color 0.2s; }

/* Components */
.card-panel {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 1.5rem;
  box-shadow: 0 10px 15px rgba(0,0,0,0.3);
}
.btn-primary {
  background: #D4A017;
  color: black;
  font-weight: 700;
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.btn-primary:hover { background: #facc15; }
.btn-secondary {
  background: rgba(255,255,255,0.2);
  color: white;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-secondary:hover { background: rgba(255,255,255,0.3); }
.input-field {
  width: 100%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  color: white;
  outline: none;
}
.input-field::placeholder { color: rgba(255,255,255,0.5); }
.input-field:focus { border-color: #D4A017; }

.envelope {
  width: 2.5rem; height: 3rem;
  border-radius: 0.125rem; border: 2px solid;
  transition: all 0.3s;
  display: flex; align-items: center; justify-content: center;
}
.envelope-empty { border-color: rgba(255,255,255,0.3); background: transparent; }
.envelope-filled { border-color: #D4A017; background: #DC2626; box-shadow: 0 4px 6px rgba(212,160,23,0.3); }

.challenge-card { transition: all 0.3s; }
.challenge-locked { opacity: 0.4; cursor: not-allowed; }
.challenge-active { box-shadow: 0 0 0 2px #D4A017, 0 10px 15px rgba(212,160,23,0.2); }
.challenge-completed { border-color: rgba(74,222,128,0.5); }

.dialogue-box {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(4px);
  padding: 1.5rem; z-index: 50;
}

.ring-2 { box-shadow: 0 0 0 2px #D4A017; }

/* Alpine cloak */
[x-cloak] { display: none !important; }

/* Responsive */
@media (max-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: 1fr; }
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

a { color: inherit; text-decoration: none; }
a.text-festival-gold:hover { text-decoration: underline; }
code { background: rgba(0,0,0,0.3); padding: 0.125rem 0.375rem; border-radius: 0.25rem; font-size: 0.875rem; }
