/* ── CHANNEL LOG ── */

/* Channel Log Modal Overlay */
.channellog-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(5,3,15,0.85);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.channellog-overlay.open {
  display: flex;
  opacity: 1;
}

/* Main Container */
.channellog-container {
  width: min(780px, 92vw);
  max-height: 85vh;
  background: linear-gradient(170deg, #0e0a22 0%, #0a0716 60%, #080510 100%);
  border: 1px solid rgba(123,95,255,0.2);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow:
    0 25px 80px rgba(0,0,0,0.6),
    0 0 60px rgba(123,95,255,0.08),
    inset 0 1px 0 rgba(255,255,255,0.05);
  animation: scaleIn 0.35s ease forwards;
}

/* Header */
.channellog-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid rgba(123,95,255,0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: relative;
}
.channellog-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 28px;
  right: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(123,95,255,0.3), transparent);
}

.channellog-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.channellog-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(201,168,76,0.2), rgba(201,168,76,0.08));
  border: 1px solid rgba(201,168,76,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.channellog-header-text h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
}
.channellog-header-text p {
  font-size: 12px;
  color: rgba(200,200,230,0.5);
  margin: 2px 0 0;
}

.channellog-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.channellog-close:hover {
  background: rgba(255,100,100,0.1);
  border-color: rgba(255,100,100,0.3);
  color: #ff6b6b;
}

/* Log Entries Area */
.channellog-entries {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(123,95,255,0.2) transparent;
}
.channellog-entries::-webkit-scrollbar { width: 5px; }
.channellog-entries::-webkit-scrollbar-track { background: transparent; }
.channellog-entries::-webkit-scrollbar-thumb {
  background: rgba(123,95,255,0.25);
  border-radius: 3px;
}

/* Empty State */
.channellog-empty {
  text-align: center;
  padding: 50px 20px;
  color: rgba(200,200,230,0.35);
}
.channellog-empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}
.channellog-empty-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.channellog-empty-sub {
  font-size: 12px;
  margin-top: 4px;
  color: rgba(200,200,230,0.25);
}

/* Single Log Entry */
.channellog-entry {
  background: rgba(13,11,30,0.6);
  border: 1px solid rgba(123,95,255,0.1);
  border-radius: 12px;
  padding: 18px 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.channellog-entry::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  border-radius: 3px 0 0 3px;
}
.channellog-entry:hover {
  border-color: rgba(123,95,255,0.25);
  background: rgba(18,14,40,0.7);
  transform: translateX(4px);
}

/* Tag colors on the left bar */
.channellog-entry[data-tag="update"]::before { background: linear-gradient(180deg, #7B5FFF, #5a3fcf); }
.channellog-entry[data-tag="feature"]::before { background: linear-gradient(180deg, #4caf50, #2e7d32); }
.channellog-entry[data-tag="bugfix"]::before { background: linear-gradient(180deg, #ff5252, #c62828); }
.channellog-entry[data-tag="event"]::before { background: linear-gradient(180deg, #ffd740, #c9a84c); }
.channellog-entry[data-tag="info"]::before { background: linear-gradient(180deg, #29b6f6, #0277bd); }

.channellog-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.channellog-entry-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
}

.channellog-entry-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.channellog-tag {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 6px;
  line-height: 1;
}
.channellog-tag[data-tag="update"] { background: rgba(123,95,255,0.15); color: #a084ff; border: 1px solid rgba(123,95,255,0.25); }
.channellog-tag[data-tag="feature"] { background: rgba(76,175,80,0.15); color: #81c784; border: 1px solid rgba(76,175,80,0.25); }
.channellog-tag[data-tag="bugfix"] { background: rgba(255,82,82,0.15); color: #ff8a80; border: 1px solid rgba(255,82,82,0.25); }
.channellog-tag[data-tag="event"] { background: rgba(255,215,64,0.15); color: #ffd740; border: 1px solid rgba(255,215,64,0.25); }
.channellog-tag[data-tag="info"] { background: rgba(41,182,246,0.15); color: #81d4fa; border: 1px solid rgba(41,182,246,0.25); }

.channellog-date {
  font-size: 11px;
  color: rgba(200,200,230,0.35);
  white-space: nowrap;
}

.channellog-entry-body {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(200,200,230,0.6);
  white-space: pre-wrap;
}

/* ── INLINE CHANNEL LOG ── */
.channellog-inline-wrapper {
  position: relative;
  z-index: 20;
  width: 100%;
  padding: 0 5% 80px;
  box-sizing: border-box;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.35s ease, max-height 0.45s ease;
}
.channellog-inline-wrapper.open {
  opacity: 1;
  max-height: 2000px;
}

.channellog-inline-container {
  width: 100%;
  background: linear-gradient(170deg, #0e0a22 0%, #0a0716 60%, #080510 100%);
  border: 1px solid rgba(123,95,255,0.2);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow:
    0 25px 80px rgba(0,0,0,0.6),
    0 0 60px rgba(123,95,255,0.08),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.channellog-inline-wrapper .channellog-entries {
  max-height: 500px;
}

/* Responsive */
@media (max-width: 600px) {
  .channellog-container {
    width: 96vw;
    max-height: 92vh;
    border-radius: 12px;
  }
  .channellog-inline-container {
    border-radius: 12px;
  }
  .channellog-inline-wrapper {
    padding: 0 3% 40px;
  }
  .channellog-header { padding: 18px 18px 16px; }
  .channellog-entries { padding: 16px 18px; }
  .channellog-entry { padding: 14px 16px; }
}
