* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: url('background.webp') center center / cover no-repeat fixed;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  position: relative;
  overflow-x: hidden;
  display: flex;
}

/* Dark overlay for better text readability */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 0;
}

/* Sidebar */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 280px;
  height: 100vh;
  background: rgba(20, 20, 40, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
}

.sidebar-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.inline-icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: -2px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.server-status-item {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s;
}

.server-status-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
}

.server-status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.server-name {
  color: white;
  font-weight: 600;
  font-size: 1rem;
}

.server-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.server-status-dot.online {
  background: #4ade80;
  box-shadow: 0 0 12px #4ade80;
}

.server-status-dot.offline {
  background: #f87171;
  box-shadow: 0 0 12px #f87171;
}

.server-status-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.server-status-text {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  font-weight: 500;
}

.server-status-text.online {
  color: #4ade80;
}

.server-status-text.offline {
  color: #f87171;
}

.server-players {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Main content with sidebar offset */
.main-content {
  margin-left: 280px;
  width: calc(100% - 280px);
  padding: 20px;
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

header {
  text-align: center;
  color: white;
  margin-bottom: 40px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

header h1 {
  font-size: 2.8rem;
  margin-bottom: 10px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.85;
  font-weight: 400;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 24px;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px 0 rgba(31, 38, 135, 0.5);
  border-color: rgba(255, 255, 255, 0.3);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card.current { 
  border-top: 3px solid #4ade80;
}

.stat-card.peak { 
  border-top: 3px solid #fbbf24;
}

.stat-card.info { 
  border-top: 3px solid #60a5fa;
}

.stat-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.stat-icon-img {
  width: 44px;
  height: 44px;
  display: block;
}

.stat-icon-img2 {
  width: 20px;
  height: 20px;
  display: inline-block;
  margin-right: 5px;
}

.stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  margin-bottom: 12px;
}

.stat-value {
  font-size: 3.5rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-subtext {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.95rem;
  font-weight: 400;
}

.status-indicator {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.status-dot.online { 
  background-color: #4ade80;
  box-shadow: 0 0 16px #4ade80;
}

.status-dot.offline { 
  background-color: #f87171;
  box-shadow: 0 0 16px #f87171;
}

.status-text {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  font-size: 0.9rem;
}

.server-info { 
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.chart-container {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 24px;
  padding: 32px;
  margin-bottom: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.chart-container h2 {
  margin-bottom: 24px;
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

canvas {
  max-height: 300px !important;
}

footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 50px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.95rem;
  font-weight: 400;
}

@keyframes pulse {
  0%, 100% { 
    opacity: 1;
    transform: scale(1);
  }
  50% { 
    opacity: 0.6;
    transform: scale(0.95);
  }
}

/* Smooth scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .main-content {
    margin-left: 0;
    width: 100%;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  .stat-value {
    font-size: 2.5rem;
  }
  
  body {
    flex-direction: column;
  }
  
  .chart-container, .stat-card {
    padding: 20px;
  }
}

/* Enhanced glass morphism effect for cards */
@supports (backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px)) {
  .stat-card, .chart-container, header, footer {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
  }
}

/* Fallback for browsers that don't support backdrop-filter */
@supports not (backdrop-filter: blur(20px)) {
  .stat-card, .chart-container, header, footer {
    background: rgba(30, 30, 50, 0.85);
  }
}
/* 서버 정보 선택 가능 */
.selectable {
  user-select: all;
  cursor: text;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.2s;
}

.selectable:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* 접속 버튼 컨테이너 */
.connect-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
