/* ================================
   NOTIFICATION PANEL
   Benachrichtigungs-Panel auf der rechten Seite
   ================================ */

/* Notification Panel */
.notification-panel {
  position: fixed;
  top: 80px;
  right: -420px;
  width: 400px;
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  transition: right 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1300;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.notification-panel.open {
  right: 20px;
}

.notification-panel .notification-header {
  padding: 20px;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.notification-panel .notification-header span:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-panel .notification-header i.fa-times {
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
}

.notification-panel .notification-header i.fa-times:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg) scale(1.1);
}

.notification-panel .notification-content {
  max-height: 500px;
  overflow-y: auto;
  padding: 0;
  background: var(--card-bg);
  display: block !important;
  align-items: initial !important;
}

/* Custom Scrollbar */
.notification-panel .notification-content::-webkit-scrollbar {
  width: 8px;
}

.notification-panel .notification-content::-webkit-scrollbar-track {
  background: var(--border-color);
  border-radius: 10px;
}

.notification-panel .notification-content::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: 10px;
}

.notification-panel .notification-content::-webkit-scrollbar-thumb:hover {
  background: var(--hover-gradient);
}

/* Notification Item */
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  cursor: pointer;
  background: var(--card-bg);
}

.notification-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.notification-item:hover {
  background: var(--notification-hover-bg);
  transform: translateX(8px);
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.05);
}

.notification-item:hover::before {
  opacity: 1;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid transparent;
  background: var(--primary-gradient) padding-box,
              var(--primary-gradient) border-box;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.notification-item:hover img {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 16px rgba(30, 136, 229, 0.3);
}

.notification-item .notification-body {
  flex: 1;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px;
}

.notification-item .notification-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.3s ease;
  display: block;
}

.notification-item:hover .notification-text {
  color: var(--primary-blue);
}

.notification-item small {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.notification-item small i {
  font-size: 0.75rem;
}

/* Match Ablaufzeit */
.match-expires-info {
  display: inline-flex;
  margin-left: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 400;
  align-items: center;
  gap: 5px;
}

.match-expires-info i {
  font-size: 0.75rem;
  color: var(--text-secondary);
  animation: pulse-hourglass 2s ease-in-out infinite;
}

.match-expires-info span {
  color: var(--text-secondary);
}

@keyframes pulse-hourglass {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

/* Notification Icons */
.notification-item .notification-img-wrapper {
  position: relative;
  flex-shrink: 0;
}

.notification-item .notification-icon-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  border: 2px solid var(--card-bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 2;
  /* Default Hintergrund - Venside Hellblau */
  background: #0ea5e9;
  color: white;
}

.notification-icon-badge.accept {
  background: linear-gradient(135deg, #4CAF50, #66BB6A);
  color: white;
}

.notification-icon-badge.decline {
  background: linear-gradient(135deg, #F44336, #EF5350);
  color: white;
}

.notification-icon-badge.expired {
  background: linear-gradient(135deg, #FF9800, #FFA726);
  color: white;
}

.notification-icon-badge.match {
  background: linear-gradient(135deg, #2196F3, #42A5F5);
  color: white;
}

.notification-icon-badge.event {
  background: linear-gradient(135deg, #9C27B0, #BA68C8);
  color: white;
}

.notification-icon-badge.room {
  background: linear-gradient(135deg, #00BCD4, #26C6DA);
  color: white;
}

.notification-icon-badge.ping {
  background: linear-gradient(135deg, #FF5722, #FF7043);
  color: white;
}

.notification-icon-badge.pong {
  background: linear-gradient(135deg, #9C27B0, #AB47BC);
  color: white;
}

.notification-icon-badge.pieps {
  background: linear-gradient(135deg, #03A9F4, #4FC3F7);
  color: white;
}

/* Leeres Benachrichtigungsstate */
.notification-panel .notification-content p.text-center {
  padding: 40px 20px !important;
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.notification-panel .notification-content p.text-center::before {
  content: '\f0f3';
  font-family: 'Font Awesome 6 Free';
  font-weight: 400;
  font-size: 3rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.3;
}

/* Neue Benachrichtigung - Pulsierender Effekt */
@keyframes notificationPulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.notification-item.new {
  animation: notificationPulse 2s ease-in-out;
  background: linear-gradient(90deg, 
    rgba(30, 136, 229, 0.1) 0%, 
    rgba(0, 188, 212, 0.05) 100%);
}

/* Globale Benachrichtigungen (Toast) */
.global-notification {
  position: fixed;
  top: 20px;
  left: -400px;
  width: 320px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  overflow: hidden;
  transition: left 0.3s var(--transition-bounce);
}

.global-notification.show {
  left: 70px;
}

.global-notification-content {
  padding: 15px;
}

.global-notification-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  position: relative;
}

.notification-profile-img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-blue);
}

.global-notification-text {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.global-notification-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.reply-btn {
  background: var(--primary-gradient);
  color: white;
}

.reply-btn:hover {
  background: var(--hover-gradient);
  transform: translateY(-2px);
}

.close-btn {
  background: #f1f3f4;
  color: #444;
}

.close-btn:hover {
  background: #e0e0e0;
}

/* === DARK MODE === */
body.dark-mode .notification-panel {
  background: rgba(30, 30, 30, 0.95);
  border-color: rgba(100, 116, 139, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

/* Dark Mode Header - Schwarzer Hintergrund mit weißem Text */
body.dark-mode .notification-panel .notification-header {
  background: rgba(30, 30, 30, 0.95);
  color: #ffffff;
  border-bottom: 1px solid rgba(100, 116, 139, 0.3);
}

body.dark-mode .notification-panel .notification-header span:first-child {
  color: #ffffff;
}

/* Glocken-Icon hellblau im Dark Mode - Venside Hellblau (#0ea5e9) wie Pong erstellen Button */
body.dark-mode .notification-panel .notification-header span:first-child i.fa-bell {
  color: #0ea5e9 !important;
}

/* Kreuz-Icon weiß im Dark Mode */
body.dark-mode .notification-panel .notification-header i.fa-times {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .notification-panel .notification-header i.fa-times:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Horizontale Scrollbar ausblenden */
.notification-panel .notification-content {
  overflow-x: hidden;
}

body.dark-mode .notification-item {
  background: rgba(30, 30, 30, 0.8);
  border-bottom-color: rgba(100, 116, 139, 0.2);
}

body.dark-mode .notification-item:hover {
  background: rgba(51, 65, 85, 0.6);
  box-shadow: -4px 0 12px rgba(30, 136, 229, 0.2);
}

body.dark-mode .notification-item img {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .notification-item:hover img {
  box-shadow: 0 6px 16px rgba(30, 136, 229, 0.5);
}

body.dark-mode .notification-icon-badge {
  border-color: rgba(30, 30, 30, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

body.dark-mode .notification-item small {
  color: #B0B0B0 !important;
}

body.dark-mode .notification-item small i {
  color: #B0B0B0 !important;
}

body.dark-mode .match-expires-info {
  color: #B0B0B0 !important;
}

body.dark-mode .match-expires-info i {
  color: #B0B0B0 !important;
}

body.dark-mode .match-expires-info span {
  color: #B0B0B0 !important;
}

body.dark-mode .notification-item.new {
  background: linear-gradient(90deg, 
    rgba(30, 136, 229, 0.2) 0%, 
    rgba(0, 188, 212, 0.1) 100%);
}

body.dark-mode .floating-top .notif-btn .badge {
  border-color: rgba(30, 30, 30, 0.9);
  box-shadow: 0 2px 8px rgba(255, 23, 68, 0.5), 0 0 20px rgba(255, 23, 68, 0.3);
}

body.dark-mode .floating-top .notif-btn:hover .badge {
  box-shadow: 0 4px 12px rgba(255, 23, 68, 0.7), 0 0 25px rgba(255, 23, 68, 0.5);
}
