/* ===== Global Styles — Dark Theme ===== */

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

:root {
  --bg-primary: #1e1f22;
  --bg-secondary: #2b2d31;
  --bg-tertiary: #313338;
  --bg-chat: #313338;
  --bg-hover: #35373c;
  --bg-active: #404249;
  --text-primary: #f2f3f5;
  --text-secondary: #b5bac1;
  --text-muted: #949ba4;
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --danger: #da373c;
  --success: #23a55a;
  --warning: #f0b132;
  --online: #23a55a;
  --idle: #f0b132;
  --dnd: #da373c;
  --offline: #80848e;
  --border: #3f4147;
  --scrollbar: #1a1b1e;
  --scrollbar-thumb: #4e5058;
  --font: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

html, body {
  height: 100%;
  font-family: var(--font);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  cursor: pointer;
  font-family: var(--font);
}

input, textarea {
  font-family: var(--font);
}

.hidden {
  display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}

/* ===== App Container ===== */

#app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* ===== Error / Success Messages ===== */

.error-message {
  color: var(--danger);
  font-size: 13px;
  margin: 8px 0;
  min-height: 18px;
}

.success-message {
  color: var(--success);
  font-size: 13px;
  margin: 8px 0;
  min-height: 18px;
}

/* ===== Buttons ===== */

.btn-primary {
  background-color: var(--accent);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.15s;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-cancel {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
}

.btn-cancel:hover {
  text-decoration: underline;
}

.nav-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  transition: all 0.15s;
}

.nav-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

/* ===== User Panel ===== */

#user-panel {
  background-color: var(--bg-primary);
  padding: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

#user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

#user-username {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== Channel Header ===== */

#channel-header {
  background-color: var(--bg-tertiary);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
}

#channel-icon {
  color: var(--text-muted);
  font-size: 20px;
  font-weight: 700;
}

#channel-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

#channel-topic {
  color: var(--text-muted);
  font-size: 13px;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

/* ===== Main Content ===== */

#main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-chat);
  min-width: 0;
}
