/* Carbon Footprint Dev Calculator — Nature Dark */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #00B894;
  --primary-dim: rgba(0,184,148,0.12);
  --secondary: #81ECEC;
  --accent: #FFEAA7;
  --accent-dim: rgba(255,234,167,0.12);
  --bg: #0D1B0E;
  --bg-card: #142016;
  --border: rgba(0,184,148,0.10);
  --text: #D4EDDA;
  --text-dim: #A3CFBB;
  --text-muted: #3D6B4E;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif;
  --transition: 0.2s ease;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.6; }

.header { border-bottom: 1px solid var(--border); background: rgba(20,32,22,0.95); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.header-inner { max-width: 700px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; }
.header-left { display: flex; align-items: center; gap: 10px; }
.header-actions { display: flex; gap: 6px; }
.logo-icon { font-size: 1.2rem; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--primary-dim); border-radius: var(--radius-sm); }
.header h1 { font-size: 1.05rem; font-weight: 700; }
.subtitle { font-size: 0.72rem; color: var(--text-dim); }

.main { max-width: 700px; margin: 0 auto; padding: 20px; }

.btn { padding: 8px 16px; font-family: var(--font); font-size: 0.78rem; font-weight: 600; border: none; border-radius: 6px; cursor: pointer; transition: all var(--transition); }
.btn-sm { padding: 5px 10px; font-size: 0.72rem; background: var(--primary-dim); color: var(--primary); border: 1px solid rgba(0,184,148,0.2); }

.total-card { text-align: center; padding: 20px; margin-bottom: 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.total-val { font-size: 2rem; font-weight: 800; color: var(--primary); }
.total-unit { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 8px; }
.total-bar { height: 6px; border-radius: 3px; background: rgba(0,184,148,0.1); overflow: hidden; }
.total-bar-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--primary), var(--secondary)); transition: width 0.4s ease; }

.section-card, .breakdown-card, .recs-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 8px; }
.panel-header { padding: 8px 14px; border-bottom: 1px solid var(--border); }
.panel-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); }
.section-body { padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.label { font-size: 0.72rem; color: var(--text-dim); flex: 1; }
.input { padding: 6px 10px; font-family: var(--font); font-size: 0.72rem; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; outline: none; width: 120px; text-align: right; }
.select { padding: 6px 10px; font-family: var(--font); font-size: 0.72rem; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; outline: none; width: 160px; }

.breakdown-list { padding: 8px 14px; }
.break-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; }
.break-label { font-size: 0.72rem; }
.break-val { font-size: 0.72rem; font-weight: 600; color: var(--primary); }
.break-bar { flex: 1; height: 4px; margin: 0 10px; border-radius: 2px; background: rgba(0,184,148,0.1); overflow: hidden; }
.break-bar-fill { height: 100%; border-radius: 2px; background: var(--primary); transition: width 0.3s ease; }

.recs-list { padding: 8px 14px; }
.rec-item { font-size: 0.68rem; color: var(--text-dim); padding: 3px 0; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; max-width: 500px; width: 90%; }
.modal-title { font-size: 0.88rem; font-weight: 700; margin-bottom: 8px; }
.code-pre { padding: 10px; font-size: 0.62rem; color: var(--text-dim); background: var(--bg); border-radius: 6px; overflow-x: auto; white-space: pre-wrap; margin-bottom: 8px; }

.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 200; }
.toast { padding: 10px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 4px 24px rgba(0,0,0,0.5); font-size: 0.82rem; animation: toastIn 0.3s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
