/* ================= NOTIFICATION BADGE ================= */
.notif-badge {
  background: linear-gradient(135deg, #ff0000, #cc0000);
  color: white;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 7px;
  border-radius: 10px;
  margin-left: auto;
  box-shadow: 0 2px 8px rgba(255, 0, 0, 0.4);
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ================= NOTIFICATION PANEL ================= */
.notification-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  z-index: 10000;
  transition: right 0.3s ease-in-out;
  pointer-events: none;
}

.notification-panel.active {
  right: 0;
  pointer-events: all;
}

/* SEMI-TRANSPARENT OVERLAY */
.notification-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.3s;
}

.notification-panel.active::before {
  opacity: 1;
}

/* PANEL CONTENT */
.notification-panel-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 450px;
  max-width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(42, 42, 42, 0.95), rgba(28, 28, 28, 0.95));
  backdrop-filter: blur(10px);
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  border-left: 2px solid rgba(255, 0, 0, 0.3);
}

/* ================= NOTIFICATION HEADER ================= */
.notification-header {
  padding: 25px 25px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(59, 0, 0, 0.3);
}

.notification-header h2 {
  font-size: 24px;
  color: white;
  margin: 0;
}

.notification-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.mark-all-read-btn {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.mark-all-read-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.close-panel-btn {
  background: none;
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  line-height: 1;
  padding: 0;
  width: 30px;
  height: 30px;
}

.close-panel-btn:hover {
  opacity: 1;
}

/* ================= NOTIFICATIONS LIST ================= */
.notifications-list {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

/* LOADING STATE */
.notif-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 60px 20px;
}

.notif-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #ff0000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.notif-loading p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

/* EMPTY STATE */
.notif-empty {
  text-align: center;
  padding: 80px 30px;
  color: rgba(255, 255, 255, 0.5);
}

.notif-empty-icon {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.3;
}

.notif-empty p {
  font-size: 16px;
}

/* ================= NOTIFICATION ITEM ================= */
.notification-item-card {
  background: rgba(42, 42, 42, 0.6);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
  border-left: 3px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
}

.notification-item-card.unread {
  background: rgba(59, 0, 0, 0.3);
  border-left-color: #ff0000;
}

.notification-item-card:hover {
  background: rgba(42, 42, 42, 0.8);
  transform: translateX(-3px);
}

/* ITEM HEADER */
.notif-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.notif-item-title {
  font-size: 16px;
  font-weight: bold;
  color: white;
  flex: 1;
}

.notif-item-time {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  margin-left: 10px;
}

/* ITEM MESSAGE */
.notif-item-message {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  max-height: 60px;
  overflow: hidden;
  transition: max-height 0.3s;
}

.notif-item-message.expanded {
  max-height: 500px;
}

/* EXPAND BUTTON */
.notif-expand-btn {
  margin-top: 8px;
  background: none;
  border: none;
  color: #ff6b6b;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.notif-expand-btn:hover {
  color: #ff8888;
}

/* UNREAD INDICATOR */
.unread-dot {
  width: 8px;
  height: 8px;
  background: #ff0000;
  border-radius: 50%;
  box-shadow: 0 0 8px #ff0000;
  margin-left: 8px;
}

/* ================= SCROLLBAR ================= */
.notifications-list::-webkit-scrollbar {
  width: 8px;
}

.notifications-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.notifications-list::-webkit-scrollbar-thumb {
  background: rgba(255, 0, 0, 0.3);
  border-radius: 4px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 0, 0, 0.5);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .notification-panel-content {
    width: 100%;
  }

  .notification-header {
    padding: 20px 18px 15px;
  }

  .notification-header h2 {
    font-size: 20px;
  }

  .notifications-list {
    padding: 12px;
  }

  .mark-all-read-btn {
    font-size: 11px;
    padding: 5px 10px;
  }
}

@media (max-width: 480px) {
  .notification-header h2 {
    font-size: 18px;
  }

  .mark-all-read-btn {
    display: none; /* Hide on very small screens */
  }
}