/* Index-specific components */
.qotd {
  margin-bottom: 40px;
}

.qotd-terminal {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: linear-gradient(180deg, var(--c-panel-end), var(--c-panel-start));
  border: 1px solid var(--c-border-alt);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .02);
}

.qotd-prompt {
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  color: var(--c-accent);
  line-height: 1.7;
  flex-shrink: 0;
}

.qotd-text {
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  color: var(--c-body);
  line-height: 1.7;
}

.qotd-cursor {
  width: 7px;
  height: 14px;
  margin-top: 3px;
  background: var(--c-accent);
  box-shadow: 0 0 6px rgba(74, 222, 128, .5);
  animation: qotd-cursor-blink .9s steps(1, end) infinite;
  flex-shrink: 0;
}

@keyframes qotd-cursor-blink {
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: 0; }
}

.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: inherit;
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
  animation: card-enter .4s ease both;
  animation-delay: calc(var(--i, 0) * var(--stagger));
  -webkit-tap-highlight-color: transparent;
}

.service-card:hover,
.service-card:active {
  background: var(--c-surface-alt);
  border-color: var(--c-border-alt);
}

.service-card:hover {
  transform: translateY(-1px);
}

.service-card:active {
  transform: translateY(0);
}

.service-card:hover .service-arrow {
  opacity: 1;
  transform: translateX(0);
}

.service-icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--c-icon-surface);
  border: 1px solid var(--c-icon-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.service-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.service-info {
  flex: 1;
  min-width: 0;
}

.service-name {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-body);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-url {
  font-family: var(--ff-mono);
  font-size: var(--fs-2xs);
  color: var(--c-dim);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.service-status {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--c-warning);
  animation: pulse-checking 1s ease-in-out infinite;
}

.service-status[data-state="online"] {
  background: var(--c-accent);
  box-shadow: 0 0 5px var(--c-accent);
  animation: none;
}

.service-status[data-state="offline"] {
  background: var(--c-danger);
  box-shadow: 0 0 5px var(--c-danger);
  animation: none;
}

.service-status[data-state="local"] {
  background: var(--c-local);
  box-shadow: 0 0 5px var(--c-local-glow);
  animation: none;
}

@keyframes pulse-checking {
  0%, 100% { opacity: 1; }
  50%      { opacity: .3; }
}

.service-arrow {
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  color: var(--c-dim);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--ease), transform var(--ease);
  flex-shrink: 0;
}

@media (max-width: 540px) {
  .qotd {
    margin-bottom: 28px;
  }

  .qotd-terminal {
    padding: 10px 12px;
    gap: 6px;
  }

  .services {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .service-card {
    padding: 12px 14px;
    gap: 10px;
  }

  .service-url {
    font-size: 9px;
  }

  .service-arrow {
    opacity: .4;
    transform: translateX(0);
  }
}