/* --- Design Token System --- */
:root {
  --bg-main: #0B0A11;
  --bg-card: rgba(20, 18, 30, 0.55);
  --border-card: rgba(255, 255, 255, 0.07);
  --border-active: rgba(139, 92, 246, 0.4);
  
  --primary: #8b5cf6;
  --primary-glow: rgba(139, 92, 246, 0.4);
  --primary-hover: #7c3aed;
  
  --success: #10b981;
  --success-hover: #059669;
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-link: #a78bfa;
  
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- Base Styles --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  padding: 3rem 1rem;
}

/* --- Atmospheric Glow Effects --- */
.background-glows {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
}

.glow-1 {
  top: -10%;
  left: 10%;
  width: 400px;
  height: 400px;
  background: var(--primary);
}

.glow-2 {
  bottom: 10%;
  right: 5%;
  width: 500px;
  height: 500px;
  background: #ec4899;
}

/* --- Main Layout Container --- */
.container {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  flex-grow: 1;
}

/* --- Header Section --- */
.app-header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.logo-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.logo-area .icon {
  font-size: 2.25rem;
}

.logo-area h1 {
  font-size: 2.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 30%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  color: var(--text-muted);
  font-size: 1.05rem;
  font-weight: 300;
}

/* --- Glassmorphic Card Styling --- */
.card {
  border-radius: 16px;
  padding: 2rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.glass {
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border-card);
}

.shadow {
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.card:hover {
  border-color: rgba(139, 92, 246, 0.2);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: #fff;
  border-left: 3px solid var(--primary);
  padding-left: 0.75rem;
}

/* --- Forms & Inputs --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  opacity: 0.9;
}

input[type="text"],
textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  padding: 0.75rem 1rem;
  font-family: var(--font-family);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
  background: rgba(0, 0, 0, 0.4);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.help-text {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* --- Buttons --- */
.btn {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 8px;
  border: none;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  height: 44px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.45);
}

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

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

/* --- Results Table --- */
.results-table-wrapper {
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.results-table th,
.results-table td {
  padding: 12px 10px;
}

.results-table th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

/* --- Loader Animation --- */
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Footer --- */
.app-footer {
  text-align: center;
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.creator {
  color: var(--text-link);
  font-weight: 500;
}

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