:root {
  --bg-dark: #0f0505;
  --bg-panel: #1a0a0a;
  --primary: #dc2626; /* Red */
  --primary-dark: #991b1b;
  --accent: #fbbf24; /* Gold */
  --text: #fff1f2;
  --text-muted: #fda4af;
  --border: rgba(251, 191, 36, 0.2);
  --card: rgba(26, 10, 10, 0.8);
  --shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.8);
  --radius: 1rem;
  --font-main: 'Noto Serif JP', 'Inter', serif;
  --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 50% 0%, #450a0a, transparent 60%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23fbbf24' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 1;
}

/* Decorative Elements */
.decoration-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.sakura {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0.6;
  animation: fall linear infinite;
}

@keyframes fall {
  0% { transform: translate(0, -10vh) rotate(0deg); opacity: 0; }
  20% { opacity: 0.8; }
  100% { transform: translate(20vw, 110vh) rotate(360deg); opacity: 0; }
}

.sakura-1 { left: 10%; animation-duration: 10s; animation-delay: 0s; }
.sakura-2 { left: 30%; animation-duration: 14s; animation-delay: 2s; }
.sakura-3 { left: 60%; animation-duration: 12s; animation-delay: 4s; }
.sakura-4 { left: 80%; animation-duration: 16s; animation-delay: 1s; }
.sakura-5 { left: 50%; animation-duration: 18s; animation-delay: 6s; }

.header {
  text-align: center;
  padding: 3rem 0;
  position: relative;
}

.shrine-gate {
  font-size: 4rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 20px rgba(220, 38, 38, 0.5));
}

.title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.title-japanese {
  font-size: 3.5rem;
  font-weight: 900;
  background: linear-gradient(to bottom, #fbbf24, #d97706);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.title-english {
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.subtitle {
  margin-top: 1rem;
  font-style: italic;
  color: var(--text-muted);
}

.fortune-section {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}

.omikuji-box {
  position: relative;
  width: 200px;
  height: 300px;
  margin: 0 auto;
  perspective: 1000px;
}

.box-body {
  width: 100%;
  height: 100%;
  background: #7f1d1d;
  border: 4px solid #fbbf24;
  border-radius: 4px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.box-body::before {
  content: "御神籤";
  writing-mode: vertical-rl;
  font-size: 2.5rem;
  color: #fbbf24;
  font-weight: bold;
  opacity: 0.9;
  border: 2px solid #fbbf24;
  padding: 1rem 0.5rem;
}

.box-lid {
  position: absolute;
  top: -20px;
  left: -10px;
  width: 220px;
  height: 40px;
  background: #991b1b;
  border: 2px solid #fbbf24;
  border-radius: 4px;
  z-index: 2;
}

.draw-area {
  background: var(--card);
  padding: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.instruction {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 2rem;
  color: var(--accent);
}

.name-input-wrapper, .birthdate-input-wrapper, .omikuji-type-wrapper {
  margin-bottom: 1.5rem;
}

.name-label, .birthdate-label, .omikuji-type-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.name-input, .birthdate-input, .omikuji-type-select {
  width: 100%;
  padding: 1rem;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font-main);
  transition: var(--transition);
}

.name-input:focus, .birthdate-input:focus, .omikuji-type-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.2);
}

.draw-button {
  width: 100%;
  padding: 1.2rem;
  background: linear-gradient(to bottom, #dc2626, #991b1b);
  border: 2px solid #fbbf24;
  color: #fff;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 3rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.3);
}

.draw-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(220, 38, 38, 0.4);
  filter: brightness(1.1);
}

.draw-button .button-text::before {
  content: "🔮 ";
}

.status-pill-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.status-pill {
  background: rgba(255,255,255,0.05);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(255,255,255,0.1);
}

.fortune-paper {
  background: #fff;
  color: #1a0a0a;
  padding: 3rem;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  font-family: 'Noto Serif JP', serif;
  border-left: 8px solid #dc2626;
  border-right: 8px solid #dc2626;
}

.fortune-paper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23000000' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
}

.paper-header {
  text-align: center;
  border-bottom: 2px solid #dc2626;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.fortune-level {
  font-size: 3rem;
  font-weight: 900;
  color: #dc2626;
  text-align: center;
  margin: 1rem 0;
  line-height: 1.4;
}

.fortune-message {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
  font-weight: bold;
}

.fortune-details {
  display: grid;
  gap: 1rem;
}

.detail-item {
  border-bottom: 1px dashed #ccc;
  padding: 0.5rem 0;
  display: flex;
  justify-content: space-between;
}

.detail-label {
  font-weight: bold;
  color: #7f1d1d;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.action-btn {
  padding: 0.8rem 1.5rem;
  border-radius: 2rem;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.1);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}

.action-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.settings-section {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.settings-grid {
  display: flex;
  gap: 1rem;
}

.settings-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

.settings-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.info-section {
  margin-top: 4rem;
  background: var(--bg-panel);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.info-section h3 {
  color: var(--accent);
  margin-bottom: 1.5rem;
  text-align: center;
}

.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .fortune-section {
    grid-template-columns: 1fr;
  }
  
  .title-japanese {
    font-size: 2.5rem;
  }
}
