@font-face {
  font-family: 'Inter';
  src: url('../inter-v20-latin-regular.woff2') format('woff2');
  font-weight: 400; /* normal weight */
  font-style: normal;
}

* {
  scrollbar-width: thin;           /* makes scrollbar thinner */
  scrollbar-color: #555 #222;     /* thumb / track colors */
}

html {
    background-color: rgb(9,9,9);
    scroll-behavior: smooth;
    transition: background 1.25s ease;
    
}

html.video-playing {
  background-color: rgb(0, 0, 0);
}

header {
  padding-top: .5vh;
  background-image: linear-gradient(to top, rgba(0,0,0,0), rgb(110, 7, 7));
  transition: opacity 2.5s ease;
}

#header-img {
  user-select: none;       /* prevents text selection */
  -webkit-user-drag: none; /* prevents drag in Safari/Chrome */
  -moz-user-select: none;   /* Firefox */
  -ms-user-select: none;    /* IE/Edge */
  pointer-events: auto;     /* keep clicks working */
}


html.video-playing header {
  opacity: 0;
}

body {
  margin: 0;
  padding: 0;
  padding-bottom: 10vh;
  box-sizing: border-box; /* Ensures padding/border are included in element's total width/height */
}

html.video-playing .card {
  opacity: 0.75;
}


details summary {
  cursor: pointer;
  font-weight: bold;
  font-family: 'Inter', sans-serif;
  color:rgb(255, 0, 0);
}

details p {
  margin: 5px 0 0 0;
}

.box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
  }
  
.box div {
    padding: 15px;
}

  .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    justify-items: stretch; /* centers cards in columns */
  }

  .card {
    box-sizing: border-box;
    background-image: linear-gradient(to top, rgba(0,0,0,0), rgb(59, 0, 0));
    border-radius: 20px;
    padding: 30px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 2.5s ease;
  
    /* CHANGE THESE: */
    height: auto;          /* Let the content define the height */
    min-height: 200px;     /* Keeps the "look" of the card if content is short */
    white-space: normal;   /* Allows wrapping */
    overflow: visible;     /* Ensures nothing gets clipped */
  }

  .card:not(.full-width) {
    height: auto;          /* Changed from 200px */
    min-height: 200px;     /* Maintains the size you liked */
    max-width: 400px;
    width: 100%;
    display: flex;         /* Optional: helps align content inside */
    flex-direction: column;
  }
.card.full-width {
  grid-column: 1 / -1;  /* spans all columns */
  width: 100%;           /* ensures it spans container */
  max-width: 100%;
  height: auto;          /* grows with content */
  max-height: none;
  overflow: visible;
  box-sizing: border-box;
}

.full-width {
  grid-column: 1 / -1; /* spans all columns */
  max-width: 100%;
}

@media (max-width: 900px) {
  .container {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .full-width {
    grid-column: auto;
  }
}

.chapters {
  max-height: 50vh;
  overflow: hidden;
  padding-right: 8px;
  transition: max-height 0.4s ease, padding 0.3s ease;

}


.page {
  width: 70vw;      
  max-width: 1200px;  
  margin: 0 auto;      
}


video {
  width: 75%;
  aspect-ratio: 16 / 9;    /* Reserves the 16:9 space immediately */
  background-color: rgba(0,0,0,0);
  display: block;
  margin: 0 auto 4% auto;  /* Centered with your 4% bottom margin */
  transition: width .125s;
  
  /* Optional: keeps the video from stretching if it's not 16:9 */
  object-fit: contain;     
}

@media (max-width: 1200px) {
  
  video {
    width: 100%;
    border-radius: 0px;
    transition: width .125;
  }
}

@media all and (display-mode: fullscreen) {
  video {
    border-radius: 0px;
  }
}

.card h2 {
  margin-top: 0;
  font-weight: 600;
  color: rgb(255, 255, 255);
}

.shortcut-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 24px;
  margin-top: 10px;
}


h1, h2, h3 {
  font-family: 'Inter', sans-serif;
  color: white;
}

p {
  margin: 0px;
  color: white;
  font-family: 'Inter', sans-serif;
}

a, a:link, a:visited {
  color: blue;
  text-decoration: none;
}

.timestamp {
  font-family: 'Inter', sans-serif;
  font-variant-numeric: tabular-nums;
}

a:link {
  text-decoration: none;
}

a:visited {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:active {
  text-decoration: underline;
}

video:focus {
  outline: none;
}

#qualitySelect {
  width: 100%;                  /* full width of the card */
  padding: 10px 15px;           /* comfortable padding */
  font-family: 'Inter', sans-serif;  /* match your card font */
  font-size: 1rem;
  color: white;                  /* text color */
  background-color: rgb(12, 12, 12); /* black background */
  border: 1px solid #4d0000;       /* subtle border */
  border-radius: 12px;           /* rounded corners */
  appearance: none;              /* remove default arrow (for modern styling) */
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

/* Hover & focus effect */
#qualitySelect:hover,
#qualitySelect:focus {
  border-color: red; /* matches your theme color */
  outline: none;
}

/* Optional: add a custom arrow using background */
#qualitySelect::after {
  content: '▾';
  position: absolute;
  right: 15px;
  pointer-events: none;
}

/* Minimal styling for clickable card */
.download-card {
  text-decoration: none;  /* remove underline */
  color: inherit;         /* keep the card text color */
  cursor: pointer;        /* show pointer on hover */
  display: block;         /* ensures the link fills the card */
}

/* Style buttons */
.btn {
  background-color: rgb(180, 0, 0);
  border: none;
  color: white;
  padding: 12px 30px;
  cursor: pointer;
  font-size: 20px;
  text-decoration: none;
  display: block;   /* makes the button a block-level element */
  margin: 0 auto;   /* horizontally centers the button */
  border-radius: 24px;
}

.btn-s {
  background-color: rgb(150, 0, 0);
  border: none;
  color: white;
  padding: 8px 20px;
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
  border-radius: 24px;
  margin-bottom: 20px;
}

.copyspan {
  position: fixed;
  bottom: 24px;
  left: 24px;
  opacity: 0;
  transition: opacity 0.4s;
  font-size: 14px;
  padding: 8px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: white;
  color: #333;
  font-family: 'Inter', sans-serif;
  user-select: none;
  pointer-events: none;
}

/* Darker background on mouse-over */
.btn:hover {
  background-color: rgb(80, 0, 0);
}

/* Darker background on mouse-over */
.btn-s:hover {
  background-color: rgb(80, 0, 0);
}

.download-card, 
.download-card:hover, 
.download-card:active, 
.download-card:visited {
  text-decoration: none !important; /* !important ensures it overrides your general 'a' tags */
  border-bottom: none;              /* Just in case of any border-bottom tricks */
}