/* ================= ROOT COLORS ================= */
:root {
  --bg: #f4f6f8;
  --text: #0f172a;
  --card: #ffffff;
  --sidebar: #0f172a;
  --sidebar-btn: #1e293b;
  --primary: #2563eb;
}

body.dark {
  --bg: #0b1220;
  --text: #e5e7eb;
  --card: #111827;
  --sidebar: #020617;
  --sidebar-btn: #1f2937;
  --primary: #38bdf8;
}

/* ================= BASE ================= */
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app {
  display: flex;
  min-height: 100vh;
}

/* ================= DESKTOP / LAPTOP ================= */
.sidebar {
  width: 260px;
  background: var(--sidebar);
  color: white;
  padding: 16px;
}

.brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.mode-btn {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
}

.sidebar button {
  width: 100%;
  padding: 12px;
  margin-bottom: 8px;
  background: var(--sidebar-btn);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
}

.sidebar button:hover {
  opacity: 0.9;
}

.content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

.section {
  display: none;
  max-width: 820px;
}

/* ================= INPUTS & BUTTONS ================= */
input {
  display: block;
  width: 320px;
  max-width: 100%;
  padding: 14px;
  margin: 12px 0;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 16px;
}

button {
  padding: 14px 22px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
}

p[id$="Result"] {
  font-weight: 600;
  margin-top: 10px;
}

/* ================= MOBILE ONLY ================= */
/* ONLY phones & small tablets */
@media (max-width: 768px) {

  .app {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  .brand {
    width: 100%;
    justify-content: space-between;
  }

  .sidebar button {
    width: auto;
    flex: 1 1 45%;
    text-align: center;
    font-size: 15px;
  }

  .content {
    padding: 16px;
  }

  .section {
    max-width: 100%;
  }

  input,
  button {
    width: 100%;
  }
}
