/* Import Google Font (with heavier weights) */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap'); /* Import Roboto font from Google Fonts */

:root {
  --bg-opacity: 0.05; /* Default opacity 5% */
}

/* Secondary Navigation Styles */
.secondary-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 1) !important;
}

.secondary-nav-link.active {
    color: rgba(255, 255, 255, 0.9) !important;
    border-bottom-color: white !important;
}

body:not(.dark-mode) .secondary-nav-link {
    color: rgba(0, 0, 0, 0.7);
}

body:not(.dark-mode) .secondary-nav-link:hover {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 1) !important;
}

body:not(.dark-mode) .secondary-nav-link.active {
    color: rgba(0, 0, 0, 1) !important;
    border-bottom-color: #673AB7 !important;
}

/* Make main header thinner */
.mdl-layout__header-row:first-child {
    height: 52px !important;
    min-height: 52px !important;
}

.mdl-layout__header {
    min-height: 92px !important; /* 52px main + 40px secondary */
}

/* Override MDL's default padding - use multiple selectors for maximum specificity */
.mdl-layout.mdl-layout--fixed-header > .mdl-layout__content,
.mdl-layout--fixed-header > .mdl-layout__content,
main.mdl-layout__content {
    padding-top: 92px !important; /* Match total header height */
    margin-top: 0 !important;
}

body {
  position: relative;
  background: rgb(141, 70, 255);
  font-family: Arial, sans-serif; /* Use Arial as the default font */
  font-weight: 500; /* Slightly thicker than default */
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('images/background/background1.webp') center/cover no-repeat;
  background-attachment: fixed;
  opacity: var(--bg-opacity);
  z-index: 0;
  pointer-events: none;
}

.mdl-layout {
  position: relative;
  z-index: 1;
}

/* Make MDL layout transparent to show body background */
.mdl-layout,
.mdl-layout__content {
  background: transparent !important;
}

/* Dark mode body with background image */
body.dark-mode {
  background: #1a1a1a !important;
}

body.dark-mode::before {
  background: url('images/background/background1.webp') center/cover no-repeat;
}

/* Dark mode with vivid theme background */
body.dark-mode.vivid-theme {
  background: #1a1a1a !important;
}

body.dark-mode.vivid-theme::before {
  background: url('images/background/background1.webp') center/cover no-repeat;
}

/* Dark mode with pastel theme background */
body.dark-mode.pastel-theme {
  background: #1a1a1a !important;
}

body.dark-mode.pastel-theme::before {
  background: url('images/background/background1.webp') center/cover no-repeat;
}

/* Dark mode with classy theme background */
body.dark-mode.classy-theme {
  background: #1a1a1a !important;
}

body.dark-mode.classy-theme::before {
  background: url('images/background/background1classy.webp') center/cover no-repeat;
}

/* Light mode with classy theme background */
body.classy-theme:not(.dark-mode) {
  background: rgb(141, 70, 255) !important;
}

body.classy-theme:not(.dark-mode)::before {
  background: url('images/background/background1classy.webp') center/cover no-repeat;
}

/* No background class - removes background image */
body.no-background {
  background: rgb(141, 70, 255) !important;
}

body.no-background::before {
  display: none !important;
}

body.no-background.dark-mode {
  background: #1a1a1a !important;
}

body.no-background.dark-mode.vivid-theme,
body.no-background.dark-mode.pastel-theme,
body.no-background.dark-mode.classy-theme {
  background: #1a1a1a !important;
}

body.no-background.classy-theme:not(.dark-mode) {
  background: rgb(141, 70, 255) !important;
}

/* No Serial text styling */
.no-serial-text {
  color: rgba(0, 0, 0, 0.5) !important; /* Black with opacity for light mode */
}

body.dark-mode .no-serial-text {
  color: rgba(255, 255, 255, 0.35) !important; /* White with opacity for dark mode */
}

#auction-container {
  display: flex; /* Use flexbox for layout */
  flex-wrap: wrap; /* Allows cards to wrap properly */
  justify-content: center; /* Centers cards nicely */
  gap: 15px; /* Adds spacing between cards */
  padding: 0 20px 20px 20px; /* Top: 0px, Sides: 20px, Bottom: 20px */
}

.mdl-card {
  flex: 1 1 300px; /* Makes cards responsive */
  max-width: 400px; /* Prevents overly wide cards */
  min-width: 250px; /* Ensures cards don't shrink too much */
  background-color: rgba(255, 255, 255, 0.15); /* Slight transparency */
  border-radius: 10px; /* Smooth card edges */
  padding: 15px; /* More spacing */
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); /* Soft shadow effect */
  overflow: visible; /* Allow arrow indicator to extend beyond card */
}

.mdl-card__title {
  background: linear-gradient(rgba(53, 50, 206, 1), rgba(53, 50, 206, 1)); /* Gradient background for card title */
  color: rgb(0, 0, 0); /* White text color */
  text-align: center; /* Center the title text */
  padding: 10px; /* Adds internal spacing */
  overflow: visible; /* Allow arrow indicator to extend beyond title area */
}

.mdl-card__title-text {
  white-space: pre-line; /* Ensures text inside cards respects line breaks */
  padding: 10px; /* Adds space inside the card */
  line-height: 1.6; /* Improves readability */
  font-size: 1.1rem; /* Slightly larger text */
  text-align: left; /* Aligns content for better readability */
  font-family: Arial, sans-serif; /* Use Arial font */
  font-weight: 500; /* Make the text thicker */
}

/* Make only the auction title bold */
.mdl-card__title-text p:first-of-type {
  font-weight: 700; /* Bolder weight for titles */
}

/* Center the header text */
.mdl-layout-title {
  width: 100%; /* Ensures full-width centering */
  text-align: center; /* Centers text properly */
  display: block; /* Make the title a block element */
  font-family: 'Roboto', sans-serif; /* Apply Roboto font */
  font-weight: 700; /* Make header text thicker */
}

#action-buttons button {
  margin: 0 10px 10px 10px; /* Add horizontal and bottom spacing between buttons */
}

/* Title dropdown button styling */
#title-dropdown-button {
  background: transparent !important;
  box-shadow: none !important;
  letter-spacing: 0.0125em;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

#title-dropdown-button:hover {
  opacity: 0.85;
  background: rgba(255, 255, 255, 0.1) !important;
}

#title-dropdown-button:active,
#title-dropdown-button:focus {
  background: rgba(255, 255, 255, 0.15) !important;
}

/* Title dropdown menu styling */
#title-dropdown-button ~ ul.mdl-menu {
  min-width: 200px;
}

#title-dropdown-button ~ ul.mdl-menu .mdl-menu__item {
  display: flex;
  align-items: center;
  font-size: 14px;
  padding: 12px 16px;
  transition: background-color 0.2s ease;
}

#title-dropdown-button ~ ul.mdl-menu .mdl-menu__item:hover {
  background-color: rgba(141, 70, 255, 0.1);
}

/* About page centered layout */
.page-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 32px 16px;
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 1200px;
  width: 100%;
}

.about-card {
  margin: 0;
  width: 100%;
}

@media (min-width: 700px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tour highlight animation */
.tour-highlight {
  animation: tour-pulse 2s infinite;
  box-shadow: 0 0 0 0 rgba(141, 70, 255, 0.7), 0 0 30px 10px rgba(255, 255, 255, 0.8) !important;
  border: 3px solid #fff !important;
  border-radius: 8px !important;
  filter: none !important;
}

@keyframes tour-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(141, 70, 255, 0.7), 0 0 30px 10px rgba(255, 255, 255, 0.8);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(141, 70, 255, 0), 0 0 40px 15px rgba(255, 255, 255, 0.6);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(141, 70, 255, 0), 0 0 30px 10px rgba(255, 255, 255, 0.8);
  }
}

/* Make tour overlay visible but don't blur */
#tour-overlay {
  backdrop-filter: none;
}

/* Ensure tour card is always visible */
#tour-card {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
  filter: none !important;
}

/* Theme-compatible tour styling */
/* Dark mode tour card */
body.dark-mode #tour-card {
  background: #2d2d35 !important;
  color: #e0e0e0 !important;
}

body.dark-mode #tour-card .mdl-card__title {
  background: #8d46ff !important;
  color: #fff !important;
}

body.dark-mode #tour-card .mdl-card__supporting-text {
  color: #e0e0e0 !important;
}

body.dark-mode #tour-card .mdl-button {
  color: #e0e0e0 !important;
}

body.dark-mode #tour-card .mdl-button--colored {
  background: #8d46ff !important;
  color: #fff !important;
}

/* Classy theme tour card */
body.classy-theme #tour-card {
  background: #f5f5dc !important;
  color: #8b7355 !important;
}

body.classy-theme #tour-card .mdl-card__title {
  background: #b8860b !important;
  color: #fff !important;
}

body.classy-theme #tour-card .mdl-card__supporting-text {
  color: #8b7355 !important;
}

body.classy-theme #tour-card .mdl-button {
  color: #8b7355 !important;
}

body.classy-theme #tour-card .mdl-button--colored {
  background: #b8860b !important;
  color: #fff !important;
}

/* Sponsors Bar Styling */
.sponsors-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 0;
  margin-top: -10px;
  display: flex;
  justify-content: center;
}

.sponsors-track {
  display: flex;
  gap: 40px;
  width: fit-content;
}

.sponsors-track:hover {
  animation-play-state: paused;
}

.sponsor-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease;
  max-height: 100%;
}

.sponsor-item img {
  max-width: 200px;
  max-height: 150px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.sponsor-item:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

@keyframes scroll-sponsors {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Loading skeleton card styles */
.skeleton-card {
  flex: 1 1 300px; /* Match real card sizing */
  max-width: 400px;
  min-width: 250px;
  min-height: 280px;
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 10px; /* Match real card border-radius */
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); /* Match real card shadow */
  padding: 15px;
}

body.dark-mode .skeleton-card {
  background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Pulse animation for arrow indicator */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 0.7;
    transform: translateX(-50%) scale(1.05);
  }
}

/* Responsive sizing for sponsors */
@media (max-width: 768px) {
  .sponsors-track {
    gap: 30px;
  }
}

/* Header logo styling */
#title-dropdown-button img {
  height: 48px;
  transition: opacity 0.2s ease;
}

/* Responsive header logo */
@media (max-width: 768px) {
  #title-dropdown-button {
    font-size: 1.5rem !important;
  }
  
  #title-dropdown-button img {
    height: 36px;
  }
}

@media (max-width: 480px) {
  #title-dropdown-button {
    font-size: 1.25rem !important;
    gap: 8px !important;
  }
  
  #title-dropdown-button img {
    height: 30px;
  }
}

/* Request sponsor link styling */
#request-sponsor-link:hover {
  color: rgba(255, 255, 255, 1);
  text-decoration: underline;
}

/* Dialog description styling for theme compatibility */
.dialog-description {
  color: rgba(0, 0, 0, 0.7);
}

/* Dark mode dialog descriptions */
body.dark-mode .dialog-description {
  color: rgba(255, 255, 255, 0.85);
}

/* Classy theme dialog descriptions */
body.classy-theme .dialog-description {
  color: rgba(139, 115, 85, 0.9);
}

/* ========================================
   MDL TEXTFIELD LABEL/PLACEHOLDER STYLING
   ======================================== */

/* Make MDL textfield label more visible in all themes */
.mdl-textfield__label {
  color: rgba(255, 255, 255, 0.7) !important;
  font-weight: 500 !important;
}

/* Dark mode textfield label */
body.dark-mode .mdl-textfield__label {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Light mode textfield label */
body:not(.dark-mode) .mdl-textfield__label {
  color: rgba(0, 0, 0, 0.6) !important;
}

/* Classy theme textfield label */
body.classy-theme .mdl-textfield__label {
  color: rgba(139, 115, 85, 0.8) !important;
}

body.dark-mode.classy-theme .mdl-textfield__label {
  color: rgba(212, 175, 55, 0.8) !important;
}

/* Label when focused */
.mdl-textfield.is-focused .mdl-textfield__label {
  color: rgb(141, 70, 255) !important;
}

body.dark-mode .mdl-textfield.is-focused .mdl-textfield__label {
  color: rgb(179, 136, 255) !important;
}

/* Input text color */
.mdl-textfield__input {
  color: rgba(255, 255, 255, 0.95) !important;
}

body:not(.dark-mode) .mdl-textfield__input {
  color: rgba(0, 0, 0, 0.87) !important;
}

/* Disabled state */
.mdl-textfield.is-disabled .mdl-textfield__label,
.mdl-textfield__input:disabled {
  color: rgba(255, 255, 255, 0.4) !important;
}

body:not(.dark-mode) .mdl-textfield.is-disabled .mdl-textfield__label,
body:not(.dark-mode) .mdl-textfield__input:disabled {
  color: rgba(0, 0, 0, 0.3) !important;
}

/* Placeholder text styling for disabled input */
.mdl-textfield__input:disabled::placeholder {
  color: rgba(255, 152, 0, 0.9) !important;
  opacity: 1 !important;
  font-weight: 500 !important;
}

body:not(.dark-mode) .mdl-textfield__input:disabled::placeholder {
  color: rgba(245, 124, 0, 0.9) !important;
}

/* ========================================
   USER HOVER TOOLTIP STYLING
   ======================================== */

/* Username link hover effect (matches serial number hover) */
.roblox-username-link {
  cursor: pointer;
  transition: opacity 0.15s ease-in-out;
}

.roblox-username-link:hover {
  opacity: 0.8;
}

/* Tooltip container */
.user-tooltip {
  position: fixed;
  display: none;
  background: rgba(30, 30, 40, 0.98);
  border: 2px solid rgba(141, 70, 255, 0.8);
  border-radius: 12px;
  padding: 16px;
  min-width: 280px;
  max-width: 320px;
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
}

/* Light mode tooltip */
body:not(.dark-mode) .user-tooltip {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(141, 70, 255, 0.6);
  color: rgba(0, 0, 0, 0.87);
}

/* Tooltip loading state */
.user-tooltip.loading {
  text-align: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.7);
}

body:not(.dark-mode) .user-tooltip.loading {
  color: rgba(0, 0, 0, 0.6);
}

/* Tooltip header with avatar */
.user-tooltip-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(141, 70, 255, 0.3);
}

.user-tooltip-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(141, 70, 255, 0.6);
  object-fit: cover;
}

.user-tooltip-names {
  flex: 1;
  overflow: hidden;
}

.user-tooltip-display-name {
  font-size: 16px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.dark-mode) .user-tooltip-display-name {
  color: rgba(0, 0, 0, 0.87);
}

.user-tooltip-username {
  font-size: 13px;
  color: rgba(141, 70, 255, 0.9);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Tooltip body */
.user-tooltip-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-tooltip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

body:not(.dark-mode) .user-tooltip-row {
  color: rgba(0, 0, 0, 0.7);
}

.user-tooltip-row i {
  font-size: 18px;
  color: rgba(141, 70, 255, 0.8);
}

.user-tooltip-row strong {
  color: rgba(255, 255, 255, 0.95);
}

body:not(.dark-mode) .user-tooltip-row strong {
  color: rgba(0, 0, 0, 0.87);
}

/* Online status indicator */
.user-tooltip-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.user-tooltip-status.online {
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
}

.user-tooltip-status.offline {
  background: rgba(149, 165, 166, 0.2);
  color: #95a5a6;
}

.user-tooltip-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* Description text */
.user-tooltip-description {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(141, 70, 255, 0.2);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  line-height: 1.4;
  max-height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

body:not(.dark-mode) .user-tooltip-description {
  color: rgba(0, 0, 0, 0.6);
}

/* Error state */
.user-tooltip-error {
  text-align: center;
  color: rgba(231, 76, 60, 0.9);
  font-size: 13px;
}

/* Loading spinner */
.user-tooltip-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(141, 70, 255, 0.3);
  border-top-color: rgb(141, 70, 255);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Time tooltip styling */
.time-tooltip {
  position: fixed;
  display: none;
  background: rgba(30, 30, 40, 0.98);
  border: 2px solid rgba(141, 70, 255, 0.8);
  border-radius: 8px;
  padding: 8px 12px;
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
  white-space: nowrap;
  font-family: 'Product Sans', 'Google Sans', sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
}

/* Light mode time tooltip */
body:not(.dark-mode) .time-tooltip {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(141, 70, 255, 0.6);
  color: rgba(0, 0, 0, 0.87);
}

/* Classy theme time tooltip */
body.classy-theme .time-tooltip {
  border-color: rgba(255, 215, 0, 0.8);
}

body.dark-mode.classy-theme .time-tooltip {
  background: rgba(20, 20, 28, 0.98);
  border-color: rgba(255, 215, 0, 0.6);
  color: rgba(255, 215, 0, 0.9);
}
