/* ==========================================================================
   Cloud Infrastructure & Skills Observatory (云端基建与技能全景看板)
   Styles for Floating HUD Pill & Slide-Over Drawer
   Scoped under .sk-* namespace for 100% blast radius isolation
   ========================================================================== */

/* 1. Floating Pill Button (屏幕右下角极客常驻胶囊) */
.sk-floating-pill {
  position: fixed;
  bottom: 18px;
  right: 20px;
  z-index: 998;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #38bdf8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sk-floating-pill:hover {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 6px 28px rgba(56, 189, 248, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  color: #7dd3fc;
}

.sk-floating-pill:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.sk-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: skPulse 2s infinite ease-in-out;
}

@keyframes skPulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 8px #10b981; }
  50% { opacity: 0.45; transform: scale(0.85); box-shadow: 0 0 3px #10b981; }
}

.sk-pill-arrow {
  font-size: 10px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

/* 2. Backdrop Mask */
.sk-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sk-drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* 3. Slide-over Drawer Panel */
.sk-drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 660px;
  max-width: 94vw;
  background: #080c14;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.85);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}

.sk-drawer-panel.active {
  transform: translateX(0);
}

/* Drawer Header */
.sk-header {
  padding: 16px 20px;
  background: rgba(13, 19, 31, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.sk-header-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sk-header-badge {
  font-size: 18px;
}

.sk-header-title {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
}

.sk-header-sub {
  font-size: 11px;
  color: #64748b;
  font-family: ui-monospace, monospace;
  margin-top: 2px;
}

.sk-close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.15s ease;
}

.sk-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* Drawer Scrollable Body */
.sk-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 4. Cache & Telemetry HUD Card */
.sk-hud-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.5));
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sk-hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.sk-cache-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #38bdf8;
  font-weight: 600;
}

.sk-cache-chip {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-family: ui-monospace, monospace;
}

.sk-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sk-refresh-btn:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.25);
  color: #ffffff;
  border-color: #38bdf8;
}

.sk-refresh-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.sk-hud-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-family: ui-monospace, monospace;
  color: #94a3b8;
}

.sk-meta-item strong {
  color: #e2e8f0;
}

.sk-hud-footer-hint {
  font-size: 10.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* 5. Filter & Search Toolbar */
.sk-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sk-filter-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.sk-filter-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 5px 11px;
  border-radius: 16px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.sk-filter-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

.sk-filter-pill.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 600;
}

.sk-search-wrapper {
  position: relative;
}

.sk-search-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 9px 12px 9px 34px;
  color: #f1f5f9;
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.15s ease;
}

.sk-search-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}

.sk-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: #64748b;
  pointer-events: none;
}

.sk-count-hint {
  font-size: 11px;
  color: #64748b;
  font-family: ui-monospace, monospace;
}

/* 6. Skills Cards List */
.sk-cards-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sk-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.sk-card:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.sk-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.sk-card-name {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  font-family: ui-monospace, monospace;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sk-card-badges {
  display: flex;
  align-items: center;
  gap: 5px;
}

.sk-badge-doc {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
}

.sk-badge-cat {
  background: rgba(255, 255, 255, 0.07);
  color: #94a3b8;
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 4px;
}

.sk-card-desc {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
}

.sk-card-expanded {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  color: #cbd5e1;
  font-family: ui-monospace, monospace;
  display: none;
}

.sk-card.expanded .sk-card-expanded {
  display: block;
}

/* 7. Bottom Infrastructure Telemetry Probes */
.sk-infra-footer {
  margin-top: auto;
  background: rgba(13, 19, 31, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 20px;
  font-size: 10.5px;
  font-family: ui-monospace, monospace;
  color: #64748b;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.sk-infra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sk-infra-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sk-infra-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #10b981;
}

/* Skeleton Loading State */
.sk-skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 200% 100%;
  animation: skLoading 1.5s infinite;
  border-radius: 6px;
  height: 60px;
}

@keyframes skLoading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
