* {
  font-family: "Rubik", sans-serif;
}

body {
  color: #f0f0f0;
  background-color: #222222;
}

#page-content {
  transition: filter 0.3s ease-in-out;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#page-content.blurred {
  filter: blur(5px);
}

text {
  fill: #f0f0f0;
}

.homework-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: 100%;
  justify-content: space-between;
}

.homework-item {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  margin: 10px;
  border-radius: 5px;
  background-color: #2c2c2c;
  min-height: 128px;
  font-size: 20px;
}

.homework-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid transparent;
  border-radius: 5px;
  transition: border-color 0.3s ease-in-out;
  pointer-events: none;
}

.homework-item:hover::before {
  border-color: #f0f0f0;
}

.homework-text-content h4 {
  margin: 0px;
}

.homework-text-content p {
  font-size: 12px;
}

a {
  color: #f0f0f0;
  text-decoration: none;
}

.disabled {
  background-color: #1f1f1f !important;
}

.rounded {
  border-radius: 15px;
}

.track-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.track-container button,
.track-container select {
  margin-top: 10px;
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  background-color: #24292F;
  color: #f0f0f0;
  transition: background-color 0.3s ease-in-out;
  cursor: pointer;
}

.vis-container {
  display: flex;
  gap: 10px;
}

.button-container {
  display: flex;
  gap: 10px;
}

/* Video Explanation - https://youtu.be/3AK3vspZvvM */
*, *::before, *::after {
  box-sizing: border-box;
}

.search-text {
  position: relative;
  /* font-size: 16px; */
  border: none;
  border-radius: 10px;
  transition: background-color 0.3s ease-in-out;
  display: inline-block;
  --field-padding: 12px;
}

.search-text input {
  border: none;
  -webkit-appearance: none;
  -ms-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: #24292F;
  color: #f0f0f0;
  padding: var(--field-padding);
  border-radius: 10px;
  width: 420px;
  outline: none;
  font-size: 14px;
}

.search-text .placeholder {
  position: absolute;
  left: var(--field-padding);
  width: calc(100% - (var(--field-padding) * 2));
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  top: 20px;
  line-height: 100%;
  font-size: 14px;
  transform: translateY(-50%);
  color: #aaa;
  transition: 
    top 0.3s ease,
    color 0.3s ease,
    font-size 0.3s ease;
}

.search-text input.dirty + .placeholder,
.search-text input:focus + .placeholder,
.search-text input:not(:placeholder-shown) + .placeholder {
  top: -10px;
  font-size: 10px;
  color: #f0f0f0;
}

.search-text .error-message:empty {
  opacity: 0;
}

.search-text {
  --draw-duration: 0.1s;
  --draw-color: #f0f0f0;
  --draw-line-width: 2px;
  --draw-easing: ease-in-out;
}

.search-text .border {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  transform: none;
  display: flex;
  align-items: center;
  /* padding-left: 12px; */
  border-radius: 10px;
}

.search-text .border::after, 
.search-text .border::before {
  content: "";
  width: 0;
  height: 0;
  display: inline-block;
  position: absolute;
  border-radius: 10px;
}

.search-text .border::before {
  left: 0;
  bottom: 0;
  border-right: 0px solid var(--draw-color);
  border-bottom: 0px solid var(--draw-color);
  transition:
    border 0s ease-in-out calc(var(--draw-duration) * 4),
    height var(--draw-duration) var(--draw-easing) calc(var(--draw-duration) * 2),
    width var(--draw-duration) var(--draw-easing) calc(var(--draw-duration) * 3);
}

.search-text .border::after {
  right: 0;
  top: 0;
  border-left: 0px solid var(--draw-color);
  border-top: 0px solid var(--draw-color);
  transition: 
    border 0s linear calc(var(--draw-duration) * 2),
    height var(--draw-duration) var(--draw-easing),
    width var(--draw-duration) var(--draw-easing) var(--draw-duration);
}

.search-text input:focus ~ .border::before,
.search-text input:not(:placeholder-shown) ~ .border::before,
.search-text input.dirty ~ .border::before,
.search-text input:focus ~ .border::after,
.search-text input:not(:placeholder-shown) ~ .border::after,
.search-text input.dirty ~ .border::after {
  width: 100%;
  height: 100%;
  border-width: var(--draw-line-width);
}

.search-text input:not(:placeholder-shown) ~ .border::before,
.search-text input.dirty ~ .border::before,
.search-text input:focus ~ .border::before {
  transition-delay: 0s, var(--draw-duration), 0s;
}

.search-text input:not(:placeholder-shown) ~ .border::after,
.search-text input.dirty ~ .border::after,
.search-text input:focus ~ .border::after {
  transition-delay: 
    calc(var(--draw-duration) * 2), 
    calc(var(--draw-duration) * 3), 
    calc(var(--draw-duration) * 2);
}

.search-results-scrollable {
  position: relative;
  width: 420px;
  height: 462px;
}

.search-results-scrollable-yelp {
  position: relative;
  width: 420px;
  height: 312px;
}

.search-results-scrollable-mc {
  position: relative;
  width: 420px;
  height: 600px;
}

.table-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  transition: ease-in;
}

.table-container .row {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 5px 0;
  color: #f0f0f0;
  font-size: 14px;
}

.table-container .row:hover,
.table-container .row:nth-child(odd):hover {
  background-color: #00000030;
}

.table-container .row:nth-child(odd) {
  background-color: #00000015;
}

.race-info-scrollable {
  position: relative;
  height: 118px;
}

.race-info-table {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.race-info-table .row {
  top: 5px;
  left: 10px;
  bottom: 0px;
  color: #f0f0f0;
  font-size: 14px;
}

#comparator-select {
  position: absolute;
  top: 6px;
  left: 946px;
  width: 42px;
  height: 42px;
  background-color: #222222;
  color: #f0f0f0;
  border-radius: 7px;
  border: none;
}

#distance-slider {
  position: absolute;
  top: 70px;
  left: 786px;
  width: 152px;
  height: 42px;
}

.filter-container {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
  padding: 5px;
  background-color: #24292f;
  border-radius: 5px;
}

.filter-button {
  flex-grow: 1;
  padding: 5px 8px;
  font-size: 11px;
  font-family: 'Rubik', sans-serif;
  cursor: pointer;
  background-color: #333a42;
  color: #f0f0f0;
  border: 1px solid #555;
  border-radius: 4px;
  transition: background-color 0.2s, border-color 0.2s;
  text-align: center;
  position: relative;
  padding-right: 20px;
}

.filter-button:hover {
  background-color: #444c56;
  border-color: #777;
}

.filter-button.active {
  background-color: #6cf16b;
  color: #24292f;
  border-color: #6cf16b;
  font-weight: bold;
}

.meme-list-container {
  position: fixed;
  top: 80px;
  left: 20px;
  width: 350px;
  height: calc(100vh - 100px);
  overflow-y: auto;
  background-color: #2d333b;
  border-radius: 8px;
  padding: 10px;
  border: 1px solid #444;
  z-index: 5;
  box-sizing: border-box;
}

.meme-item {
  display: flex;
  align-items: center;
  padding: 8px;
  margin-bottom: 8px;
  background-color: #24292f;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s;
  border: 1px solid transparent;
}

.meme-item:hover {
  background-color: #333a42;
  border-color: #555;
}

.meme-thumbnail {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 10px;
  flex-shrink: 0;
}

.meme-info {
  flex-grow: 1;
  overflow: hidden;
  color: white;
  font-size: 13px;
}

.meme-info span {
   display: block;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
}
 .meme-info .name {
   font-weight: bold;
   margin-bottom: 3px;
 }
 .meme-info .details {
   font-size: 11px;
   color: #aaa;
 }

 .brainrot-score-label {
    color: #ff6666;
    font-weight: bold;
 }

.tooltip, #meme-details-view {
  position: absolute;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  color: black;
  z-index: 20;
  max-width: 300px;
  font-family: 'Rubik', sans-serif;
  font-size: 14px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#meme-details-view img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 10px;
  border-radius: 4px;
}
#meme-details-view p {
    margin: 0;
    line-height: 1.4;
}

#tiktok-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#tiktok-modal {
  width: 364px;
  background-color: #2d333b;
  padding: 40px 20px 20px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  position: relative;
  max-width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  color: #f0f0f0;
}

#tiktok-modal-info {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #444;
  font-size: 14px;
  line-height: 1.5;
}

#tiktok-modal-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 15px;
}

#tiktok-modal-info h3 {
  font-size: 16px;
  margin-top: 10px;
  margin-bottom: 5px;
  color: #6cf16b;
}

#tiktok-modal-info p {
  margin-bottom: 10px;
}

#tiktok-modal-info a {
  color: #6cf16b;
  text-decoration: underline;
}
#tiktok-modal-info a:hover {
  color: #8cff8c;
}

#tiktok-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}

#tiktok-embed-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 0;
  padding-top: 15px;
}

#tiktok-modal h2 {
    margin-top: 0;
    text-align: center;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.selection-tag {
  cursor: pointer;
  transition: all 0.2s;
}

#start-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  filter: none;
}

#disclaimer-modal {
  background-color: #fefefe;
  padding: 30px;
  border-radius: 10px;
  max-width: 500px;
  text-align: center;
  font-family: 'Rubik', sans-serif;
  color: #333;
}

#disclaimer-modal p {
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.5;
}

#acknowledge-button {
  padding: 10px 25px;
  font-size: 18px;
  font-family: 'Rubik', sans-serif;
  cursor: pointer;
  background-color: #6cf16b;
  color: #24292f;
  border: none;
  border-radius: 8px;
  transition: background-color 0.2s;
}

#acknowledge-button:hover {
  background-color: #4caf50;
}

.link {
  color: #1a73e8;
  text-decoration: underline;
}

.meme-info .details {
  display: flex;
  gap: 5px;
}

.sort-caret {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
}
.sort-caret.asc::before {
  content: '▲';
}
.sort-caret.desc::before {
  content: '▼';
}

#date-scroll-svg {
  display: block;
  border: 1px solid #555;
  cursor: ew-resize; 
  border-radius: 5px;
}

.date-display-container {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 20px;
}

#top-memes-svg {
  background-color: #24292f;
  border-radius: 5px;
  border: 1px solid #555;
}

.date-title-container {
  width: 700px;
  text-align: center;
  margin-bottom: 10px;
  color: #f0f0f0;
}

.date-title-container h2 {
  margin-bottom: 5px;
  font-size: 1.1em;
  display: flex;
  justify-content: center;
}

.date-title-container p {
  font-size: 0.9em;
  font-style: italic;
  color: #aaa;
}

#comparison-container {
    background-color: #24292f;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 1px solid #555;
}

.comparison-controls button {
    padding: 6px 12px;
    margin: 0 5px;
    cursor: pointer;
    background-color: #333;
    color: #f0f0f0;
    border: 1px solid #555;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.comparison-controls button:hover {
    background-color: #555;
}

.comparison-controls button.active {
    background-color: #6cf16b;
    color: #1c2128;
    font-weight: bold;
    border-color: #6cf16b;
}

#comparison-chart-svg .axis path,
#comparison-chart-svg .axis line {
  stroke: #aaa;
}

#comparison-chart-svg .axis text {
  fill: #f0f0f0;
  font-size: 10px;
}

#comparison-chart-svg .line-comparison {
  fill: none;
  stroke-width: 2px;
  transition: stroke 0.3s, stroke-width 0.3s, opacity 0.3s;
}

#comparison-chart-svg .peak-marker-comparison {
    stroke: black;
    stroke-width: 1px;
    transition: cx 0.5s, cy 0.5s, fill 0.5s;
}

#comparison-chart-svg .legend-item-comparison text {
    fill: #f0f0f0;
    font-size: 12px;
}

#comparison-chart-svg .legend-item-comparison.legend-item-hover-remove text {
    fill: #ff6b6b;
    text-decoration: line-through;
}

#comparison-chart-svg .hover-line {
    stroke: #aaa;
    stroke-width: 1;
    stroke-dasharray: 3, 3;
    pointer-events: none;
}

#comparison-chart-svg .hover-texts {
    pointer-events: none;
}

#comparison-chart-svg .hover-text-item text {
    font-family: 'Rubik', sans-serif;
    font-size: 11px;
}

#comparison-container.drag-over {
    background-color: #2a3038;
    border: 2px dashed #6cf16b;
}

#comparison-chart-svg .x-axis-label-comparison,
#comparison-chart-svg .y-axis-label-comparison {
    fill: #f0f0f0;
}

#comparison-chart-svg .hover-line {
    stroke: #f0f0f0;
    stroke-width: 1px;
    stroke-dasharray: 3,3;
    pointer-events: none;
}

#comparison-chart-svg .hover-texts {
    pointer-events: none;
}

#comparison-chart-svg .hover-text-item text {
    text-anchor: start;
}