/* ── Vercel Themes ── */

[data-theme="dark"] {
  --bg-app:        #000000;
  --bg-srv:        #000000;
  --bg-panel:      #000000;
  --bg-panel2:     #111111;
  --bg-chat:       #000000;
  --bg-input:      #111111;
  --bg-hover:      rgba(255,255,255,0.1);
  --bg-active:     rgba(255,255,255,0.15);
  --bg-msg-hover:  #111111;
  --bg-embed:      #111111;

  --border:        #333333;
  --border-soft:   #222222;

  --text-primary:   #ededed;
  --text-muted:     #888888;
  --text-heading:   #ffffff;
  --text-channel:   #888888;
  --text-ch-active: #ffffff;
  --text-time:      #666666;
  --text-danger:    #ff0000;

  --accent:         #ffffff; /* Vercel dark mode uses white as primary accent */
  --accent-hover:   #cccccc;
  --online:         #0070f3;
  --idle:           #f5a623;
  --dnd:            #ee0000;
  --offline:        #444444;

  --shadow-panel:   0 0 0 1px #333;
  --shadow-inset:   none;
  --shadow-btn:     0 0 0 1px #333;
  --shadow-msg:     none;

  /* Remove Skeuomorphism for Flat Design */
  --skeuo-panel:    none;
  --skeuo-srv:      none;
  --skeuo-input:    none;
  --skeuo-header:   none;
  --skeuo-embed:    none;
}

[data-theme="light"] {
  --bg-app:        #ffffff;
  --bg-srv:        #fafafa;
  --bg-panel:      #fafafa;
  --bg-panel2:     #ffffff;
  --bg-chat:       #ffffff;
  --bg-input:      #ffffff;
  --bg-hover:      rgba(0,0,0,0.05);
  --bg-active:     rgba(0,0,0,0.08);
  --bg-msg-hover:  #fafafa;
  --bg-embed:      #fafafa;

  --border:        #eaeaea;
  --border-soft:   #f0f0f0;

  --text-primary:   #171717;
  --text-muted:     #666666;
  --text-heading:   #000000;
  --text-channel:   #666666;
  --text-ch-active: #000000;
  --text-time:      #999999;
  --text-danger:    #ee0000;

  --accent:         #000000;
  --accent-hover:   #333333;
  --online:         #0070f3;
  --idle:           #f5a623;
  --dnd:            #ee0000;
  --offline:        #999999;

  --shadow-panel:   0 0 0 1px #eaeaea;
  --shadow-inset:   none;
  --shadow-btn:     0 2px 4px rgba(0,0,0,0.05);
  --shadow-msg:     none;

  --skeuo-panel:    none;
  --skeuo-srv:      none;
  --skeuo-input:    none;
  --skeuo-header:   none;
  --skeuo-embed:    none;
}

/* ── Reset & Typography ── */

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

html, body {
  height: 100%;
  overflow: hidden;
  /* Vercel uses Geist or Inter */
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px; /* Vercel defaults slightly smaller */
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background: var(--bg-app);
  color: var(--text-primary);
}

/* ── Modified Components ── */

#srv-rail {
  width: 64px; /* Slightly slimmer */
  min-width: 64px;
  border-right: 1px solid var(--border);
  background: var(--bg-srv);
}

.srv-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px; /* Square with slight roundness like Vercel icons */
  border: 1px solid var(--border);
  background: var(--bg-panel2);
  transition: all 0.2s ease;
  box-shadow: none;
}

.srv-icon:hover {
  border-radius: 8px;
  background: var(--bg-hover);
  color: var(--text-heading);
  transform: none;
  border-color: var(--text-muted);
}

.srv-icon.active {
  border-radius: 8px;
  background: var(--accent);
  color: var(--bg-app); /* Inverted text */
  border-color: var(--accent);
}

/* Indicators should be subtle pills or dots */
.srv-icon::before {
  display: none; /* Remove Discord-style side pill */
}

#srv-header, #chat-header {
  height: 64px;
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  background: var(--bg-panel);
}

.ch-item {
  margin: 2px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
}

.ch-item.active {
  background: var(--bg-active);
  color: var(--text-ch-active);
  font-weight: 500;
}

#input-box {
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  box-shadow: none;
  transition: border-color 0.2s ease;
}

#input-box:focus-within {
  border-color: var(--text-muted);
}

/* ── Messages ── */

.msg-group {
  border-bottom: 1px solid var(--border-soft);
  padding: 16px 24px;
}

.msg-avatar {
  border-radius: 6px; /* Consistent Vercel radius */
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
}

.msg-author {
  color: var(--text-heading);
  font-weight: 600;
}

.msg-content code {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: #eb5757; /* Vercel's signature inline code color */
  padding: 3px 6px;
}

/* ── Buttons ── */

.ctrl-btn, .hdr-btn {
  border-radius: 6px;
  transition: all 0.2s;
}

.ctrl-btn:hover {
  background: var(--bg-hover);
  border: 1px solid var(--border);
}
