/* ============================================================
   DVTV-GPU Monitor v2 (55) — 050デイジーモニター統一デザイン
   ダークネオン / 二重リングゲージ / 角ブラケット
   テーマ干渉回避のため主要プロパティに !important
   ============================================================ */

.dvtv-gpu-widget {
  position: relative !important;
  isolation: isolate !important;
  width: 100% !important;
  max-width: 326px !important;
  min-width: 280px !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  padding: 12px 10px 13px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 18% 5%, rgba(0,229,255,.18), transparent 19%),
    radial-gradient(circle at 70% 12%, rgba(47,108,255,.15), transparent 24%),
    linear-gradient(180deg, #071126 0%, #030712 62%, #02040b 100%) !important;
  border: 1px solid rgba(54,127,255,.66) !important;
  box-shadow:
    0 0 0 4px #101010,
    0 0 0 5px #2d2d2d,
    0 22px 60px rgba(0,0,0,.72),
    inset 0 0 38px rgba(47,108,255,.12) !important;
  font-family: "SFMono-Regular", "Roboto Mono", "DejaVu Sans Mono", Consolas, monospace !important;
  color: #d9eeff !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
}
.dvtv-gpu-widget * { box-sizing: border-box; }
.dvtv-gpu-widget:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,229,255,.10), transparent 95px),
    repeating-linear-gradient(180deg, rgba(255,255,255,.025) 0, rgba(255,255,255,.025) 1px, transparent 1px, transparent 5px);
  background-size: auto, 100% 18px;
  animation: dvtv-gpu-scan 4.8s linear infinite;
}
.dvtv-gpu-widget:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0%, transparent 42%, rgba(0,229,255,.18) 49%, rgba(255,158,44,.11) 51%, transparent 58%, transparent 100%);
  transform: translateX(-135%);
  animation: dvtv-gpu-sweep 8.5s cubic-bezier(.2,.8,.2,1) infinite;
}
.dvtv-gpu-widget svg {
  display: block !important;
  max-width: none !important;
  transform-box: fill-box;
}

.dvtv-gpu-grid {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none; opacity: .65; z-index: 0;
  background-image:
    linear-gradient(rgba(47,108,255,.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47,108,255,.065) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at 50% 35%, #000 30%, transparent 82%);
  animation: dvtv-gpu-grid 18s linear infinite;
}

/* 角ブラケット */
.dvtv-gpu-c {
  position: absolute;
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 3;
  filter: drop-shadow(0 0 7px #00e5ff);
  animation: dvtv-gpu-corner 2.8s ease-in-out infinite;
}
.dvtv-gpu-c-tl { top: 6px; left: 6px; border-top: 2px solid #00e5ff; border-left: 2px solid #00e5ff; transform: skew(-14deg); }
.dvtv-gpu-c-tr { top: 6px; right: 6px; border-top: 2px solid #00e5ff; border-right: 2px solid #00e5ff; transform: skew(14deg); animation-delay: .45s; }
.dvtv-gpu-c-bl { bottom: 6px; left: 6px; border-bottom: 2px solid #00e5ff; border-left: 2px solid #00e5ff; transform: skew(14deg); animation-delay: .9s; }
.dvtv-gpu-c-br { bottom: 6px; right: 6px; border-bottom: 2px solid #00e5ff; border-right: 2px solid #00e5ff; transform: skew(-14deg); animation-delay: 1.35s; }

/* ヘッダー */
.dvtv-gpu-head {
  position: relative; z-index: 1;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 90px !important;
  gap: 8px;
  align-items: start !important;
  padding: 7px 8px 9px !important;
}
.dvtv-gpu-brand { display: flex !important; align-items: center !important; gap: 8px; min-width: 0; }
.dvtv-gpu-ic {
  position: relative !important;
  width: 50px !important;
  height: 50px !important;
  flex: 0 0 50px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(255,158,44,.65) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: radial-gradient(circle, #211006 0 35%, #071126 58%, #02050d 100%) !important;
  box-shadow: 0 0 0 3px rgba(255,158,44,.12), 0 0 20px rgba(255,158,44,.42), inset 0 0 13px rgba(255,158,44,.34) !important;
}
.dvtv-gpu-ic:before {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(255,158,44,.3);
  border-radius: 50%;
}
.dvtv-gpu-ic svg {
  position: relative !important;
  z-index: 1 !important;
  width: 41px !important;
  height: 41px !important;
  filter: drop-shadow(0 0 7px rgba(255,158,44,.8));
}
.dvtv-gpu-ic svg g {
  transform-origin: center;
  animation: dvtv-gpu-flower 7s linear infinite;
}
.dvtv-gpu-titlewrap { display: flex; flex-direction: column; min-width: 0; }
.dvtv-gpu-title {
  display: block !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  letter-spacing: 1px;
  color: #ff9e2c !important;
  line-height: .95;
  text-shadow: 0 0 11px rgba(255,158,44,.8);
}
.dvtv-gpu-title b { color: #ff9e2c !important; text-shadow: 0 0 11px rgba(255,158,44,.8); font-weight: 900; }
.dvtv-gpu-subtitle {
  display: block !important;
  margin-top: 4px !important;
  max-width: 132px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 7px !important;
  letter-spacing: .8px;
  color: #7893bd !important;
}
.dvtv-gpu-statbox { text-align: right; flex: 0 0 auto; display: flex; flex-direction: column; gap: 1px; padding-top: 2px; align-items: flex-end; }
.dvtv-gpu-status-label {
  display: block !important;
  color: #00e5ff !important;
  font-size: 6px !important;
  letter-spacing: .75px;
  line-height: 1;
}
.dvtv-gpu-online {
  font-size: 8px !important; color: #00e5ff !important;
  display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end;
  font-weight: 800 !important;
  line-height: 1.1;
}
.dvtv-gpu-online i { width: 5px; height: 5px; border-radius: 50%; background: #00e5ff; box-shadow: 0 0 8px #00e5ff; display: inline-block; animation: dvtv-gpu-pulse 1.6s ease-in-out infinite; }
.dvtv-gpu-clock {
  margin-top: 5px !important;
  font-size: 17px !important; font-weight: 900 !important; letter-spacing: 1px;
  color: #ff9e2c !important; text-shadow: 0 0 9px rgba(255,158,44,.75);
}
.dvtv-gpu-updated { margin-top: 2px !important; font-size: 6px !important; letter-spacing: .5px; color: #7893bd !important; white-space: nowrap; }

.dvtv-gpu-divider {
  display: none;
}

/* タブバー */
.dvtv-gpu-tabbar {
  position: relative; z-index: 1;
  display: grid !important;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  height: 18px;
  margin: 0 0 9px !important;
  padding: 0 8px !important;
  border: 1px solid rgba(47,108,255,.45);
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(47,108,255,.18), rgba(0,229,255,.04));
  box-shadow: inset 0 0 13px rgba(47,108,255,.12);
  font-size: 7px;
  overflow: hidden;
}
.dvtv-gpu-tabbar:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0%, transparent 42%, rgba(0,229,255,.18) 49%, transparent 56%, transparent 100%);
  transform: translateX(-120%);
  animation: dvtv-gpu-panel 7.2s ease-in-out infinite;
}
.dvtv-gpu-tab {
  padding: 0 !important;
  letter-spacing: .7px;
  clip-path: none;
  background: transparent !important;
  color: #d9eeff !important;
  border: 0 !important;
  font-weight: 800 !important;
}
.dvtv-gpu-tab2 {
  min-width: 0;
  overflow: hidden;
  padding: 0 !important;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: .75px;
  color: #00e5ff !important;
  font-weight: 800 !important;
}
.dvtv-gpu-status { margin-left: 0; font-size: 7px; letter-spacing: .5px; color: #7893bd !important; white-space: nowrap; }

/* body / system */
.dvtv-gpu-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 7px; }
.dvtv-gpu-system-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 7px; margin-top: 7px; }
.dvtv-gpu-system-body:empty { display: none; margin-top: 0; }

.dvtv-gpu-loading {
  font-size: 10px !important; color: #9fb5d3 !important;
  padding: 18px 8px; text-align: center;
  background: rgba(3,9,21,.72) !important; border: 1px solid rgba(47,108,255,.28) !important; border-radius: 6px;
}
.dvtv-gpu-error {
  font-size: 9px !important; color: #ff8da3 !important;
  background: rgba(60,12,24,.45) !important; border: 1px solid rgba(255,77,109,.4) !important;
  border-radius: 6px !important; padding: 10px !important; line-height: 1.5;
}
.dvtv-gpu-error code { display:block; margin-top:5px; font-size:8px; color:#8aa0c0; word-break:break-all; }

/* カード（パネル） */
.dvtv-gpu-card {
  position: relative;
  background: linear-gradient(180deg, rgba(8,20,43,.94), rgba(3,9,21,.84)) !important;
  border: 1px solid rgba(47,108,255,.24) !important;
  border-radius: 6px !important;
  padding: 8px !important;
  overflow: hidden;
  box-shadow: inset 0 0 18px rgba(47,108,255,.08) !important;
}
.dvtv-gpu-card:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(0,229,255,.10), transparent 22%, transparent 76%, rgba(255,158,44,.08));
}
.dvtv-gpu-card:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0%, transparent 42%, rgba(0,229,255,.13) 49%, transparent 56%, transparent 100%);
  transform: translateX(-120%);
  animation: dvtv-gpu-panel 9s ease-in-out infinite;
}
.dvtv-gpu-card:nth-child(2n):after { animation-delay: 2.1s; }
.dvtv-gpu-card-head { position: relative; z-index: 1; display: flex; align-items: center; gap: 5px; margin-bottom: 6px; min-width: 0; }
.dvtv-gpu-card-no { font-size: 8px; font-weight: 900; text-shadow: 0 0 7px rgba(47,108,255,.75); }
.dvtv-gpu-card-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 7px; letter-spacing: .7px; color: #9fb5d3; }

/* 大リング + 右メトリクス */
.dvtv-gpu-ringrow { position: relative; z-index: 1; display: flex; align-items: center; gap: 7px; }
.dvtv-gpu-ringwrap { position: relative; width: 94px; height: 94px; flex: 0 0 94px; overflow: visible; }
.dvtv-gpu-tempwrap { position: relative; width: 74px; height: 74px; flex: 0 0 74px; overflow: visible; }
.dvtv-gpu-ringwrap:after,
.dvtv-gpu-tempwrap:after,
.dvtv-gpu-mini:after {
  content: "";
  position: absolute;
  inset: 9%;
  z-index: 1;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 68%, rgba(0,229,255,.28) 74%, transparent 82% 100%);
  opacity: .55;
  animation: dvtv-gpu-orbit 4.8s linear infinite;
}
.dvtv-gpu-tempwrap:after { animation-duration: 3.8s; }
.dvtv-gpu-mini:after { inset: 14%; animation-duration: 4.2s; }
.dvtv-gpu-ringwrap > svg,
.dvtv-gpu-tempwrap > svg,
.dvtv-gpu-mini > svg { position: relative; z-index: 2; }
.dvtv-gpu-ringctr {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.dvtv-gpu-ringlbl { font-size: 6px; letter-spacing: 1px; color: #9fb5d3; }
.dvtv-gpu-ringnum { max-width: 82px; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; font-weight: 900; line-height: 1; }
.dvtv-gpu-ringunit { max-width: 82px; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-size: 7px; color: #7893bd; margin-top: 2px; text-transform: none; }
.dvtv-gpu-tempnum { max-width: 62px; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 900; line-height: 1.05; text-transform: none; }

.dvtv-gpu-metrics { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.dvtv-gpu-metric-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.dvtv-gpu-metric-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; color: #9fb5d3; }
.dvtv-gpu-metric-v { flex: 0 0 auto; font-size: 12px; font-weight: 900; color: #d9eeff; text-transform: none; }
.dvtv-gpu-metric-bar { height: 4px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; margin-top: 3px; }
.dvtv-gpu-metric-bar > span { display: block; height: 100%; border-radius: 3px; transition: width 1s ease; }
.dvtv-gpu-metric-bar > span { animation: dvtv-gpu-bar-glow 2.6s ease-in-out infinite; }

/* システム3連ミニリング */
.dvtv-gpu-trio { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dvtv-gpu-trio-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dvtv-gpu-mini { position: relative; width: 52px; height: 52px; overflow: visible; }
.dvtv-gpu-mini-ctr { position: absolute; z-index: 3; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.dvtv-gpu-trio-lbl { font-size: 7px; letter-spacing: .5px; color: #9fb5d3; }
.dvtv-gpu-trio-sub { max-width: 82px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 7px; color: #7893bd; text-transform: none; }

.dvtv-gpu-tag { display: flex; justify-content: space-between; font-size: 6.5px; letter-spacing: .5px; color: #6f88aa; margin-top: 6px; }

/* 高負荷点滅 */
.dvtv-gpu-blink { animation: dvtv-gpu-blink-anim 1s ease-in-out infinite; }
.dvtv-gpu-radar {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 54%;
  height: 54%;
  border: 1px solid var(--dvtv-radar, #00e5ff);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.88);
  box-shadow: 0 0 10px var(--dvtv-radar, #00e5ff), inset 0 0 8px rgba(0,229,255,.18);
  animation: dvtv-gpu-radar 2.2s ease-out infinite;
}
.dvtv-gpu-radar-b { animation-delay: 1.1s; }
@keyframes dvtv-gpu-blink-anim { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes dvtv-gpu-flower { to { transform: rotate(360deg); } }
@keyframes dvtv-gpu-radar {
  0% { opacity: .72; transform: translate(-50%, -50%) scale(.84); }
  68% { opacity: .18; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.72); }
}
@keyframes dvtv-gpu-grid { to { background-position: 44px 22px, 44px 22px; } }
@keyframes dvtv-gpu-scan { to { background-position: 0 0, 0 18px; } }
@keyframes dvtv-gpu-sweep {
  0%,52% { transform: translateX(-135%); opacity: 0; }
  58% { opacity: .7; }
  78%,100% { transform: translateX(135%); opacity: 0; }
}
@keyframes dvtv-gpu-corner {
  0%,100% { opacity: .8; filter: drop-shadow(0 0 6px #00e5ff); }
  50% { opacity: 1; filter: drop-shadow(0 0 13px #00e5ff); }
}
@keyframes dvtv-gpu-pulse {
  0%,100% { transform: scale(1); opacity: .75; }
  50% { transform: scale(1.75); opacity: 1; }
}
@keyframes dvtv-gpu-panel {
  0%,70% { transform: translateX(-120%); opacity: 0; }
  76% { opacity: .65; }
  100% { transform: translateX(120%); opacity: 0; }
}
@keyframes dvtv-gpu-orbit { to { transform: rotate(360deg); } }
@keyframes dvtv-gpu-bar-glow {
  0%,100% { filter: brightness(.9); }
  50% { filter: brightness(1.35); }
}

@media (prefers-reduced-motion: reduce) {
  .dvtv-gpu-widget,
  .dvtv-gpu-widget *,
  .dvtv-gpu-widget:before,
  .dvtv-gpu-widget:after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 320px) {
  .dvtv-gpu-widget {
    min-width: 0 !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  .dvtv-gpu-head {
    padding-left: 6px !important;
    padding-right: 6px !important;
    grid-template-columns: minmax(0, 1fr) 84px !important;
  }
  .dvtv-gpu-title { font-size: 18px !important; }
  .dvtv-gpu-clock { font-size: 15px !important; }
  .dvtv-gpu-ringwrap {
    width: 88px;
    height: 88px;
    flex-basis: 88px;
  }
  .dvtv-gpu-tempwrap {
    width: 68px;
    height: 68px;
    flex-basis: 68px;
  }
  .dvtv-gpu-ringnum { font-size: 18px; }
  .dvtv-gpu-tempnum { font-size: 13px; }
}

/* ============================================================
   Settings UI（ダークネオン）
   ============================================================ */
.dvtv-gpu-settings { width: 100%; max-width: 680px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.dvtv-gpu-settings-card {
  border: 1px solid rgba(80,120,255,.22) !important;
  border-radius: 12px !important; padding: 14px !important;
  background: rgba(10,16,36,.85) !important; color: #cfe6ff !important;
  box-shadow: 0 0 18px rgba(47,123,255,.08); margin-bottom: 14px;
}
.dvtv-gpu-settings-title { font-weight: 800 !important; font-size: 14px !important; color: #ff9e2c !important; margin-bottom: 12px; text-shadow: 0 0 8px rgba(255,158,44,.4); }
.dvtv-gpu-settings-row { margin-bottom: 12px; }
.dvtv-gpu-settings-label { display: block; font-weight: 700 !important; font-size: 11px !important; color: #8aa0c0 !important; margin-bottom: 6px; }
.dvtv-gpu-settings-input {
  width: 100% !important; box-sizing: border-box !important;
  border: 1px solid rgba(80,120,255,.3) !important; border-radius: 9px !important;
  padding: 9px !important; font-size: 12px !important; outline: none !important;
  background: rgba(6,10,22,.8) !important; color: #cfe6ff !important;
}
.dvtv-gpu-settings-input:focus { border-color: #2f7bff !important; box-shadow: 0 0 0 3px rgba(47,123,255,.2) !important; }
.dvtv-gpu-settings-hint { font-size: 9px !important; color: #6f88aa !important; margin-top: 4px; }
.dvtv-gpu-settings-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.dvtv-gpu-btn {
  border: 1px solid rgba(80,120,255,.35) !important; background: rgba(20,30,60,.7) !important;
  border-radius: 9px !important; padding: 8px 14px !important; font-size: 12px !important;
  color: #cfe6ff !important; cursor: pointer; transition: all .2s ease;
}
.dvtv-gpu-btn:hover { background: rgba(30,44,80,.85) !important; }
.dvtv-gpu-btn:disabled { opacity: .55; cursor: not-allowed; }
.dvtv-gpu-btn-primary { background: linear-gradient(135deg,#2f7bff,#1e5fd6) !important; border-color: #2f7bff !important; color: #fff !important; }
.dvtv-gpu-btn-primary:hover { background: linear-gradient(135deg,#3a86ff,#2f7bff) !important; }
.dvtv-gpu-settings-msg { font-size: 11px !important; }
.dvtv-gpu-settings-msg.ok { color: #19e68c !important; }
.dvtv-gpu-settings-msg.ng { color: #ff4d6d !important; }
.dvtv-gpu-settings-deny { padding: 10px; border: 1px solid rgba(255,77,109,.4); background: rgba(60,12,24,.4); color: #ff8da3; border-radius: 10px; }

/* 再起動 */
.dvtv-gpu-restart-card { border-color: rgba(255,158,44,.35) !important; }
.dvtv-gpu-restart-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.dvtv-gpu-btn-restart { flex: 1; min-width: 150px; padding: 12px 16px !important; font-size: 13px !important; font-weight: 600; text-align: center; line-height: 1.4; border-radius: 9px !important; }
.dvtv-gpu-btn-restart small { display: block; font-size: 10px; font-weight: 400; opacity: .85; margin-top: 2px; }
.dvtv-gpu-btn-warning { background: linear-gradient(135deg,#ff9e2c,#d97706) !important; border-color: #b45309 !important; color: #1a1206 !important; }
.dvtv-gpu-btn-warning:hover { background: linear-gradient(135deg,#ffb02e,#ff9e2c) !important; }
.dvtv-gpu-btn-danger { background: linear-gradient(135deg,#ff4d6d,#dc2626) !important; border-color: #b91c1c !important; color: #fff !important; }
.dvtv-gpu-btn-danger:hover { background: linear-gradient(135deg,#ff667f,#ff4d6d) !important; }
.dvtv-gpu-restart-status { padding: 10px 12px; border-radius: 8px; font-size: 12px; min-height: 18px; }
.dvtv-gpu-restart-status:empty { display: none; }
.dvtv-gpu-restart-status.info { background: rgba(47,123,255,.12); border: 1px solid rgba(47,123,255,.4); color: #7ab5ff; }
.dvtv-gpu-restart-status.success { background: rgba(25,230,140,.12); border: 1px solid rgba(25,230,140,.4); color: #19e68c; }
.dvtv-gpu-restart-status.error { background: rgba(255,77,109,.12); border: 1px solid rgba(255,77,109,.4); color: #ff8da3; }
.dvtv-gpu-restart-status.warning { background: rgba(255,158,44,.12); border: 1px solid rgba(255,158,44,.4); color: #ffb02e; }
