@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600&display=swap");

body {
  background-color: #040716;
  color: white;
  font-family: "Montserrat", Arial, sans-serif;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
}

h1 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  text-align: center;
  margin-bottom: 20px;
}

.ranking-header {
  display: flex;
  align-items: center;
  padding: 2px 5px;
  margin-bottom: 0;
  position: sticky;
  top: 0;
  background-color: #040716;
  z-index: 20;
  border-bottom: 1px solid #737373;
  transition: box-shadow 0.3s ease;
}

.ranking-header.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.movie-row {
  display: flex;
  align-items: center;
  padding: 0px 5px;
  border-bottom: 1px solid #737373;
  min-height: 38px;
}

.column {
  flex: 1;
}

.ratings {
  margin-left: auto;
  display: grid;
  grid-template-columns: 55px 45px 45px 45px 45px 45px 45px 45px 45px;
  gap: 5px;
  justify-content: end;
  align-items: flex-end;
}

.rating-item {
  width: 100%;
  text-align: center;
  font-weight: bold;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 55px;
  justify-content: flex-end;
  gap: 0px;
  background: none;
}

.ratings > div:first-child {
  width: 55px;
}

.ratings > div:first-child span {
  width: 55px;
}

.rating-icon {
  width: 45px;
  height: 28px;
  object-fit: contain;
  margin-bottom: 6px;
}

.ratings > div:first-child .rating-capsule,
.ratings > div:not(:first-child) .rating-capsule {
  width: 45px;
}

.rating-item span {
  font-size: 0.6em;
  letter-spacing: 0.5px;
  width: 45px;
  white-space: nowrap;
  display: block;
  text-align: center;
  margin: 0 0 2px 0;
  padding: 0;
  line-height: 1.2;
}

.movie-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  font-size: 1.1em;
  font-weight: 600;
  text-transform: uppercase;
  padding-left: 8px;
  letter-spacing: 0.5px;
  line-height: 1.2;
  flex: 1;
  transition: max-width 0.2s ease;
}

.rating-capsule {
  width: 100%;
  padding: 3px 0;
  border-radius: 5px;
  text-decoration: none;
  color: #040716;
  font-weight: 700;
  font-family: "Montserrat", Arial, sans-serif;
  display: inline-block;
  text-align: center;
  font-size: 1.1em;
}

a.rating-capsule:hover {
  opacity: 0.8;
  cursor: pointer;
}

.column-number {
  width: 35px;
  color: #737373;
  flex-shrink: 0;
}

.ranking-header .column-number {
  color: white;
  font-weight: bold;
}

.column-title {
  flex: 1;
}

.movie-row .ratings {
  margin-left: auto;
  width: auto;
}

.movie-poster {
  width: 25px;
  height: 35px;
  object-fit: cover;
  border-radius: 3px;
  margin-right: 10px;
  flex-shrink: 0;
}

.movie-poster-placeholder {
  width: 25px;
  height: 35px;
  background-color: #222;
  border-radius: 3px;
  margin-right: 12px;
}

.column-poster {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.column-poster a {
  text-decoration: none;
  color: white;
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.column-poster a:hover {
  opacity: 1;
  color: #c9ad44;
  text-decoration: none;
}

.column-poster a:hover ~ .column-number,
.movie-row:hover .column-number {
  color: #c9ad44;
}

.movie-title:hover {
  color: #c9ad44;
  text-decoration: none;
}

.rating-star {
  width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin: 0 auto;
  padding: 0;
}

.rating-star img {
  width: 24px;
  height: 24px;
  margin: 0 auto;
  display: block;
  position: relative;
  left: -1px;
}

.ranking-header .column-title {
  margin-left: 42px;
  font-weight: bold;
  padding: 0;
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.loading .loading-logo {
  width: 100px;
  height: auto;
  animation: energize 2s ease-in-out infinite;
  position: relative;
}

.loading .loading-logo::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(201, 173, 68, 0.2) 0%, transparent 70%);
  animation: pulse 2s ease-in-out infinite;
}

.loading .loading-logo::after {
  content: '';
  position: absolute;
  inset: -10px;
  border: 2px solid rgba(201, 173, 68, 0);
  border-radius: 50%;
  animation: expand 2s ease-in-out infinite;
}

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

@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  h1 {
    font-size: 1.8em;
    margin-bottom: 25px;
  }

  .movie-row {
    padding: 8px 5px;
  }

  .column-number {
    width: 25px;
    font-size: 1.1em;
  }

  .movie-title {
    font-size: 1.1em;
    max-width: 300px;
  }

  .movie-poster {
    width: 32px;
    height: 45px;
  }

  .movie-poster-placeholder {
    width: 32px;
    height: 45px;
  }

  .rating-capsule {
    font-size: 1.1em;
    padding: 6px 0;
  }

  .rating-icon {
    height: 32px;
  }

  .rating-item span {
    font-size: 0.65em;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px;
  }

  h1 {
    font-size: 1.5em;
  }

  .movie-title {
    font-size: 1em;
    max-width: 200px;
  }

  .movie-poster {
    width: 28px;
    height: 40px;
  }

  .movie-poster-placeholder {
    width: 28px;
    height: 40px;
  }

  .rating-icon {
    width: 24px;
    height: 24px;
  }

  .rating-capsule {
    font-size: 1em;
  }
}

@media (max-width: 360px) {
  .movie-title {
    max-width: 150px;
    font-size: 0.85em;
  }
}

.methodology-section {
  margin-top: 30px;
  padding: 12px 20px;
  background-color: rgba(201, 173, 68, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(201, 173, 68, 0.2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: max-width 0.2s ease;
}

.methodology-section h2 {
  font-size: 1.2em;
  margin-bottom: 15px;
  color: #c9ad44;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.methodology-section h3 {
  font-size: 1.1em;
  margin: 15px 0 10px;
  color: #c9ad44;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.methodology-section p {
  font-size: 0.85em;
  line-height: 1.4;
  color: #ffffff;
  opacity: 0.9;
  margin-bottom: 10px;
  white-space: normal;
}

.methodology-section ul,
.methodology-section ol {
  margin-left: 20px;
  margin-bottom: 10px;
  padding-right: 20px;
}

.methodology-section li {
  font-size: 0.85em;
  color: #ffffff;
  opacity: 0.9;
  margin-bottom: 6px;
  line-height: 1.3;
  white-space: normal;
}

@media (max-width: 768px) {
  .methodology-section {
    padding: 12px 15px;
    margin-top: 25px;
  }

  .methodology-section h2 {
    font-size: 1.1em;
  }

  .methodology-section h3 {
    font-size: 1em;
  }

  .methodology-section p,
  .methodology-section li {
    font-size: 0.8em;
  }
}

@media (max-width: 480px) {
  .methodology-section {
    padding: 10px 12px;
    margin-top: 20px;
  }

  .methodology-section h2 {
    font-size: 1em;
  }

  .methodology-section h3 {
    font-size: 0.95em;
  }

  .methodology-section p,
  .methodology-section li {
    font-size: 0.75em;
  }
}

.creator-section {
  text-align: right;
  margin-top: 8px;
  margin: 12px 0;
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.creator-section p {
  margin: 0;
  line-height: 1.2;
}

.column-poster a {
  text-decoration: none;
  color: white;
  display: flex;
  align-items: center;
}

.column-poster a:hover {
  opacity: 1;
  color: #c9ad44;
}

.movie-title:hover {
  text-decoration: underline;
  color: #c9ad44;
}

.data-updated {
  text-align: right;
  color: #888;
  font-style: italic;
  font-size: 0.8em;
  margin: 12px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: max-width 0.2s ease;
  margin-left: auto !important;
}

.data-updated,
.methodology-section {
  display: none;
}

.data-updated.visible,
.methodology-section.visible {
  display: block;
}

@media (max-width: 768px) {
  .data-updated {
    font-size: 0.75em;
    margin: 10px 0;
  }
}

@media (max-width: 480px) {
  .data-updated {
    font-size: 0.7em;
    margin: 8px 0;
  }
}

.error-message {
  text-align: center;
  padding: 40px 20px;
  color: #888;
}

.error-message p {
  margin: 5px 0;
  font-size: 1.1em;
}

.rating-item a {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  text-decoration: none;
  height: 35px;
}

.rating-item a:hover {
  opacity: 0.8;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 30px;
  margin-bottom: 30px;
  position: relative;
  z-index: 30;
}

.site-logo {
  height: 80px;
  width: auto;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  pointer-events: none;
}

@media (max-width: 768px) {
  .site-logo {
    height: 60px;
  }
}

@media (max-width: 480px) {
  .site-header {
    flex-direction: row;
    gap: 15px;
  }

  .site-logo {
    height: 40px;
  }
}

.highlight-number {
  color: #c9ad44;
  font-weight: bold;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  background: #737373;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #888888;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #737373 rgba(255, 255, 255, 0.05);
}

.social-links {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: flex-end;
}

.reddit-link {
  position: relative;
  display: inline-block;
}

.reddit-logo {
  width: 40px;
  height: 40px;
  transition: opacity 0.3s ease;
}

.reddit-logo.hover {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

.reddit-link:hover .reddit-logo.default {
  opacity: 0;
}

.reddit-link:hover .reddit-logo.hover {
  opacity: 1;
}

.column-poster a,
.column-poster a:hover,
.column-poster a:visited,
.column-poster a:active,
.column-poster a:focus,
.movie-title,
.movie-title:hover,
.movie-title:visited,
.movie-title:active,
.movie-title:focus {
  text-decoration: none !important;
}

.column-poster a:hover .movie-title,
.movie-title:hover {
  color: #c9ad44;
}

.support-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.support-button:hover {
  opacity: 0.8;
}

.support-button img {
  height: 36px;
  width: auto;
}

.oscar-icon {
  height: 20px;
  width: auto;
  border: 1.5px solid #c9ad44;
  border-radius: 50%;
  padding: 3px;
  display: inline-block;
  position: relative;
  top: 0px;
  cursor: pointer;
  margin-left: 5px;
  margin-right: 10px;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.oscar-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 5px;
  margin-right: 10px;
}

.oscar-tooltip {
  visibility: hidden;
  position: absolute;
  background-color: #c9ad44;
  color: #040716;
  text-align: center;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.85em;
  white-space: nowrap;
  z-index: 100;
  left: 50%;
  transform: translateX(-50%);
  bottom: -30px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
}

.oscar-tooltip::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent #c9ad44 transparent;
}

.oscar-container:hover .oscar-tooltip {
  visibility: visible;
  opacity: 1;
}

@media (max-width: 768px) {
  .oscar-icon {
    height: 18px;
    padding: 2.5px;
    border-width: 1.25px;
    margin-top: 1.5px;
    margin-bottom: 1.5px;
  }
}

@media (max-width: 480px) {
  .oscar-icon {
    height: 16px;
    padding: 2px;
    border-width: 1px;
    margin-top: 1px;
    margin-bottom: 1px;
  }
}

.reddit-logo,
.kofi-button img {
  width: 40px;
  height: 40px;
  transition: opacity 0.3s ease;
}

.reddit-link:hover .reddit-logo {
  opacity: 0.8;
}

.announcement {
  display: none;
}

@media (max-width: 768px) {
  .announcement {
    display: none;
  }
}

.year-selector-container {
  position: relative;
  display: inline-block;
  cursor: pointer;
  padding-right: 25px;
  z-index: 30;
  animation: glow 2s ease-in-out;
}

@keyframes glow {
  0% {
    text-shadow: none;
  }
  50% {
    text-shadow: 0 0 15px rgba(201, 173, 68, 0.7);
  }
  100% {
    text-shadow: none;
  }
}

.selected-year {
  color: #c9ad44;
}

.year-selector-container::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 3px solid #c9ad44;
  border-bottom: 3px solid #c9ad44;
  transform: translateY(-70%) rotate(45deg);
  transition: all 0.3s ease;
  display: none;
  animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {
  0% {
    transform: translateY(-70%) rotate(45deg);
  }
  50% {
    transform: translateY(-120%) rotate(45deg);
  }
  100% {
    transform: translateY(-70%) rotate(45deg);
  }
}

.year-selector-container.has-options::after {
  display: block;
}

.year-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  background-color: rgba(4, 7, 22, 0.95);
  border: 2px solid #c9ad44;
  border-radius: 8px;
  z-index: 30;
  min-width: 120px;
  margin-top: 10px;
  padding: 8px 0;
  opacity: 0;
  box-shadow: 0 4px 20px rgba(201, 173, 68, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.year-dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #c9ad44;
}

.year-dropdown.active {
  display: block;
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.year-option {
  padding: 10px 20px;
  color: #c9ad44;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
  font-size: 0.95em;
}

.year-option:not(:last-child) {
  border-bottom: 1px solid rgba(201, 173, 68, 0.1);
}

.year-option:hover {
  background-color: rgba(201, 173, 68, 0.15);
  transform: scale(1.05);
}



.loading-state {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #040716;
  z-index: 9999;
}

.loading-logo {
  width: 150px;
  height: auto;
  animation: energize 2s ease-in-out infinite;
  position: relative;
}

@media (max-width: 768px) {
  .loading-state .loading-logo {
    width: 200px;
  }
}

@media (max-width: 480px) {
  .loading-state .loading-logo {
    width: 180px;
  }
}

.loading-logo::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(201, 173, 68, 0.2) 0%, transparent 70%);
  animation: pulse 2s ease-in-out infinite;
}

.loading-logo::after {
  content: '';
  position: absolute;
  inset: -10px;
  border: 2px solid rgba(201, 173, 68, 0);
  border-radius: 50%;
  animation: expand 2s ease-in-out infinite;
}

@keyframes energize {
  0% {
    filter: brightness(0.7) drop-shadow(0 0 5px rgba(201, 173, 68, 0.3));
    transform: scale(0.95);
  }
  50% {
    filter: brightness(1.3) drop-shadow(0 0 20px rgba(201, 173, 68, 0.8));
    transform: scale(1.05);
  }
  100% {
    filter: brightness(0.7) drop-shadow(0 0 5px rgba(201, 173, 68, 0.3));
    transform: scale(0.95);
  }
}

@keyframes pulse {
  0% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2);
  }
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
}

@keyframes expand {
  0% {
    border-color: rgba(201, 173, 68, 0);
    transform: scale(0.8);
  }
  50% {
    border-color: rgba(201, 173, 68, 0.5);
    transform: scale(1.2);
  }
  100% {
    border-color: rgba(201, 173, 68, 0);
    transform: scale(0.8);
  }
}

.main-content {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.main-content.loaded {
  opacity: 1;
}

.title-container {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
}

.oscar-tooltip-dynamic {
  position: absolute;
  z-index: 1000;
  background: rgba(4, 7, 22, 0.98);
  border: 1px solid #c9ad44;
  border-radius: 8px;
  padding: 10px 15px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(201, 173, 68, 0.3);
}

.oscar-tooltip-content {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}

.oscar-tooltip-icon {
  height: 24px;
  width: auto;
  opacity: 0.9;
  animation: floatIcon 2s ease-in-out infinite;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.oscar-tooltip-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.oscar-tooltip-text strong {
  color: #c9ad44;
  font-size: 0.9em;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.oscar-tooltip-text span {
  color: #ffffff;
  font-size: 0.8em;
  opacity: 0.9;
}

.rating-link {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  text-decoration: none;
  height: 35px;
}
