@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100..900&display=swap');

:root {
  --bg: #0f172a;
  /* slate-900 */
  --panel: #111827;
  /* gray-900 */
  --muted: #94a3b8;
  /* slate-400 */
  --text: #e5e7eb;
  /* gray-200 */
  --primary: #22c55e;
  /* green-500 */
  --accent: #38bdf8;
  /* sky-400 */
  --danger: #ef4444;
  /* red-500 */
  --ring: rgba(56, 189, 248, 0.35);
}


* {
  box-sizing: border-box;
  font-family: "Vazirmatn", sans-serif;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: 
    radial-gradient(1200px 800px at 10% -10%, #1f2937 0%, var(--bg) 40%, #0b1022 100%),
    url("assets/bg_4.png");
  background-blend-mode: overlay;
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
}




.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.25);
  display: flex;
  justify-content: center;
  align-items: center;
}

.innerLogo {
  width: 32px;
  animation: logoAnimation 4s ease-in-out infinite;
}

@keyframes logoAnimation {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0);
  }
} 

h1 {
  font-size: 22px;
  margin: 0;
}

.subtitle {
  color: var(--muted);
  font-size: 13px;
}

.theme-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
}

input:checked+.slider {
  background-color: var(--accent);
}

input:checked+.slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 24px;
}

.slider.round:before {
  border-radius: 50%;
}

.tabs {
  margin-top: 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  overflow-x: auto;
  padding-bottom: 5px;
}

.tab {
  border: 1px solid #243142;
  color: #cbd5e1;
  padding: 10px 14px;
  border-radius: 12px;
  background: #0b1220;
  cursor: pointer;
  transition: 0.2s;
  font-size: 14px;
  white-space: nowrap;
}

[data-theme="light"] .tab {
  background: #f8fafc;
  color: #475569;
  border-color: #cbd5e1;
}

.tab[aria-selected="true"],
.tab:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

.panel {
  margin-top: 16px;
  background: linear-gradient(180deg, #0b1220, #0a1020);
  border: 1px solid #1e293b;
  padding: 20px;
  border-radius: 16px;
  display: none;
  animation: fadeIn 0.3s ease;
}

[data-theme="light"] .panel {
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  border-color: #e2e8f0;
}

.panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 900px) {
  .grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.card {
  background: linear-gradient(180deg, #0b1422, #0b1220);
  border: 1px solid #243142;
  border-radius: 16px;
  padding: 16px;
}

[data-theme="light"] .card {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border-color: #e2e8f0;
}

.card h3 {
  margin: 0 0 10px 0;
}

label {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 6px;
}

[data-theme="light"] label {
  color: #64748b;
}

input,
select,
textarea {
  width: 100%;
  background: #0b1220;
  color: #e5e7eb;
  border: 1px solid #233045;
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
  transition: 0.2s;
  font-size: 14px;
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: #ffffff;
  color: #1e293b;
  border-color: #cbd5e1;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn {
  appearance: none;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #071018;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn.secondary {
  background: #0b1220;
  color: #cbd5e1;
  border: 1px solid #243142;
}

[data-theme="light"] .btn.secondary {
  background: #f8fafc;
  color: #475569;
  border-color: #cbd5e1;
}

.btn.danger {
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  color: #130b0b;
}

.result {
  font-size: 15px;
  line-height: 1.8;
}

.muted {
  color: var(--muted);
}

.pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #243142;
  background: #0b1220;
  font-size: 12px;
}

[data-theme="light"] .pill {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.kcal {
  font-variant-numeric: tabular-nums;
}

.fun-text {
  color: #38bdf8;
  font-weight: bold;
  margin-top: 8px;
  display: block;
}

[data-theme="light"] .fun-text {
  color: #0284c7;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #1f2a3a;
  padding: 10px;
  text-align: right;
  font-size: 14px;
}

[data-theme="light"] th,
[data-theme="light"] td {
  border-bottom-color: #e2e8f0;
}

th {
  color: #9ca3af;
  font-weight: 600;
}

[data-theme="light"] th {
  color: #64748b;
}

tr:last-child td {
  border-bottom: none;
}

.right {
  text-align: left;
}

.footer {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: #8aa0b8;
  font-size: 12px;
}

[data-theme="light"] .footer {
  color: #64748b;
}

.kbd {
  border: 1px solid #2a3a52;
  padding: 2px 6px;
  border-radius: 6px;
  background: #0b1220;
}

[data-theme="light"] .kbd {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.fun-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #1e293b;
}

[data-theme="light"] .fun-section {
  border-top-color: #e2e8f0;
}

.quote {
  font-style: italic;
  color: #94a3b8;
  padding: 12px;
  background: #0b1220;
  border-radius: 12px;
  margin: 10px 0;
}

[data-theme="light"] .quote {
  color: #64748b;
  background: #f8fafc;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}