:root {
  --bg: #05070a;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.1);
  --text: #ffffff;
  --text-dim: #94a3b8;
  --accent: #10b981; /* Emerald */
  --accent-glow: rgba(16, 185, 129, 0.3);
  --gold: #fbbf24;
  --gold-glow: rgba(251, 191, 36, 0.3);
  --danger: #ef4444;
  --glass: blur(12px);
  --radius: 16px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  background-image: 
    radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(251, 191, 36, 0.05) 0%, transparent 40%);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Typography */
h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-dim);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

/* Layout */
.app-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
}

@media (max-width: 1024px) {
  .app-grid {
    grid-template-columns: 1fr;
  }
}

/* Glass Card */
.card {
  background: var(--surface);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px border var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Input Zone */
.input-wrap {
  position: relative;
}

textarea {
  width: 100%;
  min-height: 400px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  transition: all 0.3s ease;
  outline: none;
}

textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.btn-analyze {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-analyze:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--accent-glow);
  filter: brightness(1.1);
}

/* Output Zone */
.output-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 640px) {
  .output-grid {
    grid-template-columns: 1fr;
  }
}

.field-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  transition: all 0.3s ease;
}

.field-card:hover {
  background: var(--surface-hover);
}

.field-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.field-value {
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  min-height: 1.5em;
}

.field-value:empty::before {
  content: '---';
  color: rgba(255, 255, 255, 0.1);
}

.btn-copy {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-copy:hover {
  color: var(--accent);
  background: rgba(16, 185, 129, 0.1);
}

/* Wide card for long content */
.field-card.wide {
  grid-column: span 2;
}

@media (max-width: 640px) {
  .field-card.wide {
    grid-column: span 1;
  }
}

/* Actions Header */
.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.action-btns {
  display: flex;
  gap: 10px;
}

.btn-outline {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(251, 191, 36, 0.05);
}

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

.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-left: 8px;
}

.badge-pure { background: rgba(16, 185, 129, 0.2); color: var(--accent); border: 1px solid var(--accent); }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }
