/* assets/css/styles.css */

body {
  background: linear-gradient(135deg, #d8dae0 0%, #eeedef 100%);
  min-height: 100vh;
  padding: 20px 15px;
  transition: background 0.4s;
  font-family: 'Segoe UI', sans-serif;
}

/* ── Dark mode ───────────────────────────────── */
body.dark-mode { background: linear-gradient(135deg, #0f0c29, #302b63); }
body.dark-mode .calc-card   { background: #1e1e2e; border: 1px solid #333; }
body.dark-mode .calc-display { background: #111827; color: #4ade80; border-color: #374151; }
body.dark-mode .btn-number  { background: #2d2d44; color: #fff; }
body.dark-mode .header-box  { background: rgba(255,255,255,0.08) !important; }
body.dark-mode .calc-title  { color: #e2e8f0; }
body.dark-mode .feature-title { color: #a78bfa; }
body.dark-mode .form-control { background: #1e1e2e; color: #e2e8f0; border-color: #444; }

/* ── Header box ──────────────────────────────── */
.header-box {
  background: rgba(255,255,255,0.85);
  border-radius: 16px;
  padding: 14px 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8PX);
}
.calc-title    { font-size: 1rem; font-weight: 800; letter-spacing: 2px; color: #2d2d44; }
.calc-subtitle { font-size: 0.78rem; color: #666; }

/* ── Calculator card ─────────────────────────── */
.calc-card {
  border: none !important;
  border-radius: 22px !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  background: gi#fff;
}

/* ── Display ─────────────────────────────────── */
.calc-display {
  width: 100%;
  height: 62px;
  font-size: 1.9rem;
  font-weight: 700;
  text-align: right;
  padding: 0 14px;
  border-radius: 14px;
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  color: #1e293b;
  cursor: default;
}

/* ── Button grid ─────────────────────────────── */
.btn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}

.btn-grid .btn {
  height: 58px;
  font-size: 1.15rem;
  font-weight: 700;
  border-radius: 13px;
  border: none;
  transition: transform .12s, box-shadow .12s;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}
.btn-grid .btn:active { transform: scale(0.93); }

.btn-number   { background: #f8fafc; color: #1e293b; }
.btn-number:hover { background: #e2e8f0; }
.btn-operator { background: linear-gradient(135deg,#764ba2,#667eea); color: #fff; }
.btn-clear    { background: linear-gradient(135deg,#f5576c,#f093fb); color: #fff; }
.btn-back     { background: linear-gradient(135deg,#f5576c,#f093fb); color: #fff; }

/* Equals spans last column, 2 rows */
.btn-equals {
  background: linear-gradient(135deg,#43e97b,#38f9d7);
  color: #1a1a2e;
  grid-row: span 2;
  height: auto;
}

/* 0 button spans 2 columns */
.span-2 { grid-column: span 2; }

/* ── Age Calculator ──────────────────────────── */
.feature-title { font-weight: 700; color: #764ba2; letter-spacing: 1px; }
.btn-age {
  background: linear-gradient(135deg,#667eea,#764ba2);
  color: #fff;
  font-weight: 700;
  border-radius: 13px;
  border: none;
  height: 50px;
  font-size: 1rem;
}
.age-result {
  background: #f1f5f9;
  border-radius: 12px;
  padding: 14px;
  font-size: 1rem;
  color: #2d2d44;
}

/* ── Theme toggle ────────────────────────────── */
.theme-toggle-btn {
  position: fixed; top: 14px; right: 14px;
  width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid #e2e8f0;
  background: #fff; font-size: 1.2rem;
  cursor: pointer; z-index: 1000;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 400px) {
  .btn-grid .btn { height: 50px; font-size: 1rem; }
  .calc-display  { height: 54px; font-size: 1.5rem; }
}
