

:root {
  --bg-color: linear-gradient(135deg, #f7f7fa 0%, #e0e0ff 100%);
  --accent-color: #6c63ff;
  --accent-color-alt: #2ec4b6;
  --accent-gradient: linear-gradient(90deg, #6c63ff 0%, #2ec4b6 100%);
  --text-color: #222;
  --card-bg: #fff;
  --card-radius: 18px;
  --card-shadow: 0 4px 24px rgba(75,60,250,0.10);
  --btn-radius: 28px;
  --btn-bg: var(--accent-gradient);
  --btn-bg-hover: linear-gradient(90deg, #574fd6 0%, #1fa9a2 100%);
  --btn-text: #fff;
  --input-bg: #f2f2fa;
  --input-border: #b3b3e6;
  --ad-bg: #ececf7;
  --ad-border: #b3b3e6;
  --footer-bg: #f2f2fa;
  --transition: 0.25s cubic-bezier(.4,0,.2,1);
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg-color);
  margin: 0;
  color: var(--text-color);
  min-height: 100vh;
  background-attachment: fixed;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5em 1em 2em 1em;
  animation: fadeIn 0.7s;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(108,99,255,0.08);
  background: rgba(255,255,255,0.85);
}
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.header {
  background: var(--card-bg);
  border-bottom: 1px solid #ececf7;
  padding: 0.5em 0;
  box-shadow: 0 2px 8px rgba(108,99,255,0.04);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1em;
}

.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.5em;
  color: var(--accent-color);
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(108,99,255,0.08);
}
.logo-text {
  margin-left: 6px;
}
.nav ul {
  list-style: none;
  display: flex;
  gap: 0.5em;
  margin: 0;
  padding: 0;
}

.nav ul li a {
  text-decoration: none;
  color: var(--accent-color);
  font-weight: 600;
  padding: 0.6em 1.2em;
  border-radius: var(--btn-radius);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  outline: none;
  box-shadow: 0 1px 4px rgba(108,99,255,0.05);
}
.nav ul li a:hover, .nav ul li a:focus {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(108,99,255,0.10);
}
.hero {
  text-align: center;
  margin: 2em 0 1.5em 0;
}

.hero-title {
  font-size: 2.3em;
  font-weight: 800;
  margin-bottom: 0.3em;
  color: var(--accent-color);
  text-shadow: 0 2px 8px rgba(108,99,255,0.10);
}
.hero-subtitle {
  font-size: 1.15em;
  color: #555;
  margin-bottom: 1.2em;
  font-weight: 500;
}

.btn {
  display: inline-block;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: var(--btn-radius);
  padding: 0.8em 2em;
  font-size: 1.08em;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 2px 12px rgba(108,99,255,0.10);
  outline: none;
  background-size: 200% 200%;
}
.btn-primary {
  background: var(--accent-gradient);
}
.btn:hover, .btn:focus {
  background: var(--btn-bg-hover);
  transform: scale(1.07);
  box-shadow: 0 4px 16px rgba(108,99,255,0.18);
}
.input {
  width: 100%;
  padding: 0.7em;
  border-radius: var(--btn-radius);
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  font-size: 1em;
  margin-bottom: 0.7em;
  transition: border var(--transition);
}
.input:focus {
  border-color: var(--accent-color);
  outline: none;
}

.card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 2em 1.5em;
  margin-bottom: 1.5em;
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
  border: 1.5px solid #ececf7;
  position: relative;
  overflow: hidden;
}
.card:before {
  content: "";
  position: absolute;
  top: -40px; left: -40px;
  width: 120px; height: 120px;
  background: var(--accent-gradient);
  opacity: 0.08;
  border-radius: 50%;
  z-index: 0;
}
.card:hover {
  box-shadow: 0 8px 32px rgba(108,99,255,0.18);
  transform: scale(1.03);
  border-color: var(--accent-color);
}
.card-tool {
  max-width: 420px;
  margin: 2em auto 1.5em auto;
}
.subtitle {
  color: #555;
  margin-bottom: 1em;
}

.result {
  font-size: 1.35em;
  font-weight: 600;
  margin-top: 1.2em;
  min-height: 2.2em;
  color: var(--accent-color);
  background: #f7f7fa;
  border-radius: var(--btn-radius);
  box-shadow: 0 2px 12px rgba(108,99,255,0.10);
  padding: 1em 1.2em;
  opacity: 0;
  transition: opacity 0.5s, transform 0.5s;
  transform: scale(0.98);
  letter-spacing: 0.5px;
}
.result.show {
  opacity: 1;
  transform: scale(1.04);
}

.ad-slot {
  background: var(--ad-bg);
  border: 2px dashed var(--ad-border);
  color: #888;
  text-align: center;
  border-radius: var(--card-radius);
  padding: 1.2em;
  margin: 1.5em 0;
  font-size: 1.08em;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(108,99,255,0.06);
}
.ad-slot-horizontal {
  margin-top: 0.5em;
  margin-bottom: 2em;
}
.ad-slot-bottom {
  margin-top: 2em;
}
.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2em;
  margin: 2em 0 1em 0;
}
@media (min-width: 600px) {
  .tools-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 900px) {
  .tools-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.footer {
  background: var(--footer-bg);
  border-top: 1px solid #ececf7;
  padding: 1em 0;
  margin-top: 2em;
}
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1em;
  color: #555;
  padding: 0 1em;
}
.footer-links a {
  color: var(--accent-color);
  text-decoration: none;
  margin: 0 0.5em;
  font-weight: 500;
}
.footer-links a:hover, .footer-links a:focus {
  text-decoration: underline;
}
.date {
  font-size: 1em;
  color: #666;
  margin-bottom: 1em;
}
.decision-section {
  margin-bottom: 1.5em;
}
.number-form, .choice-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5em;
  margin-top: 1em;
}
.mood-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 1.2em;
  padding: 0.4em 1em;
  border-radius: var(--btn-radius);
  background: #e0e0ff;
  color: var(--accent-color);
  margin-top: 0.7em;
}
.luck-bar {
  width: 100%;
  height: 12px;
  background: #ececf7;
  border-radius: 8px;
  margin-top: 0.7em;
  overflow: hidden;
}
.luck-bar-inner {
  height: 100%;
  border-radius: 8px;
  transition: width 0.5s;
}
.luck-low { background: #e57373; }
.luck-normal { background: #ffd54f; }
.luck-high { background: #81c784; }
.luck-chaos { background: #ba68c8; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
