/* ---------- Base ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
  --modal-pad: 16px;
}

body {
  min-height: 100vh;
  background: url('../images/bg2.jpg') no-repeat center center fixed;
  background-size: cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}


/* ---------- Table Card ---------- */
main.table {
  width: 95%;
  max-width: 1200px;
  /* margin-top: 45px; */
  margin-bottom: 60px;
  background: rgba(255, 255, 255, .2);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 30px rgba(200, 20, 140, .2);
}

.table__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.table__header h1 {
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  color: #391126;
}

.input-group {
  display: flex;
  align-items: center;
  background: rgb(233 30 99 / 21%);
  border-radius: 30px;
  padding: .4rem 1rem;
}

.input-group input {
  border: none;
  background: transparent;
  color: #880e4f;
  padding: .4rem;
  outline: none;
  font-size: clamp(.9rem, 2.5vw, 1rem);
}

.input-group img {
  width: 20px;
  margin-left: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(.75rem, 2vw, 1rem);
}

thead th {
  background: #f8bbd0;
  color: #4a0033;
  padding: .7rem;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 2;
}

tbody td {
  padding: .7rem;
  color: #4a0033;
}

tbody tr:nth-child(even) {
  background-color: rgba(255, 192, 203, .3);
}

.table-wrapper {
  max-height: 450px;
  overflow-y: auto;
  border-radius: 12px;
  position: relative;
  scroll-behavior: smooth;
}

.table-wrapper thead th {
  background: rgba(248, 187, 208, .75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2;
  color: #4a0033;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
  transition: background .3s ease;
}

.table-wrapper thead th:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, .2);
}

.table-wrapper tbody tr {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp .5s ease forwards;
  animation-delay: calc(var(--i)*.05s);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.table-wrapper tbody tr:hover {
  background-color: rgba(255, 255, 255, .3);
  backdrop-filter: blur(3px);
  transform: scale(1.01);
  box-shadow: 0 0 8px rgba(233, 30, 99, .2);
  transition: all .3s ease;
  cursor: pointer;
}

.action-buttons {
  display: flex;
  gap: .6rem;
}

.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: #880e4f;
}

/* ---------- Modal (Fullscreen 9:16 PDF viewer) ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, .85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.modal.open,
.modal.show {
  display: flex;
}

.modal-center {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.reel-box {
  position: relative;
  background: #111;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
  width: 360px;
  height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdf-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

canvas#pdfCanvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.share-row {
  width: 100%;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  padding-bottom: max(4px, env(safe-area-inset-bottom));
}

/* Make icon + text line up nicely on the pill buttons */
.btn {
  display: inline-flex;
  /* NEW */
  align-items: center;
  /* NEW */
  gap: 10px;
  /* NEW space between icon/text */
  border: none;
  border-radius: 28px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .2);
  cursor: pointer;
  min-width: 100px;
}

/* Icon sizing */
.btn i {
  /* NEW */
  font-size: 1rem;
  line-height: 0;
}

/* Existing colors (keep as-is for Share / Close) */
.btn.share {
  background: #c2185b;
}

.btn.close {
  background: #37474f;
}

/* Download is light, so sync icon color with text */
.btn.download {
  background: #ffffff;
  color: #c2185b;
}

.btn.download i {
  /* NEW */
  color: #c2185b;
}

/* (Optional) subtle hover/focus */
.btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .65);
  outline-offset: 2px;
}

.btn.download:focus-visible {
  outline-color: #c2185b;
}

@media (max-width:380px) {
  .reel-box {
    border-radius: 16px;
  }
}

.loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .35);
  z-index: 2;
  backdrop-filter: blur(2px);
}

.loading.hide {
  display: none;
}

/* Pulse-only logo loader */
.logo-loader {
  width: 84px;
  height: 84px;
  object-fit: contain;
  animation: pulse 1.8s ease-in-out infinite;
  filter: drop-shadow(0 0 10px #E33789);
  will-change: transform, filter;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: .85;
  }

  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

.heading-box {
  text-align: center;
  margin: 20px 0;
}

/* common animation style */


.main-heading,
.sub-heading {
  display: inline-block;
  margin: 0;
  line-height: 1.2;

  background-image: url("../images/html_table.jpg");
  /* ✅ adjust path */
  background-size: 200% auto;
  background-position: 0% 50%;
  background-repeat: no-repeat;

  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;

  animation: text-slide 10s linear infinite;
}

.main-heading {
  /* font-family: sans-serif; */
  font-family: 'Inter', system-ui, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 36px;
  font-weight: 900;
  /* boldest */
}

.sub-heading {
  font-family: sans-serif;
  font-size: 22px;
  font-weight: 500;
  /* smaller and lighter */
  /* margin-top: 3px; */
}

@keyframes text-slide {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}