:root {
  --bg-color: #0A1A18; /* Dark teal background */
  --bg-surface: rgba(15, 35, 32, 0.7);
  --bg-surface-hover: rgba(20, 45, 42, 0.8);
  --border-color: rgba(20, 184, 166, 0.2);
  --border-highlight: rgba(20, 184, 166, 0.5);
  
  --primary: #14B8A6;       /* Teal Cyan */
  --primary-hover: #0D9488;
  --secondary: #2DD4BF;
  --accent: #EC4899;        /* Pink accent */
  
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  
  /* Category Colors */
  --color-js: #FBBF24;
  --color-css: #3B82F6;
  --color-img: #A855F7;
  --color-font: #EC4899;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 15px rgba(20, 184, 166, 0.15);
  
  --transition: all 0.2s ease;
  --font-sans: 'Inter', system-ui, sans-serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-image: 
    radial-gradient(ellipse at top right, rgba(236, 72, 153, 0.05) 0%, transparent 40%),
    radial-gradient(circle at bottom left, rgba(20, 184, 166, 0.05) 0%, transparent 40%);
}

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

/* Utilities */
.hidden { display: none !important; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.85rem; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.pt-4 { padding-top: 1rem; }
.border-t { border-top: 1px solid var(--border-color); }
.w-full { width: 100%; }
.flex-1 { flex: 1; }
.flex-col { display: flex; flex-direction: column; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-4 { gap: 1rem; }
.relative { position: relative; }
.scrollable { overflow-y: auto; }

/* Layout */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 1rem;
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-glow);
}

.logo { display: flex; align-items: center; gap: 0.75rem; }
.logo h1 { font-size: 1.35rem; font-weight: 700; background: linear-gradient(90deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent;}

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

.main-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  min-height: 0;
}

/* Overview Section */
.overview-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  flex-shrink: 0;
}
.stat-card {
    padding: 1.25rem;
    position: relative;
}
.stat-card.has-border {
    border: 1px solid var(--border-highlight);
    box-shadow: var(--shadow-glow);
}
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0.5rem;
    font-feature-settings: "tnum" on, "lnum" on;
}
.health-indicator {
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Grid Layout */
.grid-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1rem;
    flex: 1;
    min-height: 0;
}

/* Left components */
.drop-zone {
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px dashed var(--primary);
    transition: var(--transition);
    flex-shrink: 0;
}
.drop-zone.dragover {
    background: rgba(20, 184, 166, 0.1);
    border-color: var(--secondary);
    transform: scale(1.02);
}
.drop-zone h3 { margin-top: 1rem; font-size: 1.2rem; }

.panel-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.panel-header h2 { font-size: 1.1rem; font-weight: 600; }
.panel-body { padding: 1.5rem; }

.category-list { display: flex; flex-direction: column; gap: 1.5rem; padding-bottom: 2rem !important;}

.category-item { display: flex; flex-direction: column; gap: 0.5rem; }
.cat-header { display: flex; align-items: center; gap: 0.75rem; }
.cat-icon { 
    display: flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; color: white;
}
.type-js { background: var(--color-js); color: black;}
.type-css { background: var(--color-css); }
.type-img { background: var(--color-img); }
.type-font { background: var(--color-font); color: black;}

.cat-name { font-weight: 500; }
.cat-stats { margin-left: auto; font-size: 0.9rem; font-family: monospace; font-variant-numeric: tabular-nums;}
.cat-stats .text-danger, .cat-stats .text-warning { font-weight: 600; }

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.5);
    border-radius: 999px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.5s ease-out, background-color 0.3s;
}
.bg-js { background: var(--color-js); }
.bg-css { background: var(--color-css); }
.bg-img { background: var(--color-img); }
.bg-font { background: var(--color-font); }

/* Vitals Info */
.vitals-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.vital-name { font-weight: 600; margin-bottom: 0.25rem; }
.vital-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }
.vital-val { font-weight: 600; display: inline-block; margin-top: 0.25rem; }

/* Forms & Modals */
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label { font-size: 0.9rem; color: var(--text-muted); font-weight: 500;}
.form-control {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
}
.form-control:focus { outline: none; border-color: var(--primary); }
.input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.modal { 
    position: fixed; inset: 0; background: rgba(0,0,0,0.7); 
    display: flex; align-items: center; justify-content: center; 
    z-index: 100; padding: 1rem; backdrop-filter: blur(4px);
}
.modal-content { width: 100%; max-width: 500px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; }

/* Buttons */
button { font-family: var(--font-sans); cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; }
.icon-btn { background: none; border: none; color: var(--text-muted); padding: 0.5rem; border-radius: 50%; }
.icon-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-main); }
.btn-primary { background: var(--primary); color: var(--bg-color); border: none; padding: 0.6rem 1.2rem; border-radius: var(--radius-sm); font-weight: 600;}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); padding: 0.6rem 1.2rem; border-radius: var(--radius-sm); font-weight: 500;}
.btn-outline:hover { background: rgba(20, 184, 166, 0.1); }
.btn-text { background: none; border: none; color: var(--text-muted); padding: 0.4rem 0.8rem; font-size: 0.85rem;}
.btn-text:hover { color: var(--text-main); }

/* Range Input */
input[type="range"] {
    -webkit-appearance: none;
    height: 6px;
    background: rgba(0,0,0,0.5);
    border-radius: 3px;
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

@media (max-width: 1024px) {
    .overview-section { grid-template-columns: repeat(2, 1fr); }
    .grid-layout { grid-template-columns: 1fr; }
}
