:root {
  /* Rose Pink Dark Theme */
  --bg-color: #1A0A10;
  --surface: rgba(43, 15, 27, 0.6);
  --surface-hover: rgba(65, 20, 40, 0.8);
  --border-color: rgba(244, 63, 94, 0.2);
  --border-highlight: rgba(244, 63, 94, 0.5);
  
  --primary: #F43F5E;
  --primary-hover: #E11D48;
  --secondary: #FB7185;
  --accent: #06B6D4;
  
  --text-main: #FFF1F2;
  --text-muted: #FECDD3;
  
  /* Diff Status Colors */
  --color-added: #10B981;
  --color-bg-added: rgba(16, 185, 129, 0.1);
  --color-removed: #EF4444;
  --color-bg-removed: rgba(239, 68, 68, 0.1);
  --color-modified: #F59E0B;
  --color-bg-modified: rgba(245, 158, 11, 0.1);
  --color-breaking: #DC2626;
  
  /* HTTP Method Colors */
  --method-get: #3B82F6;
  --method-post: #10B981;
  --method-put: #F59E0B;
  --method-delete: #EF4444;
  --method-patch: #8B5CF6;
  
  --radius: 12px;
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(244, 63, 94, 0.2);
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
  margin: 0;
}

/* Utilities */
.hidden { display: none !important; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-added { color: var(--color-added); }
.text-removed { color: var(--color-removed); }
.text-modified { color: var(--color-modified); }
.text-breaking { color: var(--color-breaking); font-weight: 600; }
.text-muted { color: var(--text-muted); }

/* Glassmorphism */
.glass-header, .glass-panel {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
}

.glass-panel {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* Typography */
h1 { font-size: 1.5rem; font-weight: 700; color: var(--text-main); }
h2 { font-size: 1.25rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }

/* Layout */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

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

.pulse-icon {
  animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
  0% { filter: drop-shadow(0 0 2px var(--primary)); }
  100% { filter: drop-shadow(0 0 10px var(--primary)); }
}

.header-actions {
  display: flex;
  gap: 1rem;
}

/* Buttons */
button, .btn-sm {
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  background: none;
  border-radius: 8px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  padding: 0.6rem 1.2rem;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.4);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 0 15px rgba(244, 63, 94, 0.6);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
}

.btn-outline {
  border: 1px solid var(--border-highlight);
  color: var(--text-main);
  padding: 0.6rem 1.2rem;
}
.btn-outline:hover {
  background-color: rgba(244, 63, 94, 0.1);
  border-color: var(--primary);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}
.btn-sm:hover {
  background: rgba(255, 255, 255, 0.1);
}

.file-upload { cursor: pointer; display: inline-block; }

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.main-content::-webkit-scrollbar { width: 8px; }
.main-content::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

/* Input Section */
.input-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.input-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.input-panel {
  display: flex;
  flex-direction: column;
  height: 50vh;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.input-panel textarea {
  flex: 1;
  width: 100%;
  background: transparent;
  border: none;
  padding: 1.5rem;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  resize: none;
  outline: none;
}
.input-panel textarea::placeholder { color: rgba(254, 205, 211, 0.4); }
.input-panel textarea::-webkit-scrollbar { width: 8px; }
.input-panel textarea::-webkit-scrollbar-thumb { background: var(--border-highlight); border-radius: 4px; }

/* Results Section */
.results-section {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.summary-card {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.alert-card { border-color: rgba(220, 38, 38, 0.5); background: rgba(220, 38, 38, 0.05); }

.summary-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.summary-icon.added { background: var(--color-bg-added); color: var(--color-added); }
.summary-icon.removed { background: var(--color-bg-removed); color: var(--color-removed); }
.summary-icon.modified { background: var(--color-bg-modified); color: var(--color-modified); }
.summary-icon.breaking { background: rgba(220, 38, 38, 0.2); color: var(--color-breaking); }

.summary-data { display: flex; flex-direction: column; }
.summary-label { font-size: 0.85rem; color: var(--text-muted); }
.summary-value { font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Filters Bar */
.filters-bar {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.filters-bar label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.filters-bar input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px; height: 16px;
  cursor: pointer;
}

.divider {
  width: 1px;
  height: 20px;
  background: var(--border-color);
}

/* Badges */
.badge {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-added { background: var(--color-bg-added); color: var(--color-added); border: 1px solid var(--color-added); }
.badge-removed { background: var(--color-bg-removed); color: var(--color-removed); border: 1px solid var(--color-removed); }
.badge-modified { background: var(--color-bg-modified); color: var(--color-modified); border: 1px solid var(--color-modified); }
.badge-breaking { background: rgba(220, 38, 38, 0.2); color: var(--color-breaking); border: 1px solid var(--color-breaking); animation: blink 2s infinite;}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

.method-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  width: 65px;
  text-align: center;
  padding: 0.25rem 0;
  border-radius: 4px;
  color: white;
}
.method-get { background: var(--method-get); }
.method-post { background: var(--method-post); }
.method-put { background: var(--method-put); }
.method-delete { background: var(--method-delete); }
.method-patch { background: var(--method-patch); }

/* Diff Container & Items */
.diff-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 3rem;
}

.diff-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: var(--transition);
}
.diff-item:hover { border-color: var(--border-highlight); }

/* States */
.diff-item.added .diff-header { border-left: 4px solid var(--color-added); }
.diff-item.removed .diff-header { border-left: 4px solid var(--color-removed); opacity: 0.8; }
.diff-item.modified .diff-header { border-left: 4px solid var(--color-modified); }

.diff-header {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  background: rgba(0,0,0,0.2);
}
.diff-header:hover { background: rgba(255,255,255,0.05); }

.path-text {
  font-family: var(--font-mono);
  font-size: 1rem;
  flex: 1;
}

.diff-body {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  background: rgba(0,0,0,0.4);
}

.change-log {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.change-log li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: rgba(255,255,255,0.05);
  padding: 0.75rem;
  border-radius: 6px;
}

.diff-plus { color: var(--color-added); font-weight: bold; }
.diff-minus { color: var(--color-removed); font-weight: bold; }
.diff-tilde { color: var(--color-modified); font-weight: bold; }

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-main);
  color: #000;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
}
.toast.hidden { transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; }
.toast.error { background: var(--color-removed); color: white; }

/* Responsive */
@media (max-width: 1024px) {
  .input-panels { grid-template-columns: 1fr; }
  .summary-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .summary-cards { grid-template-columns: 1fr; }
  .header-actions { display: none; }
  .diff-header { flex-wrap: wrap; }
}
