/* 라이트 모드 다크 모드 부분 */
:root {
    --bg-primary: #e2e8f0 !important;
    --bg-primary2: #f1f1f1 !important;
    --bg-nav: #ffffff;
    --bg-secondary: #f9f9f9 !important;
    --text-primary: #000000 !important;
    --text-primary2: #000000 !important;
    --text-secondary: #666666 !important;
    --text-tertiary: #888888 !important;
    --border-color: #dddddd !important;
    --chart-bg: #ffffff !important;
    --stats-bg: #e8f5e9 !important;
    --notice-bg: #f5e8e8 !important;
    --notice2-bg: #e0f2fe !important;
    --search-bg: #f4f5e8 !important;
    --text-usercard: #e0f0ff !important;
    --text-usercard-name: #222222 !important;
    --dropdown-hover: #f0f0f0 !important;
    --card-bg: #f9f9f9 !important;
} 

[data-theme="dark"] {
    --bg-primary: #111827 !important;
    --bg-primary2: #182135 !important;
    
    --bg-nav: #1f2937;
    --bg-secondary: #2d2d2d !important;
    --text-primary: #ffffff !important;
    --text-primary2: #000000 !important;
    --text-secondary: #cccccc !important;
    --text-tertiary: #999999 !important;
    --border-color: #404040 !important;
    --chart-bg: #2d2d2d !important;
    --stats-bg: #2d4731 !important;
    --notice-bg: #472d2d !important;
    --notice2-bg: #1e3a5f !important;

    --search-bg: #47462d !important;
    --text-usercard: #fdf5e6 !important;
    --text-usercard-name: #f2f2f2 !important;

    --dropdown-hover: #404040 !important;
    --card-bg: #2d2d2d !important;
}

.tooltip-error {
    position: absolute;
    background: #ff4d4d;
    color: #fff;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 60;
}

.bodys {
    font-family: Arial, sans-serif !important;
    max-width: 1200px !important;
    margin: 20px auto !important;
    padding: 0 20px !important;
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    transition: background-color 0.3s, color 0.3s !important;
}

#admin-controls{
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;

}

body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    transition: background-color 0.3s, color 0.3s !important;
}

nav {
    background-color: var(--bg-nav) !important;
    border: 1px solid var(--border-color) !important;
    transition: background-color 0.3s, color 0.3s !important;
}
nav div {
    background-color: var(--bg-nav) !important;
    color: var(--text-primary) !important;
    transition: background-color 0.3s, color 0.3s !important;
}



header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;
}

.theme-toggle {
    background-color: none !important;
    border: none !important;
    border-radius: 50% !important;
    width: 42px !important;
    height: 42px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.3rem !important;
    padding: 0 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
    transition: all 0.3s ease !important;
}
.drop-flag {
    width: 32px !important;
}


.theme-toggle:hover {
    background-color: var(--dropdown-hover) !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15) !important;
    transform: translateY(-1px) !important;
}

.theme-toggle:active {
    transform: scale(0.95) !important;
}
[data-theme="dark"] .light-icon,
.dark-icon {
    display: none !important;
}

[data-theme="dark"] .dark-icon,
.light-icon {
    display: block !important;
}

.index label,
.index input,
.index select {
    font-size: 1.2em !important;
    margin-right: 10px !important;
    color: var(--text-primary) !important;
}

.index select {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
}

.filter-controls {
    margin-bottom: 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}
.filter-controls {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    margin-bottom: 1.5rem !important;
    align-items: flex-start !important; 
  }
  
  .filter-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 1.5rem !important;
    align-items: center !important;
  }
  .filter-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }

  #spyflag {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.95em;
  }
  
  @media (max-width: 768px) {
    .filter-row {
      flex-wrap: wrap !important;
    }
  }
.dropdown {
    position: relative !important;
    display: inline-block !important;
    /* min-width: 250px !important; */
}

.dropdown-btn {
    /* width: auto !important; */
    /* min-width: 320px !important; */
    padding: 8px 12px !important;
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 1em !important;
    color: var(--text-primary) !important;
}

.dropdown-content {
    display: none !important;
    position: absolute !important;
    background-color: var(--bg-secondary) !important;
    min-width: 100% !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 4px !important;
    z-index: 1000 !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    margin-top: 4px !important;
}

.dropdown-content.show {
    display: block !important;
}

.dropdown-item {
    padding: 8px 12px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: var(--text-primary) !important;
}

.dropdown-item:hover {
    background-color: var(--dropdown-hover) !important;
}
.btn-link{

    color: white !important;
}
/* 탭 바 */
.tabs { display:flex; border-bottom:1px solid #e5e7eb; gap:8px; }

/* 탭 버튼 */
.tab-btn {
  padding:8px 16px; font:500 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background:transparent; border:0; border-bottom:2px solid transparent; color:#6b7280; cursor:pointer;
}
.tab-btn:focus { outline:none; }

/* 활성/비활성 상태 */
.tab-btn.is-active { border-color:#4f46e5; color:#4f46e5; }
.tab-btn.is-inactive { border-color:transparent; color:#6b7280; }

/* 섹션 보임/숨김 (커스텀 CSS가 강하면 !important 사용) */
.tab-section { display:none !important; }
.tab-section.is-visible { display:block !important; }
/* ====== 공통 배지 스타일(크기/레이아웃) ====== */
/* ===== 스코프: 매칭 영역 전용 ===== */
#matchApp .badgesss{
  display:inline-flex; align-items:center; gap:.5rem;
  padding:.5rem 1rem; border-radius:9999px;
  font-weight:700; font-size:1.125rem; line-height:1.5rem; /* 배지 크게 */
  transition:background-color .2s,color .2s,box-shadow .2s,border-color .2s;
  border:1px solid transparent;
  box-shadow:0 1px 2px rgba(0,0,0,.06);
}

/* 랭크(중요 강조) — BLUE → ROSE */
#matchApp[data-mode="rank"] .badgesss{
  background:linear-gradient(90deg,#fecaca,#fda4af); /* rose-200 → 300 */
  color:#7f1d1d;                                     /* rose-900 */
  border-color:rgba(244,63,94,.35);                  /* rose-500 */
  box-shadow:0 2px 6px rgba(244,63,94,.20);
}
html[data-theme="dark"] #matchApp[data-mode="rank"] .badgesss{
  background:linear-gradient(90deg,#7f1d1d,#9f1239); /* rose-900 → 800 */
  color:#ffe4e6;                                     /* rose-100 */
  border-color:rgba(244,63,94,.45);
  box-shadow:0 2px 6px rgba(244,63,94,.28);
}

/* 퀵(기존 느낌 유지: 에메랄드/라임) */
#matchApp[data-mode="quick"] .badgesss{
  background:linear-gradient(90deg,#86efac,#bef264); /* emerald → lime */
  color:#052e16;
  border-color:rgba(16,185,129,.35);
  box-shadow:0 2px 6px rgba(16,185,129,.20);
}
html[data-theme="dark"] #matchApp[data-mode="quick"] .badgesss{
  background:linear-gradient(90deg,#065f46,#3f6212);
  color:#d1fae5;
  border-color:rgba(5,150,105,.45);
  box-shadow:0 2px 6px rgba(5,150,105,.28);
}
/* 플레이어 매치(세션) — VIOLET */
#matchApp[data-mode="session"] .badgesss{
  background: linear-gradient(90deg, #ddd6fe, #c4b5fd); /* violet-200 → 300 */
  color: #4c1d95;                                      /* violet-900 */
  border-color: rgba(139, 92, 246, .35);               /* violet-500 */
  box-shadow: 0 2px 6px rgba(139, 92, 246, .20);
}
html[data-theme="dark"] #matchApp[data-mode="session"] .badgesss{
  background: linear-gradient(90deg, #4c1d95, #6d28d9); /* violet-900 → 700 */
  color: #ede9fe;                                       /* violet-100 */
  border-color: rgba(139, 92, 246, .45);
  box-shadow: 0 2px 6px rgba(139, 92, 246, .28);
}
/* 모드별 문구 토글(원하면 CSS만으로도 가능) */
#matchApp[data-mode="rank"]  #rankLatestWrap{ display:inline; }
#matchApp[data-mode="quick"] #rankLatestWrap{ display:none;  }
#matchApp[data-mode="session"] #rankLatestWrap{ display:none;  }

.tabs .tab-btn { position: relative; }

.tabs .tab-btn .tab-badge{
  position: absolute;
  top: 6px;           /* 필요시 미세조정 */
  right: 5px;        /* 필요시 미세조정 */
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: #ef4444;        /* 빨간 점 */
  box-shadow: 0 0 0 2px white;/* 다크라면 적절히 조정 */
  pointer-events: none;       /* 클릭 방해 X */
}
[data-theme="dark"] .tabs .tab-btn .tab-badge {
  box-shadow: 0 0 0 2px #0f172a; /* 다크 배경색(예: slate-900) 테두리 */
}
.user-list {
    display: grid ;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 15px !important;
    margin-top: 20px !important;
}

.user-card {
    position: relative !important;
    border: 1px solid var(--border-color);
    padding-inline: 15px !important;
    border-radius: 8px !important;
    background-color: var(--card-bg) !important;
    height: 140px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}
.info-icon {
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    font-size: 14px !important;
    background: rgba(0,0,0,0.6) !important;
    color: white !important;
    border-radius: 50% !important;
    width: 18px !important;
    height: 18px !important;
    text-align: center !important;
    line-height: 18px !important;
    cursor: pointer !important;
    z-index: 2 !important;
}


.tooltip {
    display: none;
    position: absolute !important;
    top: 24px !important;
    right: 0 !important;
    background: rgba(0,0,0,0.6) !important;
    color: white !important;
    padding: 6px 8px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    text-align: left !important;
    white-space: nowrap !important;
    z-index: 3 !important;
}



.info-icon:hover .tooltip {
    display: block !important;
}

.tooltip2 {
    background-color: orange !important;
    color: white !important;
    padding: 3px 6px !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    font-size: 0.8em !important;
    z-index: 50 !important;
    pointer-events: none !important; /* 툴팁이 마우스를 가리지 않게 처리 */
}
.info-icon2:hover .tooltip2 {
    display: inline-block !important;
}

.tooltip3 {
    background-color: red !important;
    color: white !important;
    padding: 3px 6px !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    font-size: 0.8em !important;
    z-index: 50 !important;
    pointer-events: none !important; /* 툴팁이 마우스를 가리지 않게 처리 */
}
.info-icon3:hover .tooltip3 {
    display: inline-block !important;
}


.user-info {
    flex: 0 0 60% !important;
    padding-right: 10px !important;
}

a {
    color: inherit !important;
    text-decoration: inherit !important;
}

a:hover {
    text-decoration: underline !important;
}


.user-info .name {
    /* font-size: 1em !important; */
    font-weight: bold !important;
    margin-bottom: 3px !important;
    display: block !important;
    white-space: nowrap !important; /* 줄 바꿈을 방지 */
    overflow: hidden !important; /* 넘치는 텍스트 숨기기 */
    text-overflow: ellipsis !important; /* 넘칠 경우 '...'으로 표시 */
}

.user-info .power {
    /* color: var(--text-secondary) !important; */
    margin-bottom: 4px !important;
    display: block !important;
    font-size: 0.8em !important;
}

.user-info .last-seen {
    color: var(--text-tertiary) !important;
    font-size: 0.7em !important;
    display: block !important;
}


.user-info .last-seen2 {
    color: var(--text-tertiary) !important;
    font-size: 0.7em !important;
    display: block !important;
}

.user-info .lang {
    color: var(--text-tertiary) !important;
    font-size: 0.7em !important;
    display: block !important;
}

.user-info .vs {
    color: var(--text-tertiary) !important;
    font-size: 0.7em;
    white-space: nowrap !important; /* 줄 바꿈을 방지 */
    overflow: hidden !important; /* 넘치는 텍스트 숨기기 */
    text-overflow: ellipsis !important; /* 넘칠 경우 '...'으로 표시 */
    display: inline-block;
}

.rank-container {
    flex: 0 0 40% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    border-left: 0px solid var(--border-color) !important;
    padding-left: 0px !important;
}

.character-name {
    width: 100% !important;
    text-align: center !important;
    font-weight: bold !important;
    margin-top: 8px !important;
    display: block !important;
}

.rank-img {
    height: auto !important;
    width: 65% !important;
    display: block !important;
    margin-top: 55px !important;
    margin-left: 30px !important;

}




.spin i {
    transform: rotate(360deg) !important;
}


.dropdown-img {
    height: 24px !important;
    width: auto !important;
    vertical-align: middle !important;
}


.stats {
    margin-top: 10px !important;
    padding: 10px !important;
    background-color: var(--stats-bg) !important;
    border-radius: 4px !important;
}

.notice {
    margin-top: 10px !important;
    padding: 10px !important;
    background-color: var(--notice-bg) !important;
    border-radius: 4px !important;
}
.notice2 {
    margin-top: 10px !important;
    padding: 10px !important;
    background-color: var(--notice2-bg) !important;
    border-radius: 4px !important;
}

.loading {
    text-align: center !important;
    padding: 20px !important;
    grid-column: 1 / -1 !important;
    font-style: italic !important;
    color: var(--text-secondary) !important;
}

.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
  }
  
  .chart-wrapper,
  .chart-wrapper-wide {
    background: var(--chart-bg);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-sizing: border-box;
    width: 100%;
  }
  
  /* 위쪽 2개 공통 높이 */
  .chart-wrapper {
    height: 350px;
  }

  .chart-wrapper2 {
    background: var(--chart-bg);
    border-radius: 8px;
    height: 350px;
    padding: 5px;
    border: 1px solid var(--border-color);
    box-sizing: border-box;
    width: 100%;
    overflow-x: auto;

  }
  
  /* 아래 승률 차트 - 더 넓고 반응형 */
  .chart-wrapper-wide {
    height: 300px;
    max-width: 100%;
    overflow-x: auto;
  }

#topBtn, #refreshButton, #report {
    position: fixed !important;
    padding: 12px 20px !important;
    font-size: 18px !important;
    bottom: 20px !important;
    width: 50px !important; /* 버튼 크기 설정 */
    height: 50px !important; /* 버튼 크기 설정 */
    border-radius: 30px !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    z-index: 9999;
}

#refreshButton i {
    transition: transform 0.5s !important;
}


#topBtn {
    right: 85px !important;
    display: none !important;
    background-image: url('/static/image/top.png') !important; /* 이미지 파일 경로 */
    background-size: cover !important; /* 이미지가 버튼에 꽉 차게 설정 */
    background-position: center !important; /* 이미지 위치 설정 */
}

#refreshButton {
    right: 20px !important;
    background-image: url('/static/image/refresh.png') !important; /* 이미지 파일 경로 */
    background-size: cover !important; /* 이미지가 버튼에 꽉 차게 설정 */
    background-position: center !important; /* 이미지 위치 설정 */
}

#report {
    right: 20px !important;
    bottom: 80px !important;
    background-image: url('/static/image/report.png') !important; /* 이미지 파일 경로 */
    background-size: cover !important; /* 이미지가 버튼에 꽉 차게 설정 */
    background-position: center !important; /* 이미지 위치 설정 */
    background-color: #0056b3 !important;

}
 
#topBtn:hover, #refreshButton:hover, #report:hover {
    transform: translateY(-4px) !important;
    background-color: #0056b3 !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2) !important;
}

#refreshButton:hover {
    transform: rotate(360deg) !important;
}

/* 로딩 화면 중앙에 표시 */
#loading-spinner {
    display: none;
    position: fixed !important;
    z-index: 9998 !important;            /* 다른 콘텐츠보다 위에 오도록 */
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    text-align: center !important;
}




.search-bar {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex-wrap: wrap !important;
}

.search-bar label {
    font-size: 1em !important;
    color: var(--text-primary) !important;
    margin-right: 4px !important;
}

.search-bar input[type="text"] {
    padding: 6px 10px !important;
    font-size: 1em !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 4px !important;
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    min-width: 200px !important;
    height: 40px !important;

}

#powerinput {
    padding: 6px 10px !important;
    font-size: 1em !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 4px !important;
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    /* max-width: 100px !important; */
    height: 40px !important;

}


#userSearch {
    border: 1px solid var(--border-color) !important;
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;

}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

/* Firefox */
input[type="number"] {
  -moz-appearance: textfield;
  appearance: none;
}
.searchNotice {
    margin-top: 10px !important;
    padding: 10px !important;
    background-color: var(--search-bg) !important;
    border-radius: 4px !important;
}

.search-bar button {
    padding: 6px 12px !important;
    height: 40px !important;
    width: 80px !important;
    font-size: 0.95em !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    background-color: #007bff !important;
    color: white !important;
    transition: background-color 0.2s !important;
}

.search-bar button:hover {
    background-color: #0056b3 !important;
}
#playerList {
  overflow-x: hidden;
}
.search-bar2 button {
    padding: 6px 12px !important;
    height: 40px !important;
    width: 80px !important;
    font-size: 0.95em !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    background-color: #d34812 !important;
    color: white !important;
    transition: background-color 0.2s !important;
}

.search-bar2 button:hover {
    background-color: #a1370d !important;
}

@media (max-width: 900px) {
    .user-list {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .user-list {
        grid-template-columns: 1fr !important;
    }
    
    .chart-wrapper {
        height: 300px !important;
    }
}

@media (max-width: 800px) {
    .charts-container {
        grid-template-columns: 1fr !important;
    }
}


/* 회전 애니메이션 */
@keyframes spin {
    0% { transform: rotate(0deg) !important; }
    100% { transform: rotate(360deg) !important; }
}

  .flaming {
    color: var(--text-primary) !important;
    text-shadow: 0 0 20px #fefcc9,
      10px -10px 30px #feec85,
      -20px -20px 40px #ffae34,
      20px -40px 50px #ec760c,
      -20px -60px 60px #cd4606,
      0 -80px 70px #973716,
      10px -90px 80px #451b0e ;
    animation: flame-flicker 1.5s infinite ease-in-out alternate ;
  }
  
  @keyframes flame-flicker {
    0% {
      text-shadow: 0 0 10px #fefcc9,
        8px -8px 20px #feec85,
        -16px -16px 30px #ffae34,
        16px -32px 40px #ec760c,
        -16px -48px 50px #cd4606,
        0 -64px 60px #973716,
        8px -72px 70px #451b0e ;
    }
  
    100% {
      text-shadow: 0 0 20px #fefcc9,
        10px -10px 30px #feec85,
        -20px -20px 40px #ffae34,
        20px -40px 50px #ec760c,
        -20px -60px 60px #cd4606,
        0 -80px 70px #973716,
        10px -90px 80px #451b0e ;
    }
  }
  /* 플레이어매치: UL에 pm-zebra 클래스를 주면 지브라 발동 */
#playerList.pm-zebra > li.pm-item { 
  --pm-border: rgba(100,116,139,.35);      /* slate-500-ish */
  --pm-text:   #0f172a;                    /* slate-900 */
  --pm-meta:   #334155;                    /* slate-700 */
  --pm-grad-a: #ffffff;                    /* base */
  --pm-grad-b: #f1f5f9;                    /* slate-100 */
  --pm-hover-a:#f8fafc;                    /* slate-50  */
  --pm-hover-b:#e2e8f0;                    /* slate-200 */
  color: var(--pm-text);
  border: 1px solid var(--pm-border);
  border-radius: .75rem;                   /* rounded-xl */
  background: linear-gradient(90deg,var(--pm-grad-a),var(--pm-grad-b));
  transition: background-color .2s ease, box-shadow .2s ease, transform .08s ease;
  box-shadow: 0 1px 0 rgba(2,6,23,.03);
}

/* light zebra */
#playerList.pm-zebra > li.pm-item:nth-child(odd) {
  --pm-grad-a: #ffffff;
  --pm-grad-b: #eef2f7;                    /* 약간 더 진하게 */
}
#playerList.pm-zebra > li.pm-item:nth-child(even) {
  --pm-grad-a: #fafcff;
  --pm-grad-b: #f1f5f9;
}

/* hover */
#playerList.pm-zebra > li.pm-item:hover {
  --pm-grad-a: var(--pm-hover-a);
  --pm-grad-b: var(--pm-hover-b);
  box-shadow: 0 6px 18px rgba(2,6,23,.08);
}

/* 다크 모드 전역 색 */
html[data-theme="dark"] #playerList.pm-zebra > li.pm-item {
  --pm-border: rgba(71,85,105,.55);   /* slate-600 */
  --pm-text:   #e2e8f0;               /* slate-200 */
  --pm-meta:   #cbd5e1;               /* slate-300 */
  --pm-grad-a: #0f172a;               /* slate-900 */
  --pm-grad-b: #1f2937;               /* gray-800-ish */
  --pm-hover-a:#111827;               /* gray-900 */
  --pm-hover-b:#243244;               /* slate-800+ */
  color: var(--pm-text);
  box-shadow: 0 1px 0 rgba(0,0,0,.25);
}

/* 다크 zebra */
html[data-theme="dark"] #playerList.pm-zebra > li.pm-item:nth-child(odd) {
  --pm-grad-a: #0f172a;
  --pm-grad-b: #1b2431;
}
html[data-theme="dark"] #playerList.pm-zebra > li.pm-item:nth-child(even) {
  --pm-grad-a: #121a26;
  --pm-grad-b: #212b3a;
}

/* 다크 호버 */
html[data-theme="dark"] #playerList.pm-zebra > li.pm-item:hover {
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}

/* 내부 텍스트 톤(메타) */
#playerList.pm-zebra .pm-meta {
  color: var(--pm-meta);
}

/* 작은 배지 공통(플랫폼/언어) */
#playerList.pm-zebra .pm-badge {
  border: 1px solid rgba(148,163,184,.6);   /* slate-400 */
  background: rgba(255,255,255,.6);
  color: var(--pm-text);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1;
}
html[data-theme="dark"] #playerList.pm-zebra .pm-badge {
  background: rgba(30,41,59,.6);            /* slate-800 */
  border-color: rgba(100,116,139,.6);       /* slate-500 */
}

/* PID 버튼 */
#playerList.pm-zebra .pm-btn {
  border: 1px solid rgba(148,163,184,.6);
  background: rgba(255,255,255,.4);
  color: var(--pm-text);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
}
#playerList.pm-zebra .pm-btn:hover {
  background: rgba(255,255,255,.75);
}
html[data-theme="dark"] #playerList.pm-zebra .pm-btn {
  background: rgba(30,41,59,.4);
  border-color: rgba(100,116,139,.6);
}
html[data-theme="dark"] #playerList.pm-zebra .pm-btn:hover {
  background: rgba(51,65,85,.6);            /* slate-700 */
}

/* 신호바 컨테이너 살짝 세워 보이게 */
#playerList.pm-zebra .pm-signal { width: 24px; display: flex; justify-content: center; }
.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: #4f46e5; /* indigo-600 */
  color: #fff;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

/* Hover */
.btn-refresh:hover {
  background-color: #4338ca; /* indigo-700 */
  transform: translateY(-1px);
}

/* Focus */
.btn-refresh:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.45); /* indigo-500 ring */
}

/* Disabled */
.btn-refresh:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ── 다크모드 ───────────────────── */
html.dark .btn-refresh {
  background-color: #6366f1; /* indigo-500 */
  color: #e0e7ff; /* indigo-100 */
}

html.dark .btn-refresh:hover {
  background-color: #818cf8; /* indigo-400 */
}

html.dark .btn-refresh:focus {
  box-shadow: 0 0 0 3px rgba(165, 180, 252, 0.5); /* indigo-300 */
}
/* 플랫폼 아이콘 공통 스타일 */
.pm-plat img { width: 1rem; height: 1rem; display: inline-block; vertical-align: middle; }

/* 라이트/다크 토글 */
.pm-plat .pm-light { display: inline; }
.pm-plat .pm-dark  { display: none; }

/* 다크 모드 기준: html.dark 또는 html[data-theme="dark"] */
html.dark .pm-plat .pm-light,
html[data-theme="dark"] .pm-plat .pm-light { display: none; }

html.dark .pm-plat .pm-dark,
html[data-theme="dark"] .pm-plat .pm-dark { display: inline; }

.slot-tooltip {
  position: relative;
  cursor: help;
}

.slot-tooltip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 125%; /* 위쪽 표시 */
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(55, 65, 81, 0.9); /* Tailwind gray-700 */
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 50;
}

.slot-tooltip::before {
  content: '';
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(55, 65, 81, 0.9);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 50;
}

.slot-tooltip:hover::after,
.slot-tooltip:hover::before {
  opacity: 1;
}


.slot-tooltip2 {
  position: relative;
  cursor: help;
}

.slot-tooltip2::after {
  content: attr(data-tip);
  position: absolute;
  top: 125%; 
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(55, 65, 81, 0.9); /* Tailwind gray-700 */
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 50;
}

.slot-tooltip2::before {
  content: '';
  position: absolute;
  top: 115%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(55, 65, 81, 0.9);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 50;
}

.slot-tooltip2:hover::after,
.slot-tooltip2:hover::before {
  opacity: 1;
}
.empty-room {
  text-align: center;
  font-size: 0.9rem;        /* text-sm */
  color: #6b7280;           /* gray-500 */
  padding: 1.5rem 1rem;     /* px-4 py-6 정도 */
  border: 1px dashed #9ca3af; /* gray-400 */
  border-radius: 0.75rem;   /* rounded-lg */
  background-color: #f9fafb; /* 밝은 회색 배경 */
}

.dark .empty-room {
  color: #9ca3af;           /* dark:text-gray-400 */
  border-color: #4b5563;    /* dark:border-gray-600 */
  background-color: #1f2937; /* dark:bg-gray-800 */
}

.hack-headline {
  background: linear-gradient(to right, #400 0%, #800 50%, #400 100%);
  border-left: 6px solid #c00;
  border-right: 6px solid #c00;
  color: #fff200;
  font-weight: bold;
  text-shadow: 0 0 6px #000, 0 0 10px #c00;
  padding: 8px 16px;
  white-space: nowrap;
  overflow: hidden;
  text-align: center;
}

.hack-headline span {
  display: inline-block;
  padding-left: 100%;
  animation: headline-scroll 12s linear infinite;
}

@keyframes headline-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}