/**
 * Result Notification System Styles
 * Achievement-style overlay for new race result notifications
 */

/* ===== Overlay & Container ===== */

.result-notification-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(15px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.result-notification-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.result-notification-container {
  max-width: 600px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 2rem;
  text-align: center;
  animation: resultFadeIn 0.6s ease-out forwards;
}

/* ===== Header Styling ===== */

.result-notification-header {
  margin-bottom: 2rem;
}

.result-notification-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  animation: trophyBounce 0.6s ease-in-out 2;
}

.result-notification-icon img,
.result-notification-icon svg {
  width: 96px;
  height: 96px;
}

.result-notification-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, #00ff88, #45caff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 0.5rem 0;
}

.result-notification-subtitle {
  font-family: 'Exo 2', sans-serif;
  font-size: 1.125rem;
  color: #a0a8c0;
  margin: 0;
}

/* ===== Result Cards ===== */

.result-notification-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.result-notification-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: #141824;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: cardSlideIn 0.5s ease-out forwards;
  opacity: 0;
}

.result-notification-card:nth-child(1) { animation-delay: 0.1s; }
.result-notification-card:nth-child(2) { animation-delay: 0.2s; }
.result-notification-card:nth-child(3) { animation-delay: 0.3s; }
.result-notification-card:nth-child(4) { animation-delay: 0.4s; }
.result-notification-card:nth-child(5) { animation-delay: 0.5s; }

/* Position-based styling */
.result-notification-card.position-1 {
  border-color: #FFD700;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.2);
}

.result-notification-card.position-2 {
  border-color: #C0C0C0;
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.15), rgba(192, 192, 192, 0.05));
}

.result-notification-card.position-3 {
  border-color: #CD7F32;
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.15), rgba(205, 127, 50, 0.05));
}

.result-notification-card.position-top10 {
  border-color: #45caff;
  background: linear-gradient(135deg, rgba(69, 202, 255, 0.1), transparent);
}

.result-notification-card.position-dnf {
  border-color: #6b7280;
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.1), transparent);
}

/* Position badge */
.result-card-position {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  min-width: 70px;
  text-align: center;
  color: #ffffff;
}

.position-1 .result-card-position { color: #FFD700; }
.position-2 .result-card-position { color: #C0C0C0; }
.position-3 .result-card-position { color: #CD7F32; }
.position-top10 .result-card-position { color: #45caff; }
.position-dnf .result-card-position { color: #ff6b6b; }

/* Card details */
.result-card-details {
  flex: 1;
  text-align: left;
}

.result-card-event {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 0.25rem 0;
}

.result-card-points {
  font-family: 'Exo 2', sans-serif;
  font-size: 0.9rem;
  color: #00ff88;
  margin: 0;
}

/* ===== Action Buttons ===== */

.result-notification-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease-out 0.4s forwards;
  opacity: 0;
}

.result-notification-btn {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.result-notification-view {
  background: linear-gradient(135deg, var(--accent-pink, #ff1b6b), var(--accent-purple, #c71ae5));
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(255, 27, 107, 0.4);
}

.result-notification-view:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(255, 27, 107, 0.6);
}

.result-notification-dismiss {
  background: #2a2e3f;
  color: #a0a8c0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-notification-dismiss:hover {
  background: #363b4d;
  color: #ffffff;
  transform: translateY(-2px);
}

/* ===== Hint Text ===== */

.result-notification-hint {
  font-family: 'Exo 2', sans-serif;
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 1.5rem;
  animation: fadeInUp 0.6s ease-out 0.6s forwards;
  opacity: 0;
}

/* ===== Animations ===== */

@keyframes resultFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes trophyBounce {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-15px) scale(1.1);
  }
}

/* ===== Mobile Responsiveness ===== */

@media (max-width: 768px) {
  .result-notification-container {
    max-width: 95%;
    padding: 1.5rem;
  }

  .result-notification-title {
    font-size: 1.75rem;
  }

  .result-notification-icon {
    font-size: 4rem;
  }

  .result-notification-card {
    padding: 1rem;
    gap: 1rem;
  }

  .result-card-position {
    font-size: 1.5rem;
    min-width: 55px;
  }

  .result-card-event {
    font-size: 1rem;
  }

  .result-notification-btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }

  .result-notification-actions {
    flex-direction: column;
    width: 100%;
  }

  .result-notification-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .result-notification-card {
    flex-direction: column;
    text-align: center;
  }

  .result-card-details {
    text-align: center;
  }

  .result-notification-title {
    font-size: 1.5rem;
  }

  .result-notification-subtitle {
    font-size: 1rem;
  }
}

/* ===== Custom Scrollbar ===== */

.result-notification-container::-webkit-scrollbar {
  width: 8px;
}

.result-notification-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.result-notification-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.result-notification-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}
