/* ═══════════════════════════════════════════════════════════════
   HumanizeAI v3 — 3 Menu Premium Dark Theme
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #111128;
  --bg-card: rgba(22, 22, 50, 0.6);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(129, 140, 248, 0.5);
  --text-primary: #e8e8f0;
  --text-secondary: #9898b8;
  --text-muted: #6a6a88;
  --accent-1: #818cf8;
  --accent-2: #c084fc;
  --accent-gradient: linear-gradient(135deg, #818cf8, #c084fc);
  --success: #34d399;
  --error: #f87171;
  --warning: #fbbf24;
  --color-grammar: #34d399;
  --color-professional: #60a5fa;
  --color-summarize: #fbbf24;
  --color-expand: #f472b6;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-glow: 0 0 40px rgba(129, 140, 248, 0.15);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ─── Background ────────────────────────────────────────────── */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(168, 85, 247, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
}

.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(99, 102, 241, 0.15);
  top: -100px;
  left: -100px;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: rgba(168, 85, 247, 0.12);
  top: 50%;
  right: -80px;
  animation-delay: -7s;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: rgba(59, 130, 246, 0.1);
  bottom: -100px;
  left: 30%;
  animation-delay: -14s;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(30px, -30px) scale(1.05);
  }

  50% {
    transform: translate(-20px, 20px) scale(0.95);
  }

  75% {
    transform: translate(15px, 10px) scale(1.02);
  }
}

/* ─── Container ─────────────────────────────────────────────── */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Header ────────────────────────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon {
  display: flex;
  align-items: center;
  animation: pulse-subtle 3s ease-in-out infinite;
}

@keyframes pulse-subtle {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-tagline {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.header-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 100px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
  animation: blink 1.5s ease-in-out infinite;
}

.badge-dot.connected {
  background: var(--success);
  animation: none;
}

.badge-dot.error {
  background: var(--error);
  animation: none;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

/* ─── Navigation — 3 Tabs ───────────────────────────────────── */
.nav-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.nav-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.nav-tab:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
}

.nav-tab.active {
  color: white;
  background: var(--accent-gradient);
  box-shadow: 0 4px 20px rgba(129, 140, 248, 0.3);
}

.nav-tab svg {
  flex-shrink: 0;
}

/* ─── Page ──────────────────────────────────────────────────── */
.page-content {
  flex: 1;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Upload ────────────────────────────────────────────────── */
.upload-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 36px;
  margin-bottom: 32px;
}

.upload-zone {
  border: 2px dashed rgba(129, 140, 248, 0.3);
  border-radius: var(--radius-lg);
  padding: 48px 36px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.upload-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s;
}

.upload-zone:hover {
  border-color: var(--accent-1);
  transform: translateY(-2px);
}

.upload-zone:hover::before {
  opacity: 0.03;
}

.upload-zone.drag-over {
  border-color: var(--accent-2);
  background: rgba(129, 140, 248, 0.05);
  transform: scale(1.01);
}

.upload-zone-sm {
  padding: 32px 24px;
}

.upload-icon {
  margin-bottom: 14px;
  opacity: 0.7;
  transition: var(--transition-smooth);
}

.upload-zone:hover .upload-icon {
  opacity: 1;
  transform: translateY(-3px);
}

.upload-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.upload-subtitle {
  color: var(--text-secondary);
  font-size: 0.86rem;
  margin-bottom: 14px;
}

.upload-formats {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 8px;
}

.format-badge {
  padding: 3px 12px;
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-1);
  letter-spacing: 0.5px;
}

.upload-limit {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ─── File Info ────────────────────────────────────────────── */
.file-info {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  margin-top: 16px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.file-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: rgba(129, 140, 248, 0.1);
  border-radius: var(--radius-sm);
  color: var(--accent-1);
}

.file-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.file-name {
  font-weight: 600;
  font-size: 0.88rem;
}

.file-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.file-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.file-remove:hover {
  color: var(--error);
  background: rgba(248, 113, 113, 0.1);
}

/* ─── Primary Button ────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  padding: 16px;
  margin-top: 18px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(129, 140, 248, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  50% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* ─── Processing ────────────────────────────────────────────── */
.processing-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}

.processing-card {
  text-align: center;
  padding: 50px 36px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.processing-animation {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent-1);
  opacity: 0;
  animation: pulseRing 2s ease-out infinite;
}

.delay-1 {
  animation-delay: 0.6s;
}

.delay-2 {
  animation-delay: 1.2s;
}

@keyframes pulseRing {
  0% {
    transform: scale(0.5);
    opacity: 0.8;
  }

  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.processing-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gradient);
  border-radius: 50%;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.processing-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.processing-subtitle {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 0.88rem;
}

.progress-bar-wrapper {
  height: 6px;
  background: rgba(129, 140, 248, 0.1);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  border-radius: 100px;
  transition: width 0.5s ease;
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 1.5s ease-in-out infinite;
}

/* ─── Result ────────────────────────────────────────────────── */
.result-section {
  animation: fadeIn 0.5s ease;
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-item {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  text-align: center;
}

.stat-item.highlight {
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.05);
}

.stat-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.stat-value {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
}

.stat-success {
  color: var(--success);
  font-size: 0.95rem;
}

/* ─── Comparison ────────────────────────────────────────────── */
.comparison-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.comparison-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.comparison-panel.humanized {
  border-color: rgba(129, 140, 248, 0.2);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-glass);
}

.panel-header h3 {
  font-size: 0.88rem;
  font-weight: 700;
}

.btn-copy {
  background: none;
  border: 1px solid var(--border-glass);
  cursor: pointer;
  color: var(--text-muted);
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  font-family: 'Inter', sans-serif;
}

.btn-copy:hover {
  color: var(--accent-1);
  border-color: var(--accent-1);
  background: rgba(129, 140, 248, 0.05);
}

.btn-copy.copied {
  color: var(--success);
  border-color: var(--success);
}

.panel-content {
  padding: 18px;
  max-height: 380px;
  overflow-y: auto;
  font-size: 0.86rem;
  line-height: 1.8;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.panel-content::-webkit-scrollbar {
  width: 5px;
}

.panel-content::-webkit-scrollbar-track {
  background: transparent;
}

.panel-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* ─── Action Buttons ────────────────────────────────────────── */
.action-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-download {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(129, 140, 248, 0.4);
}

.btn-secondary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  border-color: var(--accent-1);
  background: rgba(129, 140, 248, 0.05);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════════
   AI DETECTOR — Gauge, Indicators, Reasons
   ═══════════════════════════════════════════════════════════════ */

.page-title {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 6px;
}

.page-desc {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

/* Detector Card */
.detector-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 28px;
}

/* Detector Sub-tabs */
.detector-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.det-tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.det-tab:hover {
  color: var(--text-secondary);
}

.det-tab.active {
  color: white;
  background: rgba(129, 140, 248, 0.2);
}

.det-mode {
  animation: fadeIn 0.2s ease;
}

/* Text Input */
.text-input {
  width: 100%;
  min-height: 200px;
  padding: 18px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  line-height: 1.8;
  resize: vertical;
  transition: var(--transition-fast);
}

.text-input:focus {
  outline: none;
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1);
}

.text-input::placeholder {
  color: var(--text-muted);
}

/* Detection Result Gauge */
.detection-result-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 36px;
  text-align: center;
  margin-bottom: 20px;
}

.gauge-container {
  position: relative;
  width: 220px;
  height: 130px;
  margin: 0 auto 20px;
}

.gauge-svg {
  width: 100%;
  height: 100%;
}

.gauge-score {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--text-primary);
}

.gauge-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 16px;
}

.verdict-badge {
  display: inline-block;
  padding: 8px 24px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.verdict-badge.human {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.verdict-badge.probably-human {
  background: rgba(52, 211, 153, 0.1);
  color: #6ee7b7;
  border: 1px solid rgba(110, 231, 183, 0.3);
}

.verdict-badge.mixed {
  background: rgba(251, 191, 36, 0.12);
  color: var(--warning);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.verdict-badge.probably-ai {
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(252, 165, 165, 0.3);
}

.verdict-badge.ai {
  background: rgba(248, 113, 113, 0.15);
  color: var(--error);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.verdict-summary {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
}

/* Indicator Bars */
.indicators-grid {
  display: grid;
  gap: 14px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.indicator-item {
  display: grid;
  grid-template-columns: 110px 1fr 40px;
  align-items: center;
  gap: 14px;
}

.indicator-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.indicator-bar-bg {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 100px;
  overflow: hidden;
}

.indicator-bar {
  height: 100%;
  border-radius: 100px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

.indicator-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
}

/* Reasons Card */
.reasons-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.reasons-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.reasons-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reasons-list li {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
  border-left: 3px solid var(--accent-1);
}

/* ═══════════════════════════════════════════════════════════════
   ALAT PINTAR
   ═══════════════════════════════════════════════════════════════ */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.tool-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.tool-card[data-tool="grammar"]::before {
  background: var(--color-grammar);
}

.tool-card[data-tool="professional"]::before {
  background: var(--color-professional);
}

.tool-card[data-tool="summarize"]::before {
  background: var(--color-summarize);
}

.tool-card[data-tool="expand"]::before {
  background: var(--color-expand);
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-glow);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  transition: var(--transition-smooth);
}

.grammar-icon {
  background: rgba(52, 211, 153, 0.1);
  color: var(--color-grammar);
}

.professional-icon {
  background: rgba(96, 165, 250, 0.1);
  color: var(--color-professional);
}

.summarize-icon {
  background: rgba(251, 191, 36, 0.1);
  color: var(--color-summarize);
}

.expand-icon {
  background: rgba(244, 114, 182, 0.1);
  color: var(--color-expand);
}

.tool-card:hover .tool-card-icon {
  transform: scale(1.1);
}

.tool-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.tool-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.tool-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tool-card[data-tool="grammar"] .tool-badge {
  background: rgba(52, 211, 153, 0.1);
  color: var(--color-grammar);
}

.tool-card[data-tool="professional"] .tool-badge {
  background: rgba(96, 165, 250, 0.1);
  color: var(--color-professional);
}

.tool-card[data-tool="summarize"] .tool-badge {
  background: rgba(251, 191, 36, 0.1);
  color: var(--color-summarize);
}

.tool-card[data-tool="expand"] .tool-badge {
  background: rgba(244, 114, 182, 0.1);
  color: var(--color-expand);
}

/* Tool Input */
.tool-input-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.btn-back {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-back:hover {
  color: var(--text-primary);
  border-color: var(--accent-1);
}

.tool-active-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
}

.tool-active-icon {
  font-size: 1.2rem;
}

.tool-workspace {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.textarea-panel {
  margin-bottom: 4px;
}

.textarea-panel .panel-header {
  padding: 0 0 12px 0;
  border-bottom: none;
}

.char-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-process {
  margin-top: 14px;
}

/* ─── Footer ────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: auto;
}

/* ─── Toast ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 24px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.error {
  border-color: rgba(248, 113, 113, 0.3);
}

.toast.success {
  border-color: rgba(52, 211, 153, 0.3);
}

.hidden {
  display: none !important;
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .app-container {
    padding: 14px 10px;
  }

  .header {
    flex-direction: column;
    gap: 10px;
    padding: 14px;
  }

  .nav-tabs {
    gap: 2px;
    padding: 3px;
  }

  .nav-tab {
    padding: 10px 8px;
    font-size: 0.78rem;
    gap: 5px;
  }

  .nav-tab svg {
    width: 16px;
    height: 16px;
  }

  .upload-card,
  .detector-card {
    padding: 20px;
  }

  .upload-zone {
    padding: 32px 16px;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .comparison-container {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    flex-direction: column;
  }

  .btn-download,
  .btn-secondary {
    justify-content: center;
  }

  .indicator-item {
    grid-template-columns: 90px 1fr 36px;
    gap: 8px;
  }
}