/* ===========================
   Pop-Kawaii Fortune Telling
   =========================== */

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

:root {
  --bg: #FFF5F0;
  --primary: #FF6B6B;
  --secondary: #4ECDC4;
  --accent: #FFE66D;
  --text: #2C3E50;
  --white: #FFFFFF;
  --shadow: rgba(255, 107, 107, 0.15);
  --shadow-soft: rgba(0, 0, 0, 0.06);
  --radius-card: 20px;
  --radius-btn: 50px;
  --radius-sm: 12px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'M PLUS Rounded 1c', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
  padding-bottom: 40px;
}

/* ---- Header ---- */
.header {
  text-align: center;
  padding: 40px 0 24px;
}

.header-star {
  font-size: 56px;
  line-height: 1;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.header-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 8px;
  letter-spacing: 0.02em;
}

.header-subtitle {
  font-size: 14px;
  color: #888;
  margin-top: 4px;
  font-weight: 400;
}

.header-deco {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 16px;
  color: var(--accent);
}

/* ---- Zodiac Grid ---- */
.zodiac-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-bottom: 24px;
}

.zodiac-card {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 18px 8px 14px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 12px var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.zodiac-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--shadow);
}

.zodiac-card:active {
  transform: scale(0.96);
}

.zodiac-icon {
  font-size: 36px;
  line-height: 1;
  display: block;
}

.zodiac-name {
  font-size: 14px;
  font-weight: 700;
  margin-top: 6px;
  color: var(--text);
}

.zodiac-dates {
  font-size: 10px;
  color: #aaa;
  margin-top: 2px;
  line-height: 1.3;
}

/* ---- Result Panel ---- */
.result-panel {
  display: none;
  padding-bottom: 24px;
}

.result-panel.active {
  display: block;
  animation: slideUp 0.45s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-inner {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 28px 20px 24px;
  box-shadow: 0 4px 24px var(--shadow);
}

.result-header {
  text-align: center;
  margin-bottom: 20px;
}

.result-emoji {
  font-size: 52px;
  line-height: 1;
  display: block;
}

.result-sign-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 8px;
}

.result-date-range {
  font-size: 12px;
  color: #aaa;
  margin-top: 2px;
}

/* Overall Rating */
.result-overall {
  text-align: center;
  margin-bottom: 16px;
}

.result-label {
  font-size: 13px;
  font-weight: 700;
  color: #888;
  margin-bottom: 4px;
}

.result-stars {
  font-size: 26px;
  letter-spacing: 2px;
  color: var(--accent);
}

.result-stars .star-empty {
  opacity: 0.25;
}

/* Message Box */
.result-message-box {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
}

.result-message {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
}

/* Category Cards */
.result-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.category-card {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px 6px 10px;
  text-align: center;
}

.category-emoji {
  font-size: 24px;
  line-height: 1;
  display: block;
}

.category-name {
  font-size: 11px;
  font-weight: 700;
  color: #888;
  margin-top: 4px;
  margin-bottom: 4px;
}

.category-stars {
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--accent);
}

.category-stars .star-empty {
  opacity: 0.25;
}

/* Lucky Section */
.result-lucky {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.lucky-item {
  flex: 1;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.lucky-label {
  font-size: 11px;
  font-weight: 700;
  color: #888;
  margin-bottom: 6px;
}

.lucky-color-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.lucky-color-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid rgba(0,0,0,0.08);
}

.lucky-color-name {
  font-size: 13px;
  font-weight: 700;
}

.lucky-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

/* Lucky Meter */
.result-lucky-meter {
  text-align: center;
  margin-bottom: 24px;
}

.lucky-meter-label {
  font-size: 13px;
  font-weight: 700;
  color: #888;
  margin-bottom: 6px;
}

.lucky-hearts {
  font-size: 22px;
  letter-spacing: 3px;
}

.lucky-hearts .heart-full {
  color: var(--primary);
}

.lucky-hearts .heart-empty {
  color: var(--primary);
  opacity: 0.2;
}

/* Retry Button */
.btn-retry {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: var(--white);
  font-family: 'M PLUS Rounded 1c', sans-serif;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-retry:hover {
  background: #ff5252;
}

.btn-retry:active {
  transform: scale(0.97);
}

/* ---- Footer ---- */
.footer {
  text-align: center;
  padding: 32px 0 16px;
}

.footer-deco {
  font-size: 18px;
  letter-spacing: 6px;
  margin-bottom: 8px;
}

.footer-text {
  font-size: 12px;
  color: #bbb;
}

.footer-copy {
  font-size: 11px;
  color: #ccc;
  margin-top: 4px;
}

/* ---- Hidden State ---- */
.zodiac-grid.hidden {
  display: none;
}

/* ---- Responsive tweaks ---- */
@media (max-width: 360px) {
  .zodiac-card {
    padding: 14px 4px 10px;
  }
  .zodiac-icon {
    font-size: 28px;
  }
  .zodiac-name {
    font-size: 12px;
  }
  .result-inner {
    padding: 24px 16px 20px;
  }
}
