/* ============================================
   ChatOnline.chat - Landing Page Styles
   ============================================ */

:root {
  --primary: #0066cc;
  --primary-dark: #004c99;
  --primary-light: #3399ff;
  --accent: #00b4d8;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;

  --bg-dark: #0a0f1a;
  --bg-body: #0d1117;
  --bg-card: #161b22;
  --bg-card-hover: #1c2333;
  --bg-input: #0d1117;
  --bg-border: #21262d;

  --text-main: #f0f6fc;
  --text-muted: #8b949e;
  --text-link: #58a6ff;

  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --transition: 0.25s ease;

  --max-width: 1100px;
  --header-h: 60px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a:hover {
  color: var(--primary-light);
}

img {
  max-width: 100%;
  height: auto;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-h);
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bg-border);
  z-index: 1000;
  transition: background var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.2rem;
}

.logo:hover {
  color: var(--text-main);
}

.logo-icon {
  font-size: 1.5rem;
}

.logo-dot {
  color: var(--primary);
}

.main-nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.nav-link:hover {
  color: var(--text-main);
  border-bottom-color: var(--primary);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding-top: calc(var(--header-h) + 4rem);
  padding-bottom: 4rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,102,204,0.15) 0%, transparent 60%);
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2.5rem;
}

.hero-content {
  max-width: 700px;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-main), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Login Box */
.hero-login-box {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
}

.login-box-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-box-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.login-box-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.login-box-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-login-form {
  margin-bottom: 1.25rem;
}

.input-group {
  display: flex;
  gap: 0.5rem;
}

.hero-input {
  flex: 1;
  padding: 0.8rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  color: var(--text-main);
  font-size: 1rem;
  transition: border-color var(--transition);
}

.hero-input:focus {
  outline: none;
  border-color: var(--primary);
}

.hero-input::placeholder {
  color: var(--text-muted);
}

.hero-button {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.8rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}

.hero-button:hover {
  background: var(--primary-dark);
}

.btn-arrow {
  font-size: 1.1rem;
  transition: transform var(--transition);
}

.hero-button:hover .btn-arrow {
  transform: translateX(3px);
}

.hero-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.hero-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.hero-checkbox-label a {
  color: var(--primary);
  text-decoration: underline;
}

.hero-checkbox-label a:hover {
  color: var(--primary-dark);
}

.admin-password-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.admin-password-section .hero-input {
  width: 100%;
}

.hero-error {
  margin-top: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.4);
  border-radius: var(--radius);
  color: #ff6b6b;
  font-size: 0.875rem;
  text-align: center;
}

.login-box-features {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.feature-tag {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--bg-border);
}

/* ============================================
   SECTION COMMON
   ============================================ */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-desc {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

/* ============================================
   SEO CHANNEL TEXT
   ============================================ */
.seo-channel-text {
  padding: 4rem 0;
  background: var(--bg-body);
}

.seo-channel-text h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  text-align: center;
}

.seo-channel-text p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   CHANNELS PREVIEW
   ============================================ */
.channels-preview {
  padding: 5rem 0;
  background: var(--bg-dark);
}

.channels-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.channel-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.channel-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(0,102,204,0.15);
}

.channel-card-18 {
  border-color: rgba(220, 53, 69, 0.3);
}

.channel-card-18:hover {
  border-color: var(--danger);
  box-shadow: 0 8px 32px rgba(220, 53, 69, 0.15);
}

.channel-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.channel-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.channel-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.how-it-works {
  padding: 5rem 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.step-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition);
}

.step-card:hover {
  border-color: var(--primary);
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.step-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================
   FEATURES
   ============================================ */
.features {
  padding: 5rem 0;
  background: var(--bg-dark);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.feature-card {
  text-align: center;
  padding: 2rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  transition: transform var(--transition), border-color var(--transition);
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
}

.feature-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================
   RULES
   ============================================ */
.rules {
  padding: 5rem 0;
}

.rules-content {
  max-width: 700px;
  margin: 0 auto;
}

.rules-list {
  list-style: none;
  counter-reset: rule-counter;
}

.rules-list li {
  counter-increment: rule-counter;
  padding: 1rem 1rem 1rem 3rem;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: border-color var(--transition);
}

.rules-list li::before {
  content: counter(rule-counter);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.rules-list li:hover {
  border-color: var(--primary);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  padding: 3rem 0 1.5rem;
  background: var(--bg-dark);
  border-top: 1px solid var(--bg-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.footer-col p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.4rem;
}

.footer-col ul a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-col ul a:hover {
  color: var(--text-main);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bg-border);
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-note {
  margin-top: 0.25rem;
  font-size: 0.75rem !important;
  opacity: 0.6;
}

/* ============================================
   COOKIE BANNER
   ============================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--bg-card);
  border-top: 1px solid var(--bg-border);
  padding: 1rem 1.25rem;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

.cookie-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex: 1;
}

.cookie-content a {
  color: var(--text-link);
}

.cookie-buttons {
  display: flex;
  gap: 0.5rem;
}

.cookie-btn {
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.cookie-accept {
  background: var(--primary);
  color: #fff;
}

.cookie-accept:hover {
  background: var(--primary-dark);
}

.cookie-reject {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--bg-border);
}

.cookie-reject:hover {
  border-color: var(--text-muted);
}

/* ============================================
   CHAT SCREEN (inside landing page)
   ============================================ */
.chat-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  background: var(--bg-body);
}

.chat-header {
  height: var(--header-h);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  border-bottom: 1px solid var(--bg-border);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.toggle-sidebar {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

.header-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
}

.header-center {
  flex: 1;
  text-align: center;
}

.current-channel {
  font-weight: 600;
  color: var(--text-main);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

.logout-btn {
  padding: 0.4rem 1rem;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background var(--transition);
}

.logout-btn:hover {
  background: #c82333;
}

.chat-main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background: var(--bg-card);
  border-right: 1px solid var(--bg-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-section {
  padding: 1rem;
  border-bottom: 1px solid var(--bg-border);
}

.sidebar-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.channel-list,
.user-list {
  list-style: none;
}

.channel-list li,
.user-list li {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-radius: var(--radius);
  margin-bottom: 2px;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}

.channel-list li:hover,
.user-list li:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.channel-list li.active {
  background: var(--primary);
  color: #fff;
}

.user-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

/* Close Channel Button */
.close-channel-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.3rem;
  transition: color var(--transition);
  line-height: 1;
}

.close-channel-btn:hover {
  color: var(--danger);
}

/* Channels List Button */
.channels-list-btn {
  padding: 0.4rem 0.8rem;
  background: var(--bg-card-hover);
  color: var(--text-main);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background var(--transition), border-color var(--transition);
}

.channels-list-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
}

/* Users Panel (Right) */
.users-panel {
  width: 200px;
  background: var(--bg-card);
  border-left: 1px solid var(--bg-border);
  padding: 1rem;
  overflow-y: auto;
  flex-shrink: 0;
}

/* DM List (Left bottom) */
.sidebar-dms {
  border-top: 1px solid var(--bg-border);
  border-bottom: none;
  flex: 1;
  overflow-y: auto;
}

.sidebar-channels {
  flex-shrink: 0;
}

.dm-list {
  list-style: none;
}

.dm-list li {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-radius: var(--radius);
  margin-bottom: 2px;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: background var(--transition), color var(--transition);
  position: relative;
}

.dm-list li:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.dm-list li.active {
  background: var(--primary);
  color: #fff;
}

.dm-list li .dm-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-list li .dm-remove {
  display: none;
  background: none;
  border: none;
  color: inherit;
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.6;
  flex-shrink: 0;
}

.dm-list li:hover .dm-remove {
  display: block;
}

.dm-list li .dm-remove:hover {
  opacity: 1;
  color: var(--danger);
}

.dm-list li.active .dm-remove {
  color: rgba(255,255,255,0.7);
}

.dm-list li .dm-unread {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  display: none;
}

.dm-list li .dm-unread.active {
  display: block;
}

.dm-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 0.5rem 0;
}

/* Chat Area */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-body);
  min-width: 0;
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.message {
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
}

.message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.message-username {
  font-weight: 600;
  color: var(--primary-light);
  font-size: 0.9rem;
}

.message-username.admin {
  color: #ff4757;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(255, 71, 87, 0.3);
}

.message-username.admin:hover {
  color: #ff6b7a;
}

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

.message-content {
  font-size: 0.95rem;
  color: var(--text-main);
  word-wrap: break-word;
  line-height: 1.5;
}

.message-form {
  display: flex;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-top: 1px solid var(--bg-border);
}

.message-input {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 0.95rem;
  margin-right: 0.5rem;
  transition: border-color var(--transition);
}

.message-input:focus {
  outline: none;
  border-color: var(--primary);
}

.message-input::placeholder {
  color: var(--text-muted);
}

.send-button {
  padding: 0.7rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background var(--transition);
}

.send-button:hover {
  background: var(--primary-dark);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6000;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--bg-border);
}

.modal-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--transition);
}

.close-modal:hover {
  color: var(--text-main);
}

/* System Message */
.system-message {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 0.5rem;
  margin: 0.5rem 0;
  font-size: 0.85rem;
}

/* Channels Modal */
.channels-modal-content {
  max-width: 600px;
}

.channels-modal-body {
  padding: 1rem;
  overflow-y: auto;
  max-height: 60vh;
}

.all-channels-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.all-channel-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-body);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

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

.all-channel-item.active {
  background: rgba(0, 102, 204, 0.15);
  border-color: var(--primary);
}

.all-channel-item .channel-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
}

.all-channel-item .channel-users-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* DM sent indicator */
.dm-sent-indicator {
  color: var(--success);
  font-size: 0.7rem;
  margin-left: 0.3rem;
}

/* Sidebar title row with add button */
.sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-add-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-card-hover);
  border: 1px solid var(--bg-border);
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  line-height: 1;
  padding: 0;
}

.sidebar-add-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Channel item layout with remove */
.channel-list li {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.channel-list li .ch-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-list li .ch-remove {
  display: none;
  background: none;
  border: none;
  color: inherit;
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.6;
  flex-shrink: 0;
}

.channel-list li:hover .ch-remove {
  display: block;
}

.channel-list li .ch-remove:hover {
  opacity: 1;
  color: var(--danger);
}

.channel-list li.active .ch-remove {
  color: rgba(255,255,255,0.7);
}

/* Add channel modal list */
.add-channel-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.add-channel-list::-webkit-scrollbar {
  width: 6px;
}

.add-channel-list::-webkit-scrollbar-track {
  background: var(--bg-input);
  border-radius: 3px;
}

.add-channel-list::-webkit-scrollbar-thumb {
  background: var(--bg-border);
  border-radius: 3px;
}

.add-channel-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.add-ch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  padding: 0.65rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  color: var(--text-main);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.add-ch-name {
  flex: 1;
}

.add-ch-count {
  font-size: 0.8rem;
  color: var(--success);
  font-weight: 600;
  margin-left: 0.5rem;
  min-width: 1.5rem;
  text-align: right;
}

.add-ch-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
}

.add-ch-item.already {
  opacity: 0.4;
  cursor: default;
  border-color: transparent;
}

.add-ch-item.already:hover {
  background: var(--bg-input);
}

/* User Context Menu */
.user-context-menu {
  position: fixed;
  z-index: 9000;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  min-width: 200px;
  padding: 0.35rem 0;
  animation: ctxFadeIn 0.15s ease;
}

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

.ctx-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 1rem;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
}

.ctx-option:hover {
  background: var(--bg-card-hover);
}

.ctx-danger {
  color: var(--danger);
  border-top: 1px solid var(--bg-border);
  margin-top: 0.15rem;
  padding-top: 0.7rem;
}

.ctx-danger:hover {
  background: rgba(220, 53, 69, 0.1);
}

.ctx-icon {
  font-size: 0.9rem;
  width: 1.2rem;
  text-align: center;
}

/* Clickable username in messages */
.message-username {
  cursor: pointer;
}

.message-username:hover {
  text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .channels-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    width: 100%;
    background: var(--bg-card);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--bg-border);
    box-shadow: var(--shadow);
  }

  .main-nav.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .channels-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: -250px;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    z-index: 100;
    transition: left 0.3s;
    box-shadow: var(--shadow);
  }

  .sidebar.active {
    left: 0;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
  }

  .sidebar-overlay.active {
    display: block;
  }

  .users-panel {
    display: none;
  }

  .channels-list-btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }

  .all-channels-list {
    grid-template-columns: 1fr;
  }

  .cookie-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: calc(var(--header-h) + 2rem);
    padding-bottom: 2rem;
    min-height: auto;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .channels-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .channel-card {
    padding: 1rem 0.75rem;
  }

  .input-group {
    flex-direction: column;
  }

  .hero-button {
    width: 100%;
    justify-content: center;
  }

  .header-title {
    font-size: 1rem;
  }

  .user-count {
    display: none;
  }
}