/* Minimal reset */
* { box-sizing: border-box; }
html,body,#root { height: 100%; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial; }

/* Theme variables - these will be updated dynamically by theme-from-favicon.js to match assets/favicon.jpg */
:root {
  --theme-bg-from: #6d28d9; /* fallback primary */
  --theme-bg-to: #06b6d4;   /* fallback secondary */
  --theme-accent: #f59e0b;  /* accent (e.g., buttons) */
  --theme-on-primary: #ffffff; /* text color on primary */
  --toast-bg: #10b981; /* fallback toast */
}

/* Use the theme for page background so it matches favicon colors */
body {
  background: linear-gradient(180deg,var(--theme-bg-from),var(--theme-bg-to));
}

/* Custom styles to approximate solo.to aesthetics */
.link-item { text-decoration: none; color: inherit; }

/* Dark mode fallback: slightly darken the theme colors when user prefers dark */
@media (prefers-color-scheme: dark) {
  body { background: linear-gradient(180deg,color-mix(in srgb, var(--theme-bg-from) 70%, black), color-mix(in srgb, var(--theme-bg-to) 70%, black)); }
}

/* Footer small adjustments */
footer a { color: inherit; }

/* Toast notification (bottom-right) */
.toast-container {
  position: fixed;
  right: 6px; /* flush to the right edge */
  bottom: 6px; /* flush to the bottom edge */
  z-index: 2147483647; /* very high to ensure visible */
  pointer-events: none; /* allow clicks pass-through unless on toast */
  transform: translateZ(0); /* promote to its own layer for consistent rendering */
}
.toast {
  pointer-events: auto; /* allow interaction with the toast itself */
  min-width: 260px;
  max-width: 380px;
  background: var(--toast-bg, #10b981); /* themed toast background */
  color: var(--theme-on-primary, #ffffff);
  padding: 12px 14px 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 10px 30px rgba(2,6,23,0.35);
  position: relative;
  overflow: hidden;
  font-weight: 600;
  backdrop-filter: none;
}
.toast .close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.95);
  font-size: 16px;
  cursor: pointer;
}
.toast .progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 5px;
  background: color-mix(in srgb, var(--toast-bg, #10b981) 70%, black);
  width: 100%;
  transform-origin: left center;
}
.toast .message { padding-right: 28px; }

.app-root { opacity: 0; transition: opacity 0.35s ease 0.05s; }
.app-root.visible { opacity: 1; }
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes float {
  0% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(-6px) rotate(8deg) scale(1.03); }
  100% { transform: translateY(0) rotate(0deg) scale(1); }
}

/* Respect user preference for reduced motion (kept globally if used elsewhere) */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}

/* Cube-card styles for policy pages */
.cube-wrap {
  perspective: 1100px;
  -webkit-perspective: 1100px;
}
.cube-card {
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transform: rotateX(-6deg) rotateY(8deg) translateZ(0);
  transition: transform 400ms cubic-bezier(.2,.9,.2,1), box-shadow 200ms;
  will-change: transform;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.86));
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(2,6,23,0.18), 0 6px 18px rgba(2,6,23,0.06);
}
.cube-card:hover {
  transform: rotateX(0deg) rotateY(0deg) translateY(-8px) translateZ(0);
  box-shadow: 0 28px 60px rgba(2,6,23,0.22), 0 10px 30px rgba(2,6,23,0.08);
}
.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: .5rem .9rem;
  border-radius: 999px;
  font-weight: 600;
}
.btn-primary {
  background: linear-gradient(90deg,var(--theme-bg-from),var(--theme-bg-to));
  color: var(--theme-on-primary, #ffffff);
}
.btn-outline {
  background: transparent;
  border: 1px solid rgba(0,0,0,0.06);
  color: inherit;
}
