/* ── Nginx UI: 전체 사이트 / 활성화 / 비활성화 ── */

#nginx-ui-summary .service-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#nginx-ui-summary .service-card > .service-title,
#nginx-ui-summary .service-card > .service-stats {
  grid-column: 1 / -1;
}

#nginx-ui-summary .service-card > .service-container {
  min-width: 0;
}



/* Nextcloud: 사용 용량 / 파일 개수 / 파일 공유를 3등분 */
#nextcloud-summary .service-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#nextcloud-summary .service-card > .service-title,
#nextcloud-summary .service-card > .service-stats {
  grid-column: 1 / -1;
}

#nextcloud-summary .service-card > .service-container {
  min-width: 0;
}

/* 파일 개수·파일 공유 위젯은 두 칸 사용 */
#nextcloud-summary .service-card > .service-container:last-child {
  grid-column: span 2;
}


/* Jellyfin: 사용 용량 / 영화 / 시리즈 */
#jellyfin-summary .service-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* 제목과 Docker 통계는 전체 너비 */
#jellyfin-summary .service-card > .service-title,
#jellyfin-summary .service-card > .service-stats {
  grid-column: 1 / -1;
}

#jellyfin-summary .service-card > .service-container {
  min-width: 0;
}

/* 영화·시리즈 위젯은 두 칸 차지 */
#jellyfin-summary .service-card > .service-container:last-child {
  grid-column: span 2;
}


/* 상단 시스템 위젯의 CPU / Free 문구 숨기기 */
[data-home-resources="true"]
[data-home-resource] .resource-value + div {
  display: none;
}

/* 원래 용량 대신 사용량/총용량 표시 */
[data-home-resources="true"]
.resource-value[data-home-capacity] {
  font-size: 0 !important;
  white-space: nowrap;
}

[data-home-resources="true"]
.resource-value[data-home-capacity]::after {
  content: attr(data-home-capacity);
  font-size: 12px;
}



/* FreshRSS 한글 라벨 */
#freshrss-summary .service-block-label {
  font-size: 0 !important;
}

#freshrss-summary .service-block-label::after {
  font-size: 12px;
}

/* 첫 번째 데이터: 읽지 않은 기사 */
#freshrss-summary .service-block:nth-child(1) {
  order: 2;
}

#freshrss-summary .service-block:nth-child(1) .service-block-label::after {
  content: "안읽음";
}

/* 두 번째 데이터: 구독 피드 */
#freshrss-summary .service-block:nth-child(2) {
  order: 1;
}

#freshrss-summary .service-block:nth-child(2) .service-block-label::after {
  content: "RSS 피드";
}


/* Paperless-ngx 한글 라벨 */
#paperless-summary .service-block-label {
  font-size: 0 !important;
}

#paperless-summary .service-block-label::after {
  font-size: 12px;
}

/* 첫 번째 데이터: 받은 문서함 → 오른쪽 */
#paperless-summary .service-block:nth-child(1) {
  order: 2;
}

#paperless-summary .service-block:nth-child(1) .service-block-label::after {
  content: "검토 대기";
}

/* 두 번째 데이터: 전체 문서 → 왼쪽 */
#paperless-summary .service-block:nth-child(2) {
  order: 1;
}

#paperless-summary .service-block:nth-child(2) .service-block-label::after {
  content: "전체 문서";
}


/* Speedtest 가공한 값 표시 */
#speedtest-summary .service-block-value[data-speedtest-formatted] {
  font-size: 0 !important;
}

#speedtest-summary .service-block-value[data-speedtest-formatted]::after {
  content: attr(data-speedtest-formatted);
  font-size: 14px;
}



/* Minecraft: 플레이어 목록 2열 */
#minecraft-summary .service-container:last-child > .flex.flex-col {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

/* 플레이어 링크 */
#minecraft-summary .service-container:last-child > .flex.flex-col > a {
  min-width: 0;
  min-height: 32px;
  text-decoration: none;
}

/* 닉네임 */
#minecraft-summary .service-container:last-child > .flex.flex-col > a > div:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 머리 스킨: 닉네임 왼쪽에 20px로 표시 */
#minecraft-summary .service-container:last-child > .flex.flex-col > a > div:first-child[data-minecraft-avatar] {
  padding-left: 30px;
  min-height: 24px;
  line-height: 24px;
  background-image: var(--minecraft-avatar);
  background-repeat: no-repeat;
  background-position: 4px center;
  background-size: 20px 20px;
  image-rendering: pixelated;
}

/* 온라인 상태 아이콘 */
#minecraft-summary .service-container:last-child > .flex.flex-col > a > div:last-child {
  flex-shrink: 0;
  margin-left: 4px;
}



/* 서비스 카드 배경·테두리 */
li.service > .service-card {
  background-color: rgba(15, 23, 42, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18) inset,
    0 4px 14px rgba(0, 0, 0, 0.35) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #f8fafc !important;
}

/* 카드 제목과 위젯 글자 */
li.service > .service-card .service-name,
li.service > .service-card .service-block-label,
li.service > .service-card .service-block-value,
li.service > .service-card .font-thin,
li.service > .service-card .font-bold {
  color: #f8fafc !important;
}

/* 설명은 제목보다 살짝 차분한 밝은 회색 */
li.service > .service-card .service-description {
  color: #cbd5e1 !important;
}

/* 마우스를 올리면 카드 테두리를 더 밝게 */
li.service > .service-card:hover {
  border-color: #ffffff !important;
}

/* 서비스·북마크 그룹 제목 아래 구분선 */
.services-group button:has(.service-group-name),
.bookmark-group button:has(.bookmark-group-name) {
  margin-bottom: 8px;
  padding: 0 4px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.65);
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.4),
    transparent 75%
  );
}

/* 서비스·북마크 그룹 제목 */
.services-group .service-group-name,
.bookmark-group .bookmark-group-name {
  padding: 0 !important;
  margin: 0 !important;
  color: #f8fafc !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}
/* 북마크 그룹 제목 버튼 */
.bookmark-group button {
  margin-bottom: 8px !important;
  padding: 0 4px 6px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.65) !important;
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.4),
    transparent 75%
  ) !important;
}

/* Developer, Social, Entertainment 제목 */
.bookmark-group .bookmark-group-name {
  color: #f8fafc !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}
/* 북마크 링크 카드 배경·테두리 */
li.bookmark > a {
  background-color: rgba(15, 23, 42, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18) inset,
    0 4px 14px rgba(0, 0, 0, 0.35) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #f8fafc !important;
}

/* GH·RE·YT 약자와 링크 이름 */
li.bookmark .bookmark-icon,
li.bookmark .bookmark-name {
  color: #f8fafc !important;
}

/* 오른쪽 도메인 주소 */
li.bookmark .bookmark-description {
  color: #cbd5e1 !important;
}

/* 마우스를 올렸을 때 */
li.bookmark > a:hover {
  border-color: #ffffff !important;
}
/* 상단 시스템 정보·검색·날씨 영역 */
#information-widgets {
  background-color: rgba(15, 23, 42, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #f8fafc !important;
}

/* 시스템 수치·아이콘·날씨 글자 */
#information-widgets [class*="text-theme-"] {
  color: #f8fafc !important;
}

/* 검색창 */
#information-widgets input {
  background-color: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  color: #f8fafc !important;
  caret-color: #ffffff;
}

/* 검색창 안내 문구 */
#information-widgets input::placeholder {
  color: #cbd5e1 !important;
  opacity: 1;
}
/* 다크 모드: 내부 위젯 칸의 배경과 경계 표시 */
html.dark li.service > .service-card .service-block {
  background-color: rgba(255, 255, 255, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
}
/* 상단 사용량 바: 전체 길이를 보여주는 바탕 */
#information-widgets .resource-usage {
  background-color: rgba(255, 255, 255, 0.25) !important;
}

/* 실제 사용량을 표시하는 부분 */
#information-widgets .resource-usage > div {
  background-color: rgba(255, 255, 255, 0.8) !important;
/* 상단 사용량 바: 전체 길이를 보여주는 바탕 */
#information-widgets .resource-usage {
  background-color: rgba(255, 255, 255, 0.25) !important;
}

/* 실제 사용량을 표시하는 부분 */
#information-widgets .resource-usage > div {
  background-color: rgba(255, 255, 255, 0.8) !important;
}}
