/* Paralel Discord - Modern Cyberpunk / Discord Dark Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-primary: #0a0c10;
  --bg-secondary: #12151d;
  --bg-tertiary: #181d28;
  --bg-card: rgba(24, 29, 40, 0.7);
  --bg-hover: rgba(43, 52, 72, 0.45);
  
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --accent-glow: rgba(88, 101, 242, 0.35);
  
  --emerald: #23a55a;
  --emerald-glow: rgba(35, 165, 90, 0.3);
  --amber: #f0b232;
  --rose: #f23f43;
  --cyan: #00d4f0;
  
  --text-primary: #f2f3f5;
  --text-secondary: #949ba4;
  --text-muted: #6d737e;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(88, 101, 242, 0.6);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(88, 101, 242, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(35, 165, 90, 0.06) 0%, transparent 40%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Header */
.app-header {
  height: 64px;
  background: rgba(18, 21, 29, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), #9b59b6);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--accent-glow);
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.brand-title {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #ffffff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-badge.running .status-dot {
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: pulse-dot 2s infinite;
}
.status-badge.running {
  border-color: rgba(35, 165, 90, 0.4);
  color: #79f2a8;
}

.status-badge.connecting .status-dot {
  background: var(--amber);
  animation: pulse-dot 1s infinite;
}
.status-badge.connecting {
  border-color: rgba(240, 178, 50, 0.4);
  color: var(--amber);
}

.status-badge.stopped .status-dot,
.status-badge.error .status-dot {
  background: var(--rose);
}
.status-badge.error {
  border-color: rgba(242, 63, 67, 0.4);
  color: var(--rose);
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-tertiary);
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.user-profile-badge:hover {
  border-color: var(--border-focus);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.user-info-text {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.1;
}

.user-guilds {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.btn-icon {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  color: var(--text-primary);
  border-color: var(--border-focus);
  background: var(--bg-hover);
}

.btn-icon.active {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Layout */
.error-banner {
  background: rgba(242, 63, 67, 0.15);
  border-bottom: 1px solid rgba(242, 63, 67, 0.4);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #ffb4b6;
  font-size: 0.85rem;
  animation: fadeIn 0.3s ease;
}

.error-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.error-banner-content svg {
  color: var(--rose);
  flex-shrink: 0;
}

.app-container {
  display: grid;
  grid-template-columns: 240px 1fr 300px;
  flex: 1;
  height: calc(100vh - 64px);
  overflow: hidden;
}

/* Sidebar Nav */
.sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
  width: 100%;
  text-align: left;
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(88, 101, 242, 0.15);
  border-color: rgba(88, 101, 242, 0.4);
  color: #fff;
}

.nav-counter {
  background: var(--rose);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.nav-counter.zero {
  display: none;
}

.sidebar-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 12px 6px;
}

.phase-pill {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #ec4899, #8b5cf6);
  color: #fff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Main Content Area */
.main-feed-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--bg-primary);
}

/* Feed Toolbar */
.feed-toolbar {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(18, 21, 29, 0.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 480px;
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 7px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.btn-primary {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* Feed Scrollable */
.feed-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Message / Notification Card */
.message-card {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--transition);
  position: relative;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.message-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(30, 36, 50, 0.7);
}

.message-card.unread {
  border-left: 3px solid var(--accent);
  background: rgba(88, 101, 242, 0.05);
}

.message-card.mention-card {
  border-left: 3px solid var(--amber);
  background: rgba(240, 178, 50, 0.05);
}

.message-card.dm-card {
  border-left: 3px solid var(--emerald);
  background: rgba(35, 165, 90, 0.05);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.card-meta {
  display: flex;
  flex-direction: column;
}

.card-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-author-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.badge-tag {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.badge-mention {
  background: rgba(240, 178, 50, 0.2);
  color: #fbd38d;
}

.badge-dm {
  background: rgba(35, 165, 90, 0.2);
  color: #79f2a8;
}

.badge-reply {
  background: rgba(88, 101, 242, 0.2);
  color: #a5b4fc;
}

/* Source Badges for External Notification Gateway */
.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.source-github { background: rgba(147, 51, 234, 0.15); color: #c084fc; border: 1px solid rgba(192, 132, 252, 0.35); }
.source-telegram { background: rgba(14, 165, 233, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.35); }
.source-slack { background: rgba(236, 72, 153, 0.15); color: #f472b6; border: 1px solid rgba(244, 114, 182, 0.35); }
.source-sentry { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(248, 113, 113, 0.35); }
.source-custom { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.35); }

.card-location-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.guild-pill {
  color: var(--text-secondary);
  font-weight: 500;
}

.channel-pill {
  color: var(--cyan);
  font-family: var(--font-mono);
}

.card-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-body {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #e2e8f0;
  word-break: break-word;
  white-space: pre-wrap;
}

.card-body code {
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
  color: #f6ad55;
}

.card-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.card-attachment-img {
  max-width: 240px;
  max-height: 180px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  object-fit: cover;
  cursor: pointer;
  transition: var(--transition);
}

.card-attachment-img:hover {
  transform: scale(1.02);
  border-color: var(--accent);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.btn-card-action {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-card-action:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.btn-reply-phase2 {
  color: #5865f2;
  border-color: rgba(88, 101, 242, 0.45);
  font-weight: 600;
  gap: 4px;
}

.btn-reply-phase2:hover {
  background: rgba(88, 101, 242, 0.18);
  border-color: #5865f2;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.25);
}

.btn-reply-phase2 svg {
  transition: transform 0.2s ease;
}
.btn-reply-phase2:hover svg {
  transform: rotate(-10deg) scale(1.1);
}

/* Phase 2 Inline Reply Box */
.inline-reply-box {
  display: none;
  background: linear-gradient(135deg, rgba(14, 17, 24, 0.95), rgba(24, 29, 40, 0.9));
  border: 1px solid rgba(88, 101, 242, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 10px;
  backdrop-filter: blur(8px);
}

.inline-reply-box.open {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: slideInReply 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInReply {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.inline-reply-header {
  font-size: 0.78rem;
  color: #7c8af2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(88, 101, 242, 0.15);
}

.inline-reply-header strong {
  color: #fff;
}

.inline-reply-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-reply-input {
  flex: 1;
  background: var(--bg-primary);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 0.875rem;
  font-family: inherit;
  transition: var(--transition);
}

.inline-reply-input:focus {
  outline: none;
  border-color: #5865f2;
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.2);
}

.inline-reply-input-row .btn-primary {
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== Discord-Style Compose Panel (Reply Hub) ===== */

.compose-layout {
  display: flex;
  height: calc(100vh - 140px);
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

/* Server/Channel Sidebar */
.compose-channels {
  width: 260px;
  min-width: 260px;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.compose-channels-header {
  padding: 14px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.compose-channels-header .refresh-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
}
.compose-channels-header .refresh-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.compose-channel-search {
  margin: 8px 10px;
  padding: 7px 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-family: inherit;
  width: calc(100% - 20px);
  transition: var(--transition);
}
.compose-channel-search:focus {
  outline: none;
  border-color: var(--accent);
}

.compose-channels-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 6px;
}

.compose-guild-group {
  margin-bottom: 4px;
}

.compose-guild-name {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 10px 10px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}
.compose-guild-name:hover {
  color: var(--text-secondary);
}

.compose-guild-name img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

.compose-guild-name .guild-chevron {
  margin-left: auto;
  font-size: 0.65rem;
  transition: transform 0.2s ease;
}
.compose-guild-name.collapsed .guild-chevron {
  transform: rotate(-90deg);
}

.compose-guild-channels {
  overflow: hidden;
  transition: max-height 0.3s ease;
  max-height: 2000px;
}
.compose-guild-channels.collapsed {
  max-height: 0;
}

.compose-channel-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 22px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.compose-channel-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.compose-channel-item.active {
  background: rgba(88, 101, 242, 0.15);
  color: #fff;
}
.compose-channel-item .ch-hash {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 14px;
}
.compose-channel-item .ch-category {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-left: auto;
  flex-shrink: 0;
}

/* Chat Area */
.compose-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.compose-chat-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary);
  min-height: 50px;
}

.compose-chat-header .ch-icon {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 700;
}

.compose-chat-header .ch-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.compose-chat-header .ch-guild-badge {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

/* Message Feed in Compose */
.compose-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.compose-msg {
  display: flex;
  gap: 12px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}
.compose-msg:hover {
  background: rgba(255, 255, 255, 0.02);
}

.compose-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
}

.compose-msg-body {
  min-width: 0;
  flex: 1;
}

.compose-msg-author {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.compose-msg-time {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-left: 8px;
  font-weight: 400;
}

.compose-msg-content {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-top: 2px;
  word-break: break-word;
}

.compose-msg.own-msg .compose-msg-author {
  color: #5865f2;
}

.compose-msg.own-msg .compose-msg-content {
  color: var(--text-primary);
}

.compose-sent-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  color: var(--emerald);
  margin-left: 6px;
  font-weight: 500;
}

/* Compose Input Bar */
.compose-input-bar {
  padding: 0 16px 16px;
}

.compose-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 0;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 4px 4px 4px 16px;
  transition: var(--transition);
}

.compose-input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.15);
}

.compose-textarea {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  padding: 10px 0;
  resize: none;
  max-height: 140px;
  min-height: 22px;
  line-height: 1.4;
  outline: none;
}

.compose-textarea::placeholder {
  color: var(--text-muted);
}

.compose-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.compose-send-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.compose-send-btn:active {
  transform: scale(0.95);
}

.compose-send-btn.sending {
  opacity: 0.6;
  pointer-events: none;
}

.compose-send-btn svg {
  width: 18px;
  height: 18px;
}

/* Empty/No Channel Selected State */
.compose-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  padding: 40px;
  text-align: center;
}

.compose-empty-state svg {
  width: 56px;
  height: 56px;
  opacity: 0.3;
}

.compose-empty-state h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.compose-empty-state p {
  font-size: 0.82rem;
  max-width: 320px;
  line-height: 1.5;
}

/* Typing indicator dots */
.compose-typing-dots {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  padding: 4px 0 0 2px;
}
.compose-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.2s infinite;
}
.compose-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.compose-typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Sent message fly animation */
@keyframes messageSent {
  0% { opacity: 1; transform: translateX(0); }
  50% { opacity: 0.7; transform: translateX(6px); }
  100% { opacity: 1; transform: translateX(0); }
}

.compose-msg.just-sent {
  animation: messageSent 0.4s ease;
}

/* Responsive: collapse channel sidebar */
@media (max-width: 900px) {
  .compose-channels {
    width: 50px;
    min-width: 50px;
  }
  .compose-channels-header span,
  .compose-channel-search,
  .compose-guild-name span:not(.guild-chevron),
  .compose-guild-name img,
  .compose-channel-item span:not(.ch-hash) {
    display: none;
  }
  .compose-channel-item {
    padding-left: 10px;
    justify-content: center;
  }
}

/* Right Panel (Stats & Widgets) */
.right-panel {
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-subtle);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}

.panel-widget {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.widget-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-item {
  background: rgba(0, 0, 0, 0.25);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.stat-highlight .stat-value {
  color: #fbd38d;
}

/* Channel Quick List */
.channel-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.channel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.channel-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.channel-item.active {
  background: rgba(88, 101, 242, 0.2);
  color: #fff;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  gap: 14px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  stroke: var(--text-muted);
  opacity: 0.5;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 90%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card-lg {
  max-width: 620px;
  max-height: 88vh;
  overflow: hidden;
}

.modal-body {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 4px;
  max-height: calc(88vh - 120px);
}

.settings-section {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.settings-toggle-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-toggle-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-toggle-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-secondary);
  transition: var(--transition);
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--emerald);
  border-color: var(--emerald);
}

input:checked + .slider:before {
  transform: translateX(18px);
  background-color: #fff;
}

/* Guild / Server Select List */
.guild-select-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  margin-top: 4px;
}

.guild-select-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.guild-select-item:hover {
  background: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.16);
}

.guild-select-item.selected {
  border-color: rgba(35, 165, 90, 0.45);
  background: rgba(35, 165, 90, 0.08);
}

.guild-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.guild-item-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.guild-item-text {
  display: flex;
  flex-direction: column;
}

.guild-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.guild-item-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

@keyframes modalPop {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 9px 12px;
  font-size: 0.85rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-help {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
}

.toast {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.3s ease;
}

.toast.success { border-left: 3px solid var(--emerald); }
.toast.info { border-left: 3px solid var(--accent); }
.toast.error { border-left: 3px solid var(--rose); }

@keyframes toastIn {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 1024px) {
  .app-container {
    grid-template-columns: 200px 1fr;
  }
  .right-panel {
    display: none;
  }
}

/* ========================================================
   SLACK-STYLE COOL MEDIA LIGHTBOX & VIEWER
   ======================================================== */
.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(8, 10, 15, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  animation: lightboxFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.lightbox-header {
  height: 64px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 21, 29, 0.6);
  flex-shrink: 0;
}

.lightbox-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lightbox-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  object-fit: cover;
}

.lightbox-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lightbox-author {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.lightbox-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(88, 101, 242, 0.15);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.lightbox-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lightbox-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 7px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  text-decoration: none;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.lightbox-btn.lightbox-close {
  background: rgba(242, 63, 67, 0.15);
  color: #ff7b7d;
  border-color: rgba(242, 63, 67, 0.3);
  padding: 7px 10px;
}

.lightbox-btn.lightbox-close:hover {
  background: var(--rose);
  color: white;
}

.lightbox-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow: hidden;
  position: relative;
}

.lightbox-img {
  max-width: 90vw;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s ease;
  cursor: zoom-in;
}

.lightbox-img.zoomed {
  transform: scale(1.6);
  cursor: zoom-out;
}

/* Radar Link Button in Header */
.btn-radar {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.15), rgba(0, 212, 240, 0.15));
  border: 1px solid rgba(0, 212, 240, 0.3);
  color: #00d4f0;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-radar:hover {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.3), rgba(0, 212, 240, 0.3));
  border-color: #00d4f0;
  color: white;
  box-shadow: 0 0 15px rgba(0, 212, 240, 0.3);
}

.radar-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #00d4f0;
  box-shadow: 0 0 8px #00d4f0;
  animation: radarPulse 1.5s infinite;
}

@keyframes radarPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 212, 240, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 7px rgba(0, 212, 240, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 212, 240, 0); }
}

/* ☀️ Günaydın Quick Action Button (90pixel #ekip 08:50 - 09:30) */
.btn-gunaydin {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(234, 88, 12, 0.16));
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  padding: 6px 13px;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  position: relative;
  user-select: none;
}

.btn-gunaydin:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(234, 88, 12, 0.3));
  border-color: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
  color: #fff;
}

.btn-gunaydin.active-window {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(234, 88, 12, 0.36));
  border-color: #f59e0b;
  color: #fff;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.45);
  animation: sunPulse 2.4s infinite ease-in-out;
}

.btn-gunaydin.sent-today {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(52, 211, 153, 0.45) !important;
  color: #34d399 !important;
  box-shadow: none !important;
  animation: none !important;
}

.gunaydin-sun {
  font-size: 1.05rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.3s ease;
}

.btn-gunaydin:hover .gunaydin-sun {
  transform: rotate(20deg) scale(1.15);
}

.gunaydin-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.btn-gunaydin.active-window .gunaydin-badge {
  background: #f59e0b;
  color: #111827;
  border-color: transparent;
}

.btn-gunaydin.sent-today .gunaydin-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
  border-color: rgba(16, 185, 129, 0.35);
}

@keyframes sunPulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.35);
    border-color: rgba(245, 158, 11, 0.5);
  }
  50% {
    box-shadow: 0 0 22px rgba(245, 158, 11, 0.65), 0 0 8px rgba(234, 88, 12, 0.4);
    border-color: #fbbf24;
  }
}

/* Radar HUD version of Gunaydin Button */
.radar-gunaydin-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(234, 88, 12, 0.2));
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.radar-gunaydin-btn:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(234, 88, 12, 0.35));
  border-color: #f59e0b;
  color: #fff;
  transform: translateY(-1px);
}

.radar-gunaydin-btn.active-window {
  animation: sunPulse 2.4s infinite ease-in-out;
  border-color: #f59e0b;
  color: #fff;
}

.radar-gunaydin-btn.sent-today {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(52, 211, 153, 0.45) !important;
  color: #34d399 !important;
  animation: none !important;
}

