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

/* ─── Splash Screen — OVA Mission Control ─────────────────────── */
.app-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #070a12;
  overflow: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

/* Animated grid background */
.splash-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: splashGridPulse 4s ease-in-out infinite;
}
@keyframes splashGridPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

/* Glowing orbs */
.splash-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.splash-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.35) 0%, transparent 70%);
  top: -120px; left: -100px;
  animation: splashOrb1 6s ease-in-out infinite alternate;
}
.splash-orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(168,85,247,0.25) 0%, transparent 70%);
  bottom: -80px; right: -80px;
  animation: splashOrb2 7s ease-in-out infinite alternate;
}
@keyframes splashOrb1 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(40px,30px) scale(1.15); }
}
@keyframes splashOrb2 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(-30px,-20px) scale(1.1); }
}

/* Main content */
.splash-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: splashFadeUp 0.7s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes splashFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Logo ring + icon */
.splash-logo-wrap {
  position: relative;
  width: 96px; height: 96px;
  display: flex; align-items: center; justify-content: center;
}
.splash-logo-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(135deg, rgba(99,102,241,0.8), rgba(168,85,247,0.8)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  animation: splashRingSpin 3s linear infinite;
}
@keyframes splashRingSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.splash-logo-icon {
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 0 20px rgba(99,102,241,0.8));
  animation: splashIconPulse 2s ease-in-out infinite;
}
@keyframes splashIconPulse {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(99,102,241,0.6)); transform: scale(1); }
  50%       { filter: drop-shadow(0 0 28px rgba(168,85,247,0.9)); transform: scale(1.08); }
}

/* Wordmark */
.splash-wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.splash-ova {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  background: linear-gradient(90deg, #818cf8, #c084fc, #818cf8);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: splashTextShimmer 3s linear infinite;
}
@keyframes splashTextShimmer {
  from { background-position: 0% center; }
  to   { background-position: 200% center; }
}
.splash-mc {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
}

/* Tagline */
.splash-tagline {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.06em;
}

/* Loader bar */
.splash-loader {
  width: min(240px, 60vw);
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
}
.splash-loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  border-radius: 99px;
  animation: splashBarFill 1.6s cubic-bezier(0.4,0,0.2,1) 0.2s forwards;
}
@keyframes splashBarFill {
  0%   { width: 0%; }
  60%  { width: 80%; }
  100% { width: 100%; }
}

/* Status text */
.splash-status {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.04em;
  min-height: 1em;
}

/* ─── 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;
  }
}
