/* ============================================================
   base.css - reset, custom properties, body, global animations
   ============================================================ */

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

:root {
  /* backgrounds */
  --bg-base:        #070712;
  --surface:        rgba(16,15,34,0.93);
  --surface-raised: rgba(26,24,52,0.82);

  /* borders */
  --border:         rgba(255,255,255,0.08);

  /* accent - purple */
  --accent:         #8b5cf6;
  --accent-mid:     #7c3aed;
  --accent-deep:    #5b21b6;
  --accent-glow:    rgba(139,92,246,0.22);

  /* controls */
  --button-bg:          linear-gradient(160deg, #9f73ff 0%, #7c3aed 52%, #5b21b6 100%);
  --button-bg-hover:    linear-gradient(160deg, #b08dff 0%, #8b5cf6 52%, #6d28d9 100%);
  --button-border:      rgba(255,255,255,0.1);
  --button-shadow:      0 1px 0 rgba(255,255,255,0.15) inset, 0 4px 20px rgba(124,58,237,0.4);
  --button-shadow-hover: 0 1px 0 rgba(255,255,255,0.15) inset, 0 10px 36px rgba(124,58,237,0.54);
  --button-focus:       0 0 0 3px rgba(139,92,246,0.28);

  /* semantic colours */
  --green:  #34d399;
  --amber:  #fbbf24;
  --red:    #f87171;
  --blue:   #60a5fa;

  /* typography */
  --text-primary:   #f5f3ff;
  --text-secondary: #c4c0e0;
  --text-muted:     #9896b4;

  /* radii */
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm:  7px;

  /* easings */
  --ease-spring: cubic-bezier(0.34,1.56,0.64,1);
  --ease-out:    cubic-bezier(0.16,1,0.3,1);
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-base);
  background-image:
    radial-gradient(ellipse 80% 45% at 50% -5%,  rgba(100,55,220,0.22) 0%, transparent 70%),
    radial-gradient(ellipse 40% 25% at 85%  95%, rgba(60,25,140,0.13)  0%, transparent 60%);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 32px 20px;
}

.tool-shell {
  width: min(510px, calc(100vw - 40px));
  max-width: 100%;
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Shared animations */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes ring-pulse {
  0%   { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(1.9); opacity: 0;   }
}

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

@media (max-width: 480px) {
  body {
    padding: 28px 14px;
  }

  .tool-shell {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
    min-height: calc(100vh - 56px);
  }
}

/* Utility */
.hidden { display: none !important; }
