/* ===============================
   Base Styles & Layout
   =============================== */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(to right, #1b1f36, #222a48, #2b305d);
  color: #e0e7ff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===============================
   Header & Logo
   =============================== */
header {
  background-color: #141933;
  padding: 1.2rem 1.5rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid #38bdf8;
  box-shadow: 0 3px 15px rgba(56, 189, 248, 0.4);
  animation: fadeIn 1.5s ease-in-out;
}

header .logo {
  height: 80px;
  margin-bottom: 0.6rem;
  filter:
    drop-shadow(0 0 6px rgba(56, 189, 248, 0.9))
    drop-shadow(0 0 12px rgba(56, 189, 248, 0.6));
  animation: logoGlow 3s ease-in-out infinite;
  user-select: none;
  transition: filter 0.3s ease;
}

header .logo:hover {
  filter:
    drop-shadow(0 0 10px rgba(56, 189, 248, 1))
    drop-shadow(0 0 18px rgba(56, 189, 248, 0.8));
}

h1 {
  margin: 0;
  font-size: 1.8rem;
  color: #38bdf8;
}

/* ===============================
   Navigation Links
   =============================== */
a {
  color: #7dd3fc;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

a:hover {
  color: #bae6fd;
  text-decoration: underline;
}

.button-link {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  margin: 0.3rem 0.5rem;
  font-size: 1rem;
  border-radius: 10px;
  background: #2563eb;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.6);
  text-decoration: none;
  transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
}

.button-link:hover {
  background: #1e40af;
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(30, 64, 175, 0.8);
}

/* ===============================
   Main Layout
   =============================== */
main {
  flex: 1;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.controls {
  text-align: center;
  margin-bottom: 1rem;
}

.controls label {
  font-size: 1rem;
  margin-right: 0.5rem;
}

/* ===============================
   Select Menu
   =============================== */
select {
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  background-color: #2d3b8a;
  color: #e0f2fe;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
  transition: background-color 0.3s ease;
}

select:hover, select:focus {
  background-color: #2563eb;
  color: #fff;
  outline: none;
}

/* ===============================
   Buttons
   =============================== */
.buttons {
  margin-top: 1rem;
}

button {
  padding: 0.6rem 1.2rem;
  margin: 0.3rem 0.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  background: #3b82f6;
  color: white;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.6);
  transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
}

button:disabled {
  background: #555;
  cursor: not-allowed;
  box-shadow: none;
}

button:hover:not(:disabled) {
  background: #1e40af;
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(30, 64, 175, 0.8);
}

button:focus-visible {
  outline: 3px solid #60a5fa;
  outline-offset: 2px;
}

/* ===============================
   Status & Messages
   =============================== */
.status {
  text-align: center;
  margin-top: 1rem;
  font-size: 1.1rem;
}

.warning {
  color: #f87171;
}

#loadedNames {
  margin-top: 1rem;
}

/* ===============================
   Slideshow Area
   =============================== */
.slideshow {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  max-width: 100%;
  flex-wrap: wrap;
  animation: fadeIn 1s ease;
  position: relative;
}

.slideshow img {
  max-width: 90%;
  max-height: 400px;
  border-radius: 20px;
  box-shadow: 0 12px 36px rgba(56, 189, 248, 0.4);
  display: none;
  animation: fadeInScale 0.7s ease forwards;
  user-select: none;
}

.slideshow.loading::after {
  content: '';
  display: block;
  margin: 2rem auto;
  width: 48px;
  height: 48px;
  border: 5px solid #38bdf8;
  border-top: 5px solid #f0f0f0;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.slideshow::before {
  content: attr(data-message);
  display: block;
  text-align: center;
  font-size: 1.2rem;
  color: #a5b4fc;
  margin-top: 3rem;
  user-select: none;
}

/* ===============================
   Upload Dropzone
   =============================== */
.dropzone {
  border: 2px dashed #38bdf8;
  padding: 2rem;
  text-align: center;
  margin: 2rem auto;
  max-width: 500px;
  border-radius: 10px;
  background-color: #2d3b8a;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.dropzone.dragover {
  background-color: #2563eb;
}

.upload-label {
  color: #7dd3fc;
  text-decoration: underline;
  cursor: pointer;
}

progress {
  width: 100%;
  margin-top: 1rem;
  height: 20px;
  border-radius: 6px;
  background-color: #2d3b8a;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

#uploadMessage {
  margin-top: 0.5rem;
  font-weight: bold;
}

/* ===============================
   Footer
   =============================== */
footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  background: #1c233a;
  color: #94a3b8;
  border-top: 1px solid #38bdf8;
}

/* ===============================
   Animations
   =============================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.85);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

@keyframes logoGlow {
  0%, 100% {
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.8));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(56, 189, 248, 1));
  }
}

/* ===============================
   Responsive Design
   =============================== */
@media (max-width: 600px) {
  h1 {
    font-size: 1.4rem;
  }

  .buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  button {
    width: 80%;
    margin: 0 auto;
  }

  .slideshow {
    min-height: 250px;
  }

  .slideshow img {
    max-width: 100%;
    max-height: 300px;
  }
}
/*///////*/
.match-info {
  font-size: 1.2rem;
  color: #facc15;
  margin-top: 1rem;
  animation: fadeIn 0.5s ease-in-out;
}
