/* ==================== NOTIFICATION BELL ==================== */

.notif-bell {
  position: relative;
  display: inline-flex;
}

.notif-bell-btn {
  position: relative;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  padding: 6px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.notif-bell-btn:hover {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
}

.notif-badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 16px;
  height: 16px;
  background: #ef4444;
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  animation: notif-badge-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes notif-badge-pop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

/* ==================== DROPDOWN / NOTIFICATION CENTER ==================== */

.notif-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 500px;
  background: #13131f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.04);
  z-index: 9999;
  overflow: hidden;
  flex-direction: column;
}

.notif-dropdown.is-open {
  display: flex;
  animation: notif-slide-in 0.2s ease-out;
}

@keyframes notif-slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== HEADER ==================== */

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notif-dropdown-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

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

.notif-settings-btn {
  background: none;
  border: none;
  font-size: 14px;
  padding: 4px;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.15s;
}

.notif-settings-btn:hover {
  opacity: 0.8;
}

.notif-mark-all {
  background: none;
  border: none;
  color: rgba(0, 212, 255, 0.5);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.notif-mark-all:hover {
  color: rgba(0, 212, 255, 0.8);
  background: rgba(0, 212, 255, 0.08);
}

/* ==================== TABS ==================== */

.notif-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.notif-tab {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.notif-tab:hover {
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.04);
}

.notif-tab.is-active {
  color: rgba(0, 212, 255, 0.9);
  background: rgba(0, 212, 255, 0.1);
}

/* ==================== NOTIFICATION LIST ==================== */

.notif-list {
  overflow-y: auto;
  max-height: 380px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.notif-list::-webkit-scrollbar { width: 4px; }
.notif-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

/* Date Groups */
.notif-date-group {
  padding: 0;
}

.notif-date-label {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 16px 4px;
}

/* Individual Notification */
.notif-item {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  transition: background 0.1s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  position: relative;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.notif-item:hover .notif-dismiss {
  opacity: 0.4;
}

.notif-item.is-unread {
  background: rgba(0, 212, 255, 0.03);
  border-left: 2px solid rgba(0, 212, 255, 0.4);
}

.notif-icon {
  font-size: 18px;
  flex-shrink: 0;
  padding-top: 1px;
  width: 24px;
  text-align: center;
}

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.notif-group-badge {
  background: rgba(0, 212, 255, 0.15);
  color: rgba(0, 212, 255, 0.8);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}

.notif-message {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-actor {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 10px;
  color: rgba(0, 212, 255, 0.4);
  margin-top: 1px;
}

.notif-time {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.15);
  margin-top: 3px;
}

.notif-dismiss {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.2);
  font-size: 14px;
  padding: 0 2px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
  align-self: center;
}

.notif-dismiss:hover {
  opacity: 1 !important;
  color: rgba(255, 255, 255, 0.6);
}

/* ==================== EMPTY / LOADING ==================== */

.notif-empty,
.notif-loading {
  padding: 40px 16px;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.2);
}

/* ==================== PREFERENCES PANEL ==================== */

.notif-prefs-panel {
  padding: 16px;
  overflow-y: auto;
  max-height: 400px;
}

.notif-prefs-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 4px;
}

.notif-prefs-subtitle {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  margin-bottom: 16px;
}

.notif-pref-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  position: relative;
}

.notif-pref-icon {
  font-size: 16px;
  width: 24px;
  text-align: center;
}

.notif-pref-label {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  flex: 1;
}

.notif-pref-toggle {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.notif-pref-switch {
  width: 36px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}

.notif-pref-switch::after {
  content: '';
  width: 16px;
  height: 16px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s, background 0.2s;
}

.notif-pref-toggle:checked + .notif-pref-switch {
  background: rgba(0, 212, 255, 0.3);
}

.notif-pref-toggle:checked + .notif-pref-switch::after {
  transform: translateX(16px);
  background: rgba(0, 212, 255, 0.9);
}

.notif-prefs-actions {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.notif-clear-all-btn {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: rgba(239, 68, 68, 0.7);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
}

.notif-clear-all-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: rgba(239, 68, 68, 0.9);
}

/* ==================== TOAST NOTIFICATIONS ==================== */

.notif-toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.notif-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  max-width: 340px;
  pointer-events: auto;
  cursor: pointer;
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notif-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.notif-toast.is-leaving {
  opacity: 0;
  transform: translateX(100%);
}

.notif-toast:hover {
  border-color: rgba(0, 212, 255, 0.2);
}

.notif-toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.notif-toast-content {
  flex: 1;
  min-width: 0;
}

.notif-toast-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2px;
}

.notif-toast-message {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.2);
  font-size: 16px;
  padding: 0 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s;
}

.notif-toast-close:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 480px) {
  .notif-dropdown {
    width: calc(100vw - 24px);
    right: -60px;
  }

  .notif-toast-container {
    left: 12px;
    right: 12px;
  }

  .notif-toast {
    max-width: 100%;
  }
}
