:root {
  --surface-main: #313338;
  --surface-canvas: #2b2d31;
  --surface-accent: #1e1f22;
  --surface-hover: #393c41;
  --color-primary: #3b61b4;
  --color-online: #23a55a;
  --text-main: #dbdee1;
  --text-dim: #949ba4;
  --text-darker: #4e5058;
  --pure-white: #ffffff;
  --border-light: rgba(0, 0, 0, 0.2);
}

body { 
  margin: 0; 
  font-family: 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif; 
  overflow: hidden; 
  background: var(--surface-main); 
  color: var(--text-main); 
  display: flex;
}

.sidebar { 
  height: 100vh; 
  position: fixed; 
  top: 0; 
  left: 0; 
  background: var(--surface-accent); 
  box-sizing: border-box; 
  overflow: hidden; 
  z-index: 1001; 
  display: flex;
  flex-direction: column;
}

.profile-section {
  display: flex;
  align-items: center;
  padding: 20px 16px;
  background: rgba(0, 0, 0, 0.1);
  gap: 12px;
}

.profile-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.status-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: var(--color-online);
  border: 3px solid var(--surface-accent);
  border-radius: 50%;
}

.profile-info {
  flex: 1;
  overflow: hidden;
}

.profile-name {
  font-size: 14px;
  font-weight: bold;
  color: var(--pure-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-status {
  font-size: 12px;
  color: var(--text-dim);
}

.profile-settings {
  cursor: pointer;
  font-size: 16px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.profile-settings:hover {
  opacity: 1;
}

.sidebar-divider {
  height: 1px;
  background: var(--border-light);
  margin: 8px 16px;
}

.sidebar a { 
  padding: 10px 15px; 
  text-decoration: none; 
  color: var(--text-dim); 
  display: block; 
  font-size: 15px; 
  margin: 2px 10px;
  border-radius: 4px;
  white-space: nowrap;
  transition: 0.2s;
}

.sidebar a:hover { 
  background: var(--surface-hover); 
  color: var(--text-main); 
}

.sidebar a.disabled {
  color: var(--text-darker) !important;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.6;
  background: transparent !important;
}

.main-content {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  background: var(--surface-main);
  transition: margin-left 0.1s ease;
}

.drag-zone { 
  width: 6px; 
  height: 100%; 
  position: absolute; 
  right: 0; 
  top: 0; 
  cursor: ew-resize; 
  transition: background 0.2s;
  z-index: 10;
}

.drag-zone:hover {
  background: var(--color-primary);
}

.container { 
  max-width: 1000px; 
  margin: 40px auto; 
  padding: 0 40px; 
}

.box { 
  background: var(--surface-canvas); 
  padding: 32px; 
  border-radius: 8px; 
  box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
  animation: view-in 0.4s ease-out; 
}

h1 { 
  margin-top: 0; 
  font-size: 24px; 
  color: var(--pure-white); 
}

.game-list { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); 
  gap: 20px; 
  margin-top: 30px; 
}

.game-item { 
  text-decoration: none; 
  color: var(--text-dim); 
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: 0.2s;
}

.icon-wrapper { 
  width: 80px; 
  height: 80px; 
  margin-bottom: 10px; 
  background: var(--surface-main); 
  border-radius: 24px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  transition: all 0.2s ease; 
  overflow: hidden; 
}

.game-item img { width: 60%; height: 60%; object-fit: contain; }

.game-item:hover .icon-wrapper { 
  border-radius: 16px; 
  background: var(--color-primary); 
}

.game-item:hover .game-name { color: var(--pure-white); }

#streamModal { 
  display: none; 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  background: rgba(0, 0, 0, 0.85); 
  z-index: 2000; 
}

.modal-content { 
  width: 90%; 
  height: 85%; 
  margin: 3% auto; 
  background: #000; 
  border-radius: 12px; 
  overflow: hidden; 
}

.close-modal { 
  position: absolute; 
  top: 20px; 
  right: 30px; 
  color: var(--pure-white); 
  font-size: 40px; 
  cursor: pointer; 
}

.btn {
  width: 50%; 
  height: 40%;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  border-radius: 12px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(110, 142, 251, 0.4);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(110, 142, 251, 0.6);
  background: linear-gradient(135deg, #5a7dfa, #9662d1);
}

.btn:active {
  transform: translateY(1px);
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: all 0.5s;
}

.btn:hover::before {
  left: 100%;
}

@keyframes view-in { 
  from { opacity: 0; transform: scale(0.99); } 
  to { opacity: 1; transform: scale(1); } 
}