/* =============================================
   Home Grid – Modern Glass-morphism Style
   (Thin cards, compact, box‑less large icons)
============================================= */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

:root {
  --bg-primary: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.75);
  --card-border: rgba(255, 255, 255, 0.6);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 14px 42px rgba(0, 0, 0, 0.07);
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 32px;
  --transition-fast: 170ms cubic-bezier(0.4, 0, 0.2, 1);
  --accent-indigo: #6366f1;
  --accent-green: #22c55e;
  --accent-indigo-dark: #4f46e5;
  --icon-shadow: 0 6px 18px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
  --icon-shadow-hover: 0 10px 28px rgba(0, 0, 0, 0.16), 0 4px 12px rgba(0, 0, 0, 0.08);
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  background: var(--bg-primary);
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  display: flex;
  justify-content: center;
  background: linear-gradient(170deg, #faf9fb 0%, #f1f0f5 35%, #f5f4f8 65%, #f8f7fa 100%);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: -15%;
  left: -8%;
  width: 60%;
  height: 45%;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: floatBlob1 16s ease-in-out infinite;
}

body::after {
  content: "";
  position: fixed;
  bottom: -10%;
  right: -12%;
  width: 50%;
  height: 40%;
  background: radial-gradient(ellipse at center, rgba(34, 197, 94, 0.06) 0%, transparent 68%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: floatBlob2 20s ease-in-out infinite;
}

@keyframes floatBlob1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(2%, -1%) scale(1.03); }
  50% { transform: translate(-1%, -3%) scale(0.97); }
  75% { transform: translate(1%, 2%) scale(1.02); }
}

@keyframes floatBlob2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  30% { transform: translate(-2%, 3%) scale(1.04); }
  60% { transform: translate(2%, -1%) scale(0.96); }
  85% { transform: translate(-1%, -2%) scale(1.02); }
}

.screen {
  width: 100vw;
  min-height: 100vh;
  position: relative;
  background: transparent;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
}

.top-space {
  height: 28vh;
  flex-shrink: 0;
}

/* ── Top Row Card ─────────────────────── */
.top-row {
  width: calc(100vw - 56px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  /* কমানো প্যাডিং: top/bottom 10px, left/right কম (6px) */
  padding: 10px 6px 10px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow var(--transition-fast);
}

.top-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 55%;
  background: linear-gradient(to bottom, rgba(99, 102, 241, 0.10), transparent);
  border-radius: 1px;
  z-index: 1;
  pointer-events: none;
}

.top-row:hover {
  box-shadow: var(--shadow-xl), 0 0 0 2px rgba(99, 102, 241, 0.08);
}

/* ── Bottom Row Card ──────────────────── */
.bottom-row {
  width: calc(100vw - 24px);
  margin: 12px auto 0;       /* উপরে একটু জায়গা */
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  /* top/bottom 10px (টপ রো-এর সমান), left/right বেশি (12px) */
  padding: 10px 12px 10px;
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow var(--transition-fast);
}

.bottom-row:hover {
  box-shadow: var(--shadow-xl);
}

/* ── Item Base ────────────────────────── */
.item {
  min-height: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-primary);
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  overflow: visible;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--transition-fast);
  border-radius: 18px;
  padding: 4px 2px;          /* ভেতরের ফাঁকা আরেকটু কম */
  z-index: 2;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

.top-row .item:hover,
.bottom-row .item:hover {
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.12), 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.item:active,
.item.is-pressed {
  transform: scale(0.95);
  transition: transform 100ms ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.item:focus-visible {
  outline: none;
}

.item::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 16px;
  background: rgba(99, 102, 241, 0.10);
  opacity: 0;
  transform: scale(0.88);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  pointer-events: none;
  z-index: 0;
}

.item:active::after,
.item.is-pressed::after {
  opacity: 1;
  transform: scale(1);
}

/* ── Icon Wraps (box‑less) ────────────── */
.icon-wrap {
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;            /* ডিফল্ট আইকন-লেবেল গ্যাপ */
  position: relative;
  z-index: 1;
  background: none !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0;
  transition: transform var(--transition-fast);
}

/* টপ রো-তে আইকন ও লেবেলের মধ্যকার ফাঁকা আরও কম */
.top-row .icon-wrap {
  margin-bottom: 2px;
}

/* আইকন ড্রপ শ্যাডো ও হোভার */
.icon-wrap img,
.icon-wrap .lottie-anim,
.icon-wrap svg {
  filter: drop-shadow(var(--icon-shadow));
  transition: filter var(--transition-fast), transform var(--transition-fast);
  cursor: pointer;
}

.icon-wrap:hover img,
.icon-wrap:hover .lottie-anim,
.icon-wrap:hover svg {
  filter: drop-shadow(var(--icon-shadow-hover));
  transform: scale(1.05);
}

.item:active .icon-wrap img,
.item:active .icon-wrap .lottie-anim,
.item:active .icon-wrap svg,
.item.is-pressed .icon-wrap img,
.item.is-pressed .icon-wrap .lottie-anim,
.item.is-pressed .icon-wrap svg {
  transform: scale(0.92);
  filter: drop-shadow(var(--icon-shadow));
}

/* ── Top Row Icon Sizes ──────────────── */
.top-row .icon-wrap .lottie-anim {
  width: 85px;
  height: 85px;
}

/* ── Bottom Row Icon Sizes ────────────── */
.bottom-row .small-icon {
  width: 64px;
  height: 64px;
  display: block;
}

.admission-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.bank-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.f1-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

/* ── Labels ────────────────────────────── */
.label {
  margin: 0;
  line-height: 1.15;
  text-align: center;
  font-weight: 650;
  letter-spacing: -0.25px;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  margin-top: 4px;             /* ডিফল্ট সামান্য উপরের মার্জিন */
}

.top-row .label {
  font-size: 18px;
  color: #0f172a;
  font-weight: 680;
  margin-top: 2px;             /* টপ রো-তে আরও কম */
}

.bottom-row .label {
  font-size: 15px;
  color: #334155;
  font-weight: 600;
  margin-top: 4px;
}

/* ── Divider (unchanged) ──────────────── */
.bottom-row .item:not(:last-child)::before {
  content: "";
  position: absolute;
  right: 0;
  top: 18%;
  height: 64%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.03), transparent);
  pointer-events: none;
  z-index: 0;
}

/* ── Responsive ────────────────────────── */
@media (max-width: 390px) {
  .top-space { height: 24vh; }
  .top-row { width: calc(100vw - 40px); padding: 8px 4px 8px; border-radius: 26px; }
  .bottom-row { width: calc(100vw - 16px); margin-top: 36px; padding: 8px 10px 8px; border-radius: 26px; }
  .top-row .label { font-size: 16px; }
  .bottom-row .label { font-size: 13px; }
  .item { min-height: 82px; padding: 4px 2px; }
  .bottom-row .item { min-height: 108px; }

  .top-row .icon-wrap .lottie-anim {
    width: 65px;
    height: 65px;
  }

  .bottom-row .small-icon {
    width: 48px;
    height: 48px;
  }

  .admission-img { width: 44px; height: 44px; }
  .bank-img { width: 44px; height: 44px; }
  .f1-img { width: 56px; height: 56px; }
}

@media (min-width: 420px) {
  .top-row { width: calc(100vw - 72px); padding: 12px 8px 12px; }
  .bottom-row { width: calc(100vw - 32px); padding: 12px 16px 12px; }
  .top-row .label { font-size: 19px; }
  .bottom-row .label { font-size: 16px; }

  .top-row .icon-wrap .lottie-anim {
    width: 100px;
    height: 100px;
  }

  .bottom-row .small-icon {
    width: 76px;
    height: 76px;
  }

  .admission-img { width: 72px; height: 72px; }
  .bank-img { width: 72px; height: 72px; }
  .f1-img { width: 84px; height: 84px; }
}
