/* ===== GLOBAL ===== */
* { box-sizing: border-box; transition: background .3s,color .3s; }

:root {
  --bg: #e0f2fe;
  --card: #ffffff;
  --text: #1e293b;
  --primary: #4f46e5;
  --secondary: #6366f1;
  --suggest: #eef2ff;
}

body.dark {
  --bg: #0f172a;
  --card: #1e293b;
  --text: #e5e7eb;
  --primary: #818cf8;
  --secondary: #a5b4fc;
  --suggest: #334155;
}

body {
  margin: 0;
  font-family: 'IBM Plex Serif Arabic', serif;
  background: var(--bg);
  color: var(--text);

  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--card);
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
  z-index: 100;
}

.navbar-content {
  max-width: 1100px;
  margin: auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-title {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-weight: 700;
  color: var(--primary);
}

.toggle {
  cursor: pointer;
  font-size: 1.3rem;
}

/* ===== MAIN ===== */
.main {
  flex: 1; /* pushes footer to bottom */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 10px; /* responsive padding */
  width: 100%;
}


.container {
  width: 90%;
  max-width: 850px;
  background: var(--card);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 25px 60px rgba(0,0,0,.15);
  position: relative;
  z-index: 10;
}

h1 {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  text-align: center;
  background: linear-gradient(90deg, #4f46e5, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}

/* ===== INPUT & AUTOCOMPLETE ===== */
input {
  width: 100%;
  padding: 14px 18px;
  font-size: 1.05rem;
  border-radius: 14px;
  border: 1px solid var(--secondary);
  background: transparent;
  color: var(--text);
}

input:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(99,102,241,.25);
}

.autocomplete { position: relative; }

.suggestions {
  list-style: none;
  margin-top: 6px;
  padding: 0;
  position: absolute;
  width: 100%;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 12px 25px rgba(0,0,0,.25);
  max-height: 220px;
  overflow-y: auto;
  z-index: 50;
}

.suggestions li {
  padding: 12px 16px;
  cursor: pointer;
  transition: 0.2s;
}

.suggestions li:hover,
.suggestions li.active {
  background: var(--suggest);
  transform: scale(1.02);
}

.result { margin-top: 22px; }

.card {
  background: var(--suggest);
  border-radius: 18px;
  padding: 24px;
  transition: transform .2s, box-shadow .2s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 70px rgba(0,0,0,.2);
}

.word-title {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  text-align: center;
  font-size: 2rem;
  color: var(--primary);
}

.section { margin-top: 14px; }

.section-title {
  font-weight: 700;
  color: var(--secondary);
}

.not-found {
  text-align: center;
  color: #ef4444;
  font-weight: 700;
}

/* ===== FOOTER ===== */
.footer {
  width: 100%;
  text-align: center;
  padding: 18px 10px;
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  background: var(--card);
  box-shadow: 0 -4px 15px rgba(0,0,0,0.08);
}


.footer .heart {
  color: #ef4444;
  font-size: 1.2rem;
}

body.dark .footer {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 -4px 15px rgba(255,255,255,0.05);
}

body {
  background: linear-gradient(135deg, #e0f2fe, #eef2ff);
}

body.dark {
  background: linear-gradient(135deg, #0f172a, #1e293b);
}
#bg-symbols {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.symbol {
  position: absolute;
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  opacity: 0.15;
  animation: float 10s ease-in-out infinite;
  user-select: none;
}

body.dark .symbol {
  opacity: 0.08;
}
@keyframes float {
  0%   { transform: translateY(0) rotate(0deg); }
  50%  { transform: translateY(-25px) rotate(8deg); }
  100% { transform: translateY(0) rotate(0deg); }
}
.navbar,
.main,
.footer {
  position: relative;
  z-index: 10;
}
/* ===== SCROLLBAR STYLING ===== */
.suggestions::-webkit-scrollbar {
  width: 8px;
}
.container {
  width: 95%;
  max-width: 850px;
  background: var(--card);
  border-radius: 18px;
  padding: 20px 24px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.15);
  position: relative;
  z-index: 10;
}

.navbar-content {
  max-width: 1100px;
  margin: auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* wrap on small screens */
}

.nav-title {
  font-size: 1.25rem; /* smaller on small screens */
}

.footer {
  width: 100%;
  text-align: center;
  padding: 16px 10px;
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  background: var(--card);
  box-shadow: 0 -4px 15px rgba(0,0,0,0.08);
  line-height: 1.6;
}

@media (max-width: 480px) {
  .container {
    padding: 16px 12px;
  }
  .navbar-content {
    padding: 10px 12px;
  }
  input {
    font-size: 1rem;
    padding: 12px 14px;
  }
  .word-title {
    font-size: 1.8rem;
  }
  .footer {
    font-size: 0.95rem;
    padding: 14px 8px;
  }
}

/* NAVBAR */
.navbar {
  height: 70px; /* slightly taller */
}

.navbar-content {
  padding: 16px 24px; /* slight vertical padding */
}

.nav-title {
  font-size: 1.6rem; /* slightly bigger than before */
}

.toggle {
  font-size: 1.5rem; /* slightly bigger icon */
}
