/* =====================
   Top Bar (390px Fixed Canvas)
   ===================== */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  transform: none;

  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  height: 56px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: max(env(safe-area-inset-top, 0px), 0px) clamp(14px, 4vw, 18px) 0 clamp(14px, 4vw, 18px);

  /* 🔥 배경 톤 맞춤 */
  background: rgba(12, 13, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  border-bottom: 1px solid rgba(255,255,255,0.05);

  z-index: 1000;
  box-sizing: border-box;
}

/* =====================
   Left / Center / Right
   ===================== */

.topbar .logo {
  display: flex;
  align-items: center;
  cursor: pointer;
  transform: translateY(4px);
}

.topbar .logo img {
  height: 22px;
  width: auto;
  display: block;
}

.topbar .top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateY(4px);
}

.topbar .icon {
  background: none;
  border: none;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #e5e7eb;
  cursor: pointer;
}

.topbar .icon img {
  width: 20px;
  height: 20px;
  display: block;
}

/* =====================
   Notification Overlay
   ===================== */

.notification-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  transform: none;

  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  height: 100vh;

  background: rgba(0, 0, 0, 0.6);

  display: none;
  z-index: 2000;
  overflow: hidden;
}

.notification-overlay.open {
  display: block;
}

.notification-panel {
  position: absolute;
  top: 0;
  right: 0;

  width: min(85%, 390px);
  height: 100%;

  background: #141721; /* 🔥 보라톤 배경과 조화 */
  display: flex;
  flex-direction: column;

  transform: translateX(100%);
  transition: transform 0.25s ease;

  border-radius: 12px 0 0 12px;
  overflow: hidden;

  padding-top: 10px;
  box-sizing: border-box;
}

.notification-overlay.open .notification-panel {
  transform: translateX(0);
}

.notification-header {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 16px;

  border-bottom: 1px solid rgba(255,255,255,0.05);
  transform: translateY(4px);
}

.notification-header .tabs {
  display: flex;
  gap: 16px;
}

.notification-header .tab {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  position: relative;
}

.notification-header .tab.active {
  color: #ffffff;
  font-weight: 500;
}

.notification-header .close-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
}

.notification-list {
  flex: 1;
  overflow-y: auto;
}

.notification-list.hidden {
  display: none;
}

.notice-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;

  padding: 16px;

  border-bottom: 1px solid rgba(255,255,255,0.05);
  transform: translateY(4px);
}

.notice-item .badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
}

.notice-item .badge.guide {
  background: #e5e7eb;
  color: #111827;
}

.notice-item .badge.contest {
  background: #fee2e2;
  color: #7f1d1d;
}

.notice-item .badge.event {
  background: #fef3c7;
  color: #92400e;
}

.notice-item .badge.update {
  background: #dcfce7;
  color: #065f46;
}

.notice-item .text {
  flex: 1;
}

.notice-item .text .title {
  color: #ffffff;
  font-size: 15px;
  margin-bottom: 4px;
}

.notice-item .text .desc {
  color: #9ca3af;
  font-size: 13px;
  margin-bottom: 6px;
}

.notice-item .text .date {
  color: #6b7280;
  font-size: 12px;
}

.notice-item .arrow {
  color: #9ca3af;
  font-size: 18px;
}

.notice-list-inner {
  display: block;
}

.notice-item.clickable {
  cursor: pointer;
}

.notice-item .badge.alarm {
  background: #ede9fe;
  color: #5b21b6;
}

.notice-item .badge.notice {
  background: #e5e7eb;
  color: #111827;
}

.empty-state {
  padding: 24px 16px;
  color: #9ca3af;
  font-size: 13px;
  transform: translateY(4px);
}


@media (max-width: 430px) {
  .notification-panel {
    width: min(88%, 390px);
    padding-top: max(10px, env(safe-area-inset-top, 0px));
  }
}
