   /* --- فونت و تنظیمات کلی --- */
        @font-face {
            font-family: 'Vazir';
            src: url('Vazir-Medium.woff2') format('woff2'),
                url('Vazir-Medium.woff') format('woff');
            font-display: swap;
        }

        /* --- فونت و تنظیمات کلی --- */
        @font-face {
            font-family: 'nst';
            src: url('./IranNastaliq/IranNastaliq.ttf') format('truetype');
            font-display: swap;
        }


/* =========================
   RESET
========================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Vazir", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: #f5f7fb;
  color: #1e293b;
}

/* =========================
   APP LAYOUT
========================= */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* =========================
   HEADER
========================= */
.app-header {
  position: sticky;
  top: 0;
  background: #ffffff;
  padding: 18px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  z-index: 1000;
}

/* =========================
   CONTENT
========================= */
.content {
  flex: 1;
  padding: 20px;
  padding-bottom: 90px; /* space for bottom nav */
}

.card {
  background: #ffffff;
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {opacity: 0; transform: translateY(10px);}
  to {opacity: 1; transform: translateY(0);}
}

.hidden {
  display: none;
}

h3 {
  margin-bottom: 10px;
  color: #2563eb;
}

h4 {
  margin-bottom: 10px;
  color: #334155;
}

/* =========================
   INPUTS
========================= */
input,
textarea,
select {
  width: 100%;
  padding: 14px;
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid #dbeafe;
  background: #f8fafc;
  font-size: 15px;
  transition: 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #2563eb;
  background: #ffffff;
}

textarea {
  resize: none;
  min-height: 80px;
}

/* =========================
   BUTTONS
========================= */
button {
  width: 100%;
  padding: 14px;
  margin-top: 12px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg,#2563eb,#3b82f6);
  color: white;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  transition: 0.2s;
}

button:active {
  transform: scale(0.97);
}

/* =========================
   RESULT BOX
========================= */
.ai-output,
p {
  margin-top: 12px;
  background: #f1f5f9;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  white-space: pre-wrap;
}

/* =========================
   TABS (Physics / Literature etc)
========================= */
.physics-tabs,
.literature-tabs,
.arabic-tabs,
.chemistry-tabs,
.english-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 15px;
}

.physics-tabs button,
.literature-tabs button,
.arabic-tabs button,
.chemistry-tabs button,
.english-tabs button {
  flex: none;
  padding: 10px 14px;
  border-radius: 20px;
  background: #e0e7ff;
  color: #1e3a8a;
  font-size: 13px;
  width: auto;
}

.physics-tabs button:active,
.literature-tabs button:active,
.arabic-tabs button:active,
.chemistry-tabs button:active,
.english-tabs button:active {
  background: #2563eb;
  color: white;
}

/* =========================
   BOTTOM NAVIGATION
========================= */
/* =========================
   BOTTOM NAV PRO MOBILE
========================= */

.bottom-nav {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 4px;
  padding-bottom: calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
  z-index: 2000;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;

}

/* جلوگیری از اسکرول بیرون‌زدگی */
.bottom-nav::-webkit-scrollbar {
  display: none;
}

.bottom-nav button {
  flex: 1 1 auto;
  min-width: 60px;
  max-width: 90px;
  border: none;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 18px;
  color: #64748b;
  padding: 6px 2px;
  border-radius: 12px;
  transition: 0.2s;
}

.bottom-nav button span {
  font-size: 10px;
  white-space: nowrap;
}

.bottom-nav button.active {
  color: #2563eb;
  background: #e0e7ff;
}

/* گوشی‌های خیلی کوچک */
@media (max-width: 360px) {
  .bottom-nav button span {
    display: none;
  }

  .bottom-nav button {
    font-size: 20px;
  }
}
/* =========================
   HEADER PRO STYLE
========================= */

.app-header {
  position: sticky;
  top: 0;
  background: #ffffff;
  padding: 14px 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  z-index: 1000;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.app-header img {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.app-title {
  font-size: 18px;
  font-weight: 700;
  color: #2563eb;
  letter-spacing: 0.3px;
}
/* =========================
   SCROLLBAR (Clean)
========================= */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

/* =========================
   MOBILE OPTIMIZATION
========================= */
@media (min-width: 768px) {
  body {
    display: flex;
    justify-content: center;
    background: #e2e8f0;
  }

  .app {
    width: 420px;
    background: #f5f7fb;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
  }
}

/* ------------- About Section ------------- */
.about-box {
    text-align: center;
    padding: 20px;
    background-color: #e8f5e9;
    border-radius: 8px;
    border: 1px solid #a5d6a7;
}

.about-box p {
    font-size: 16px;
    margin-bottom: 15px;
}

.social-icons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icons img {
    width: 35px;
    height: 35px;
    transition: transform 0.3s ease;
}

.social-icons img:hover {
    transform: scale(1.1);
}
.history-tabs {
  display:flex;
  gap:8px;
  margin-bottom:15px;
}

.history-tabs button {
  flex:none;
  padding:10px 14px;
  border-radius:20px;
  background:#e0e7ff;
  color:#1e3a8a;
  font-size:13px;
}