/* =============================================================
   Mind Fitness — Shared Base CSS
   Import this BEFORE your tool's theme CSS.
   Each tool overrides --mf-* variables for its own theme.
   ============================================================= */

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Prompt', sans-serif;
  color: var(--mf-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- Screen System ---
   Usage: <div class="screen active" id="screen-xxx">
   Toggle .active to switch screens.
*/
.screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  z-index: 10;
  overflow-y: auto;
  padding: 20px;
}

.screen.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* --- Buttons ---
   Colors come from each tool's theme variables.
*/
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  background: var(--mf-accent);
  color: var(--mf-btn-text, #fff);
  border: none;
  border-radius: 50px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--mf-accent-glow, rgba(0,0,0,0.15));
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background: transparent;
  color: var(--mf-text);
  border: 1.5px solid var(--mf-border);
  border-radius: 50px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}

.btn-secondary:hover {
  border-color: var(--mf-accent);
  color: var(--mf-accent);
}

.btn-link {
  color: var(--mf-text-dim, #999);
  text-decoration: none;
  font-size: 14px;
  padding: 8px;
  transition: color 0.3s ease;
  display: inline-block;
}

.btn-link:hover {
  color: var(--mf-accent);
}

.btn-glow {
  box-shadow: 0 4px 20px var(--mf-accent-glow, rgba(0,0,0,0.1));
}

.btn-small {
  padding: 8px 20px;
  font-size: 14px;
}

/* --- Animations --- */
@keyframes mf-fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes mf-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

@keyframes mf-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

.anim-fade-up {
  animation: mf-fadeUp 0.7s ease forwards;
}

.anim-float {
  animation: mf-float 4s ease-in-out infinite;
}

.anim-pulse {
  animation: mf-pulse 2s ease-in-out infinite;
}

/* --- Section Titles --- */
.section-title {
  font-family: 'Prompt', sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-desc {
  font-size: 15px;
  color: var(--mf-text-secondary, #888);
  margin-bottom: 24px;
}

/* --- Result Actions Container --- */
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

/* --- Hub Back Link --- */
.hub-back-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 13px;
  color: var(--mf-text-dim, #999);
  text-decoration: none;
  transition: color 0.3s ease;
}

.hub-back-link:hover {
  color: var(--mf-accent);
}

/* --- Responsive Base --- */
@media (max-width: 480px) {
  .section-title {
    font-size: 20px;
  }

  .btn-primary {
    padding: 12px 28px;
    font-size: 16px;
  }
}
