/* ---------- GLOBAL ---------- */
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #222;

  /* Background image */
  background: 
    linear-gradient(
      rgba(255, 255, 255, 0.50),
      rgba(255, 255, 255, 0.50)
    ),
    url("collegebanner.png") no-repeat center center fixed;

  background-size: cover;
}

.section {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 15px;
}

/* Section titles like "Department Scoreboard" or "Event Results" */
.section-title {
  display: inline-block;
  /* background: rgba(26, 26, 79, 0.85); deep indigo */
  color: #fff; /* white text */
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
/* Scoreboard title */
.section-title.scoreboard {
  background-color: rgba(9, 61, 139, 0.7);
}

/* Event results title */
.section-title.events {
 background-color: rgba(236, 181, 28, 0.7); /* subtle purple for arts */
}

/* ---------- HEADER ---------- */
.fest-header {
  /* background: linear-gradient(135deg, #242494, #2f87fa); */
   background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  color: #ffffff;
  padding: 22px 15px;
  border-bottom: 3px solid #d4af37; /* subtle gold accent */
  border-radius: 0 0 20px 20px;
}


.header-content {
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.college-logo {
  height: 68px;
  width: auto;
  background: white;
  padding: 6px;
  border-radius: 8px;
}

.college-name {
  font-family: 'Algreya', serif;
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}


.fest-name {
font-family: 'Algreya', serif;
  margin: 0;
  margin: 4px 0 0;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #f0e6c8; /* soft gold */
}

/* ---------- SCOREBOARD TABLE ---------- */
.table-wrapper {
  overflow-x: auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.score-table {
  width: 100%;
  border-collapse: collapse;
}

.score-table thead {
  background: #f0f0ff;
}

.score-table th,
.score-table td {
  padding: 14px 16px;
  text-align: left;
}

.score-table th {
  font-weight: 600;
  font-size: 0.95rem;
}

.score-table tbody tr:nth-child(1) {
  background: #fff6cc;
  font-weight: bold;
}

.score-table tbody tr:nth-child(2) {
  background: #f1f1f1;
}

.score-table tbody tr:nth-child(3) {
  background: #fdf0e6;
}

.score-table tbody tr:hover {
  background: #eef1ff;
}

.last-updated {
  display: block; /* was inline-block before */
  font-size: 0.85rem;
  color: #000;
  padding: 6px 12px;
  border-radius: 12px;
  background: #eef1ff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  white-space: nowrap;
  min-width: 80px; /* prevent collapse on mobile */
  text-align: right;
}

/* ---------- EVENT CARDS ---------- */
.event-card {
  background: white;
  border-radius: 14px;
  padding: 18px;
  height: 100%;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.event-card h5 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.winner small {
  color: #666;
}

/* ---------- BUTTONS ---------- */
button {
  border-radius: 25px !important;
  padding: 8px 20px !important;
  font-weight: 500;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }

  .college-logo {
    height: 60px;
  }
}
/* ================= SCOREBOARD ================= */

.scoreboard-section {
  margin-top: 30px;
}

.score-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 1rem;
}

.score-table thead th {
  background: #1a1a4f;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
}

.score-table th,
.score-table td {
  padding: 14px 18px;
}

.score-table tbody tr {
  background: #ffffff;
  transition: background 0.2s ease;
}

.score-table tbody tr:hover {
  background: #f1f3ff;
}

/* 🥇🥈🥉 Top 3 highlight */
.score-table tbody tr:nth-child(1) {
  background: linear-gradient(90deg, #fff4c2, #fff);
  font-weight: 700;
}

.score-table tbody tr:nth-child(2) {
  background: linear-gradient(90deg, #eaeaea, #fff);
  font-weight: 600;
}

.score-table tbody tr:nth-child(3) {
  background: linear-gradient(90deg, #f7e3d3, #fff);
  font-weight: 600;
}

/* Rank column emphasis */
.score-table td:first-child {
  font-size: 1.1rem;
  font-weight: 700;
}

/* Points column emphasis */
.score-table td:last-child {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a4f;
  
}
/* ---------------- ANIMATED EVENT HEADER ---------------- */
.animated-header {
  font-family: 'Noto Serif Malayalam', serif;
  font-size: 4rem;
  font-weight: 700;
  color: #ffc402;
  margin: 25px auto;
  text-align: center;
  display: block;
  max-width: 100%;
  background: none !important;
  padding: 0;
  box-shadow: none;

  animation: popGlow 5.5s ease-in-out infinite alternate;
  transition: transform 0.2s ease;
}

/* Keyframes with white border + glow */
@keyframes popGlow {
  0% {
    transform: scale(1);
    text-shadow:
      /* white border */
       1px 1px 0 #ffffff,
      -1px 1px 0 #ffffff,
       1px -1px 0 #ffffff,
      -1px -1px 0 #ffffff,
       0px 1px 0 #ffffff,
       1px 0px 0 #ffffff,
      -1px 0px 0 #ffffff,
       0px -1px 0 #ffffff;
  }
  50% {
    transform: scale(1.05);
    text-shadow:
      /* white border + pink glow */
       1px 1px 12px rgba(255, 242, 130, 0.5),
      -1px 1px 12px rgba(255, 242, 130, 0.5),
       1px -1px 12px rgba(255, 242, 130, 0.5),
      -1px -1px 12px rgba(255, 242, 130, 0.5),
       0px 1px 12px rgba(255, 242, 130, 0.5),
       1px 0px 12px rgba(2255, 242, 130, 0.5),
      -1px 0px 12px rgba(255, 242, 130, 0.5),
       0px -1px 12px rgba(255, 242, 130, 0.5);
  }
  100% {
    transform: scale(1);
    text-shadow:
      /* white border */
       1px 1px 0 #ffffff,
      -1px 1px 0 #ffffff,
       1px -1px 0 #ffffff,
      -1px -1px 0 #ffffff,
       0px 1px 0 #ffffff,
       1px 0px 0 #ffffff,
      -1px 0px 0 #ffffff,
       0px -1px 0 #ffffff;
  }
}

.site-footer {
  background-color: rgba(0, 0, 0, 0.7); /* semi-transparent dark background */
  color: #fff;                        /* white text */
  text-align: center;                  /* center text */
  padding: 12px 20px;                  /* vertical & horizontal padding */
  font-size: 0.9rem;                   /* slightly smaller font */
  position: relative;                  /* stays at bottom if content is short */
  margin-top: 30px;                    /* space above footer */
  border-top: 1px solid #ffc402;      /* optional yellow top border for style */
  box-shadow: 0 -3px 10px rgba(0,0,0,0.3); /* subtle shadow */
  /* position: fixed; */
  bottom: 0;
  left: 0;
  width: 100%;
}
.site-footer p:hover {
  color: #ffc402; /* bright yellow on hover */
  transition: 0.3s ease;
}

.event-search {
  text-align: center;
  margin: 20px 0;
}

#eventSearch {
  width: 90%;
  max-width: 400px;
  padding: 10px 14px;
  border-radius: 25px;
  border: 1px solid #ccc;
  font-size: 0.95rem;
  outline: none;
}

#eventSearch:focus {
  border-color: #ffc402;
  box-shadow: 0 0 6px rgba(255,196,2,0.4);
}


.no-results {
  text-align: center;
  margin: 30px 0;
  font-size: 1rem;
  color: #666;
  font-style: italic;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Subtle update flicker */
.update-flicker {
  animation: flickerGlow 1.2s ease-in-out;
}

@keyframes flickerGlow {
  0% {
    background-color: rgba(255, 196, 2, 0.35);
  }
  50% {
    background-color: rgba(255, 196, 2, 0.15);
  }
  100% {
    background-color: transparent;
  }
}
.scoreboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.scoreboard-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
@media (max-width: 600px) {
  .scoreboard-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
.scoreboard-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* LIVE badge */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #d40000;
  background: rgba(212, 0, 0, 0.1);
  padding: 3px 8px;
  border-radius: 12px;
}

/* Pulsing dot */
.live-dot {
  width: 8px;
  height: 8px;
  background: #d40000;
  border-radius: 50%;
  animation: livePulse 1.4s infinite;
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(212, 0, 0, 0.6);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(212, 0, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(212, 0, 0, 0);
  }
}

.last-updated {
  font-family: Arial, sans-serif; /* fallback for safety */
}