/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-from: #0d0d1a;
  --bg-mid: #0f3460;
  --bg-to: #1a0533;
  --glass-bg: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.12);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --icon-size: 88px;
  --icon-radius: 22%;
  --label-size: 11px;
  --grid-gap: 36px;
}

html, body {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  font-family: -apple-system, 'Inter', 'SF Pro Text', BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ===== BACKGROUND ===== */
@keyframes orb1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(80px, -50px) scale(1.2); }
  66%       { transform: translate(-30px, 60px) scale(0.85); }
}
@keyframes orb2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-60px, 40px) scale(0.9); }
  66%       { transform: translate(50px, -70px) scale(1.15); }
}
@keyframes orb3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(40px, 50px) scale(1.1); }
}

.bg-layer {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0d0d1a 0%, #0f2240 40%, #1a0533 100%);
  z-index: 0;
  overflow: hidden;
}

.bg-layer::before {
  content: '';
  position: absolute;
  width: 60vw; height: 60vw;
  top: -10%; left: -5%;
  background: radial-gradient(ellipse, rgba(83, 52, 131, 0.55) 0%, transparent 65%);
  animation: orb1 14s ease-in-out infinite;
}

.bg-layer::after {
  content: '';
  position: absolute;
  width: 50vw; height: 50vw;
  top: 10%; right: -10%;
  background: radial-gradient(ellipse, rgba(15, 52, 96, 0.65) 0%, transparent 60%);
  animation: orb2 18s ease-in-out infinite;
}

.bg-orb3 {
  position: absolute;
  width: 45vw; height: 45vw;
  bottom: -5%; left: 40%;
  background: radial-gradient(ellipse, rgba(26, 5, 51, 0.5) 0%, transparent 60%);
  animation: orb3 11s ease-in-out infinite;
  pointer-events: none;
}

/* ===== MAIN WRAPPER ===== */
.app-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 24px;
}

/* ===== STATUS BAR ===== */
.status-bar {
  width: 100%;
  max-width: 900px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 8px 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.status-time {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.status-date {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: 1px;
}

.status-left {
  display: flex;
  flex-direction: column;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.status-icons svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ===== APP GRID ===== */
.home-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
  padding: 40px 48px;
  background: var(--glass-bg);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ===== APP ICON ===== */
.app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.icon-wrapper {
  width: var(--icon-size);
  height: var(--icon-size);
  border-radius: var(--icon-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition:
    transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}

.icon-wrapper svg {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.25));
}

.icon-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0) 60%
  );
  pointer-events: none;
}

.app-icon:hover .icon-wrapper {
  transform: scale(1.08) translateY(-3px);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.app-icon:active .icon-wrapper {
  transform: scale(0.91);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.icon-label {
  font-size: var(--label-size);
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  line-height: 1.3;
  max-width: calc(var(--icon-size) + 16px);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  letter-spacing: 0.01em;
}

/* ===== ICON COLORS ===== */
.icon-uptime {
  background: linear-gradient(145deg, #007AFF, #00C7BE);
}

.icon-uptime-admin {
  background: linear-gradient(145deg, #5E5CE6, #9333ea);
}

.icon-bossai {
  background: linear-gradient(145deg, #FF9F0A, #FF453A);
}

.icon-firma {
  background: linear-gradient(145deg, #34C759, #00C7BE);
}

.icon-wordpress {
  background: linear-gradient(145deg, #21759B, #464646);
}

.icon-portainer {
  background: linear-gradient(145deg, #13BEF9, #0072A3);
}

.icon-lobster {
  background: linear-gradient(145deg, #FF6B6B, #C0392B);
}

/* ===== DOCK ===== */
.dock {
  width: 100%;
  max-width: 900px;
  display: flex;
  justify-content: center;
  padding: 0 8px;
  flex-shrink: 0;
}

.dock-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 24px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

.dock-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0 8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  :root {
    --icon-size: 76px;
    --grid-gap: 24px;
  }

  .app-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 32px 36px;
    border-radius: 28px;
  }
}

@media (max-width: 480px) {
  :root {
    --icon-size: 68px;
    --grid-gap: 20px;
  }

  .app-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 28px 28px;
    border-radius: 24px;
  }

  .icon-wrapper svg {
    width: 36px;
    height: 36px;
  }

  .status-bar {
    padding: 10px 4px 8px;
  }
}

@media (max-width: 360px) {
  :root {
    --icon-size: 60px;
    --grid-gap: 16px;
  }

  .app-grid {
    padding: 22px 20px;
  }

  .icon-wrapper svg {
    width: 30px;
    height: 30px;
  }
}

/* ===== GREETING ===== */
.greeting {
  width: 100%;
  max-width: 900px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
  padding: 0 8px 4px;
  flex-shrink: 0;
  animation: fadeIn 0.6s ease both 0.2s;
}

/* ===== HEALTH DOT ===== */
.health-dot {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(0, 0, 0, 0.25);
  z-index: 2;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.health-dot.up {
  background: #34C759;
  box-shadow: 0 0 7px rgba(52, 199, 89, 0.8);
}

.health-dot.down {
  background: #FF453A;
  box-shadow: 0 0 7px rgba(255, 69, 58, 0.6);
}

/* ===== SPOTLIGHT ===== */
.spotlight-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 14vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.spotlight-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.spotlight-box {
  width: 100%;
  max-width: 560px;
  padding: 0 20px;
  animation: spotlightDrop 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes spotlightDrop {
  from { transform: translateY(-20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.spotlight-input {
  width: 100%;
  padding: 16px 22px;
  font-size: 20px;
  font-family: inherit;
  font-weight: 500;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  outline: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.spotlight-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.spotlight-hint {
  text-align: center;
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.04em;
}

/* Eşleşmeyen ikonlar solar */
.app-icon.no-match {
  opacity: 0.15;
  transform: scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-icon.match {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.app-grid {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.app-icon {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.app-icon:nth-child(1) { animation-delay: 0.05s; }
.app-icon:nth-child(2) { animation-delay: 0.10s; }
.app-icon:nth-child(3) { animation-delay: 0.15s; }
.app-icon:nth-child(4) { animation-delay: 0.20s; }
.app-icon:nth-child(5) { animation-delay: 0.25s; }
.app-icon:nth-child(6) { animation-delay: 0.30s; }
.app-icon:nth-child(7) { animation-delay: 0.35s; }
