/* ══════════════════════════════════════════════════════════════
   OVA Mission Control — mc-launchpad.css
   Apple Launchpad Overlay — Full Redesign v20260328
   ══════════════════════════════════════════════════════════════ */

/* ─── Splash Screen ───────────────────────────────────────────── */
.app-splash {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(160deg, #0a0a0f 0%, #111118 100%);
  transition: opacity 0.32s ease, visibility 0.32s ease;
}

.app-splash.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-splash-logo { font-size: 2.4rem; }
.app-splash-title { font-size: 1.05rem; font-weight: 700; }
.app-splash-sub { font-size: 0.82rem; color: var(--muted2, #AEAEB2); }

/* ─── Launchpad Overlay — Full Screen Dark ────────────────────── */
.launchpad-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(10,10,15,0.97);
  padding: max(24px, env(safe-area-inset-top, 24px)) 20px calc(80px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  animation: launchpadIn 0.32s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@keyframes launchpadIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.launchpad-panel {
  max-width: 900px;
  margin: 0 auto;
}

/* ─── Search Bar Pill ─────────────────────────────────────────── */
.launchpad-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.launchpad-search {
  flex: 1;
  min-height: 52px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #f0f0f5;
  padding: 14px 22px;
  font-size: 1.05rem;
  font-family: inherit;
  outline: none;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.launchpad-search::placeholder { color: rgba(255,255,255,0.4); }
.launchpad-search:focus {
  background: rgba(255,255,255,0.14);
  border-color: #007AFF;
  box-shadow: 0 0 0 3px rgba(0,122,255,0.25);
}

.launchpad-close-btn {
  min-width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #f0f0f5;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.18s;
}
.launchpad-close-btn:hover { background: rgba(255,255,255,0.2); }

/* ─── Category Sections ───────────────────────────────────────── */
.launchpad-category { margin-bottom: 32px; }

.launchpad-category-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 16px;
  padding: 0 4px;
}

/* ─── Grid: 6 cols desktop, 4 cols mobile ─────────────────────── */
.launchpad-grid,
.launchpad-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

@media (min-width: 600px) {
  .launchpad-grid,
  .launchpad-category-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* ─── App Icon Card ───────────────────────────────────────────── */
.launchpad-card {
  background: transparent;
  border: none;
  color: #f0f0f5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.18s;
  padding: 6px 4px;
  min-height: 100px;
}
.launchpad-card:hover { transform: scale(1.1); }
.launchpad-card:active { transform: scale(0.9); }

/* ─── 72px rounded square ─────────────────────────────────────── */
.launchpad-card-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.launchpad-card-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.22) 0%, transparent 60%);
  border-radius: inherit;
  pointer-events: none;
}

.launchpad-card:hover .launchpad-card-icon {
  box-shadow: 0 8px 32px rgba(0,0,0,0.65);
}

/* ─── Name below icon ─────────────────────────────────────────── */
.launchpad-card-label {
  font-size: 0.68rem;
  text-align: center;
  color: rgba(255,255,255,0.9);
  line-height: 1.2;
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Gradient classes ────────────────────────────────────────── */
.lp-blue    { background: linear-gradient(135deg, #007AFF, #5AC8FA); }
.lp-purple  { background: linear-gradient(135deg, #5856D6, #BF5AF2); }
.lp-green   { background: linear-gradient(135deg, #34C759, #30D158); }
.lp-orange  { background: linear-gradient(135deg, #FF9500, #FF6B00); }
.lp-red     { background: linear-gradient(135deg, #FF3B30, #FF453A); }
.lp-teal    { background: linear-gradient(135deg, #00C7BE, #32ADE6); }
.lp-pink    { background: linear-gradient(135deg, #FF2D55, #FF375F); }
.lp-indigo  { background: linear-gradient(135deg, #5856D6, #007AFF); }
.lp-gray    { background: linear-gradient(135deg, #8E8E93, #636366); }

/* ─── Shimmer hover effect ────────────────────────────────────── */
@keyframes launchpadShimmer {
  0% { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

.launchpad-card:hover .launchpad-card-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.25) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: launchpadShimmer 0.65s ease;
  border-radius: inherit;
  pointer-events: none;
}

/* ─── Mobile overrides ────────────────────────────────────────── */
@media (max-width: 480px) {
  .launchpad-grid,
  .launchpad-category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 375px) {
  .launchpad-grid,
  .launchpad-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .launchpad-card-icon {
    width: 54px;
    height: 54px;
    font-size: 1.6rem;
    border-radius: 13px;
  }
}
