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

:root {
  --yellow-primary: #f9e262;
  --yellow-light: #fff9c4;
  --yellow-dark: #e6c84a;
  --teal-light: #e0f7fa;
  --teal-dark: #00796b;
  --text-dark: #1a1a1a;
  --text-muted: #555;
  --white: #ffffff;
  --shadow-offset: 6px;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--yellow-primary);
  min-height: 100vh;
  color: var(--text-dark);
}

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background: var(--text-dark);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-text {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
}

.badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(249, 226, 98, 0.15);
  border: 1px solid var(--yellow-primary);
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  font-size: 0.75rem;
  color: var(--yellow-primary);
  font-weight: 500;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--yellow-primary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stage-container {
  width: 100%;
  max-width: 800px;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.highlight {
  position: relative;
  display: inline-block;
}

.highlight::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -4px;
  right: -4px;
  height: 35%;
  background: rgba(0, 121, 107, 0.2);
  z-index: -1;
  transform: skewX(-3deg);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* Input Card */
.input-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0px rgba(0, 0, 0, 0.12);
  border: 3px solid var(--text-dark);
}

.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.upload-icon {
  width: 64px;
  height: 64px;
  background: var(--yellow-light);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1rem;
  border: 2px dashed var(--yellow-dark);
}

.upload-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.upload-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 400px;
  margin-bottom: 1.5rem;
}

.text-input {
  width: 100%;
  padding: 1rem;
  border: 2px dashed #ccc;
  border-radius: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  resize: vertical;
  min-height: 180px;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.text-input:focus {
  outline: none;
  border-color: var(--teal-dark);
  box-shadow: 0 0 0 3px rgba(0, 121, 107, 0.1);
}

.text-input::placeholder {
  color: #999;
}

.submit-btn {
  background: var(--yellow-primary);
  border: 3px solid var(--text-dark);
  padding: 0.9rem 2rem;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 4px 4px 0px var(--text-dark);
}

.submit-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--text-dark);
}

.submit-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px var(--text-dark);
}

/* Loading Card */
.loading-card {
  background: var(--white);
  border-radius: 20px;
  padding: 3rem 2rem;
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0px rgba(0, 0, 0, 0.12);
  border: 3px solid var(--text-dark);
  text-align: center;
}

.banana-spinner {
  font-size: 4rem;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-bottom: 1.5rem;
}

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

.loading-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.loading-message {
  font-size: 1.1rem;
  color: var(--teal-dark);
  font-weight: 500;
  min-height: 1.5em;
}

.progress-bar {
  width: 100%;
  max-width: 300px;
  height: 8px;
  background: #eee;
  border-radius: 10px;
  margin: 1.5rem auto 0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--yellow-primary), var(--teal-dark));
  border-radius: 10px;
  transition: width 0.5s ease-out;
}

/* Result Card */
.result-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0px rgba(0, 0, 0, 0.12);
  border: 3px solid var(--text-dark);
}

.infographic-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 3px dashed var(--yellow-dark);
}

.infographic-badge {
  display: inline-block;
  background: var(--yellow-light);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  border: 2px solid var(--yellow-dark);
}

.infographic-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  color: var(--text-dark);
}

.sections-grid {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (min-width: 600px) {
  .sections-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.section-card {
  background: var(--teal-light);
  border-radius: 12px;
  padding: 1.25rem;
  border: 2px solid rgba(0, 121, 107, 0.2);
}

.section-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(0, 121, 107, 0.3);
}

.section-points {
  list-style: none;
}

.section-point {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.point-marker {
  flex-shrink: 0;
}

/* Metrics Section */
.metrics-section {
  background: var(--yellow-light);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 2px solid var(--yellow-dark);
}

.metrics-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

.metrics-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.metric-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.metric-name {
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 120px;
}

.metric-bar {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  color: var(--teal-dark);
  white-space: nowrap;
}

.disclaimer {
  text-align: center;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-muted);
}

/* Action Buttons */
.action-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.action-btn {
  padding: 0.8rem 1.5rem;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  border: 3px solid var(--text-dark);
}

.action-btn.primary {
  background: var(--yellow-primary);
  box-shadow: 4px 4px 0px var(--text-dark);
}

.action-btn.secondary {
  background: var(--white);
  box-shadow: 4px 4px 0px var(--text-dark);
}

.action-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--text-dark);
}

.action-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px var(--text-dark);
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 1.5rem;
  margin-top: auto;
}

.footer-trust {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.footer-note {
  font-weight: 400;
  font-style: italic;
}

.footer-powered {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-link {
  color: var(--teal-dark);
  text-decoration: none;
  font-weight: 600;
}

.footer-link:hover {
  text-decoration: underline;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.4s ease-out;
}

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

/* Responsive */
@media (max-width: 480px) {
  .header-content {
    justify-content: center;
  }
  
  .input-card,
  .loading-card,
  .result-card {
    padding: 1.25rem;
  }
  
  .metric-row {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .metric-bar {
    font-size: 0.75rem;
  }
}