/* ─── Chaldean Numerology Calculator – Custom Styles ─────────────────────── */

/* CSS Variables */
:root {
  --color-primary: #6C3EF5;
  --color-primary-dk: #5228E8;
  --color-accent: #F5A623;
  --color-bg: #F9FAFB;
  --color-surface: #FFFFFF;
  --color-border: #E5E7EB;
  --color-text: #1F2937;
  --color-muted: #6B7280;
  --radius-card: 1rem;
  --shadow-card: 0 2px 20px rgba(108, 62, 245, 0.08);
  --shadow-result: 0 4px 30px rgba(108, 62, 245, 0.15);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark {
  --color-bg: #0F0F1A;
  --color-surface: #1A1A2E;
  --color-border: #2D2D44;
  --color-text: #F3F4F6;
  --color-muted: #9CA3AF;
  --shadow-card: 0 2px 20px rgba(0, 0, 0, 0.4);
  --shadow-result: 0 4px 30px rgba(108, 62, 245, 0.25);
}

/* ─── Base ─ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Smooth scrollbar in Firefox */
html {
  scrollbar-color: var(--color-primary) var(--color-bg);
  scrollbar-width: thin;
}

/* ─── Cards ─ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.75rem;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-result);
}

/* ─── Tool Card (homepage grid) ─ */
.tool-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  transition: var(--transition);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tool-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-result);
  transform: translateY(-3px);
}

.tool-card .icon {
  font-size: 2rem;
  line-height: 1;
}

.tool-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

.tool-card p {
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* ─── Form Elements ─ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text);
}

.form-input {
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: 0.625rem;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(108, 62, 245, 0.15);
}

.form-input::placeholder {
  color: var(--color-muted);
}

/* ─── Primary Button ─ */
.btn-primary {
  background: linear-gradient(135deg, #6C3EF5 0%, #8B62F8 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 2rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 14px rgba(108, 62, 245, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(108, 62, 245, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ─── Result Panel ─ */
.result-panel {
  background: linear-gradient(135deg, rgba(108, 62, 245, 0.08), rgba(245, 166, 35, 0.06));
  border: 1.5px solid rgba(108, 62, 245, 0.2);
  border-radius: var(--radius-card);
  padding: 1.75rem;
  margin-top: 1.5rem;
  box-shadow: var(--shadow-result);
}

.dark .result-panel {
  background: linear-gradient(135deg, rgba(108, 62, 245, 0.15), rgba(245, 166, 35, 0.08));
}

/* ─── Number Badge ─ */
.num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6C3EF5, #8B62F8);
  color: white;
  box-shadow: 0 4px 12px rgba(108, 62, 245, 0.35);
  flex-shrink: 0;
}

/* ─── Result Row ─ */
.result-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.result-row:last-child {
  border-bottom: none;
}

.result-row .label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-row .value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
}

/* ─── Pill tags (lucky colors, days, etc.) ─ */
.pill {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(108, 62, 245, 0.12);
  color: var(--color-primary);
  margin: 0.2rem;
  border: 1px solid rgba(108, 62, 245, 0.2);
}

.dark .pill {
  background: rgba(108, 62, 245, 0.25);
  color: #c4b5fd;
}

/* ─── Progress Bar (compatibility) ─ */
.compat-bar-wrap {
  background: var(--color-border);
  border-radius: 9999px;
  height: 0.625rem;
  overflow: hidden;
  width: 100%;
}

.compat-bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #6C3EF5, #F5A623);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Section Heading ─ */
.section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

/* ─── Hero ─ */
.hero-gradient {
  background: linear-gradient(135deg, #6C3EF5 0%, #3B82F6 50%, #8B5CF6 100%);
}

/* ─── Loading Spinner ─ */
.spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─── Fade-in animation ─ */
.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Responsive Form Grid ─ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ─── Sticky Sidebar (desktop only, used in master report) ─ */
@media (min-width: 1024px) {
  .layout-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
  }

  .sticky-sidebar {
    position: sticky;
    top: 5rem;
  }
}

/* ─── AdSense Placeholders ─ */
.adsense-box {
  transition: var(--transition);
}

.adsense-box:hover {
  border-color: var(--color-primary);
  background-color: rgba(108, 62, 245, 0.03);
}

/* ─── Logo Responsive ─ */
header img {
  object-fit: contain;
}

@media (max-width: 640px) {
  header img {
    height: 2rem;
  }
}

/* ─── Print Styles ─ */
@media print {

  header,
  footer,
  nav,
  .btn-primary,
  .mobile-bottom-nav,
  .adsense-box {
    display: none !important;
  }

  .result-panel {
    border: 1px solid #ddd;
    box-shadow: none;
  }

  body {
    color: #000;
    background: #fff;
  }
}