/* BIG STYLE CSS - All styles combined from index2.php */

/* ==================================================
   GOLD EAGLE GLOW EFFECTS AND MODAL STYLING
   ================================================== */

/* Gold Eagle Glow Effect */
.gold-eagle-glow {
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.7));
    animation: gold-glow var(--glow-duration, 2s) infinite alternate;
    transition: filter 0.3s ease;
}

/* Glow disabled state */
.gold-eagle-glow.glow-disabled {
    filter: none !important;
    animation: none !important;
}

@keyframes gold-glow {
    0% {
        filter: drop-shadow(0 0 var(--min-glow-size, 5px) rgba(255, 215, 0, var(--min-glow-opacity, 0.6)));
    }
    100% {
        filter: drop-shadow(0 0 var(--max-glow-size, 15px) rgba(255, 215, 0, var(--max-glow-opacity, 0.9)));
    }
}

/* Default custom properties for the glow effect */
:root {
    --glow-duration: 2s;
    --min-glow-size: 5px;
    --max-glow-size: 15px;
    --min-glow-opacity: 0.6;
    --max-glow-opacity: 0.9;
}

/* Gold Eagle Modal Outer Glow Effect */
#goldEagleModal .modal-content {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6),
        0 0 40px rgba(255, 215, 0, 0.4),
        0 0 60px rgba(255, 215, 0, 0.2);
    animation: gold-modal-glow 3s ease-in-out infinite alternate;
}

/* Gold Maple Modal Outer Glow Effect */
#goldMapleModal .modal-content {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6),
        0 0 40px rgba(255, 215, 0, 0.4),
        0 0 60px rgba(255, 215, 0, 0.2);
    animation: gold-modal-glow 3s ease-in-out infinite alternate;
}

/* Gold Krug Modal Outer Glow Effect */
#goldKrugModal .modal-content {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6),
        0 0 40px rgba(255, 215, 0, 0.4),
        0 0 60px rgba(255, 215, 0, 0.2);
    animation: gold-modal-glow 3s ease-in-out infinite alternate;
}

@keyframes gold-modal-glow {
    0% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.6),
            0 0 40px rgba(255, 215, 0, 0.4),
            0 0 60px rgba(255, 215, 0, 0.2);
    }
    100% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8),
            0 0 60px rgba(255, 215, 0, 0.6),
            0 0 90px rgba(255, 215, 0, 0.4);
    }
}

/* Silver Eagle Modal Outer Glow Effect */
#silverEagleModal .modal-content {
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.6),
        0 0 40px rgba(192, 192, 192, 0.4),
        0 0 60px rgba(192, 192, 192, 0.2);
    animation: silver-modal-glow 3s ease-in-out infinite alternate;
}

/* Silver Rounds Modal Outer Glow Effect */
#silverRoundsModal .modal-content {
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.6),
        0 0 40px rgba(192, 192, 192, 0.4),
        0 0 60px rgba(192, 192, 192, 0.2);
    animation: silver-modal-glow 3s ease-in-out infinite alternate;
}

/* Silver 90% Modal Outer Glow Effect */
#silver90Modal .modal-content {
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.6),
        0 0 40px rgba(192, 192, 192, 0.4),
        0 0 60px rgba(192, 192, 192, 0.2);
    animation: silver-modal-glow 3s ease-in-out infinite alternate;
}

@keyframes silver-modal-glow {
    0% {
        box-shadow: 0 0 20px rgba(192, 192, 192, 0.6),
            0 0 40px rgba(192, 192, 192, 0.4),
            0 0 60px rgba(192, 192, 192, 0.2);
    }
    100% {
        box-shadow: 0 0 30px rgba(192, 192, 192, 0.8),
            0 0 60px rgba(192, 192, 192, 0.6),
            0 0 90px rgba(192, 192, 192, 0.4);
    }
}

/* ==================================================
   HOVER EFFECTS FOR LIVETITLE IMAGE
   ================================================== */

/* Hover effect for livetitle image */
#livetitle:hover {
    transform: scale(1.05);
    transition: transform 0.5s ease-in-out;
}

/* ==================================================
   COIN TABLE FIXES AND IMPROVEMENTS
   ================================================== */

/* Force all table cells to be properly styled */
#coin_table .table th,
#coin_table .table td {
    background-color: #000 !important;
    border-color: #333 !important;
    vertical-align: middle;
    padding: 12px 6px;
}

/* Remove the default responsiveness that's breaking the layout */
#coin_table .table {
    width: 100%;
    margin-bottom: 1rem;
    color: #fff;
    border-collapse: collapse;
}

/* ==================================================
   TOPBAR STYLES AND PRICE DISPLAY
   ================================================== */

#topbar {
  background-color: #000 !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

/* Center the main container and content */
#topbar .container {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

#topbar .row {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  -webkit-box-pack: center !important;
  -ms-flex-pack: center !important;
  justify-content: center !important; /* Center the row content */
}

/* Center the prices container */
#metals_gold_silver1 {
  -webkit-box-pack: center !important;
  -ms-flex-pack: center !important;
  justify-content: center !important; /* Center the flex content */
  -webkit-box-align: center !important;
  -ms-flex-align: center !important;
  align-items: center !important;
}

#prices1 {
  -webkit-box-pack: center !important;
  -ms-flex-pack: center !important;
  justify-content: center !important; /* Center the tables */
  -webkit-box-align: center !important;
  -ms-flex-align: center !important;
  align-items: center !important;
  text-align: center !important; /* Center everything inside */
  width: 100% !important;
}

#topbar .table {
  table-layout: fixed !important;
  width: 100% !important;
  max-width: 600px !important; /* Limit table width for better centering */
  margin: 0 auto !important; /* Center the tables */
  background-color: transparent !important;
}

#topbar .table td,
#topbar .table th {
  width: 25% !important; /* Equal width for all 4 columns */
  text-align: center !important; /* Center all content by default */
  white-space: nowrap;
  padding: 4px 8px !important;
  vertical-align: middle !important;
  background-color: transparent !important;
}

#topbar .table tr {
  width: 100%;
  background-color: transparent !important;
}

/* Metal names (first column) left-aligned on ALL screen sizes */
#topbar .table td:first-child,
#topbar .table th:first-child {
  text-align: left !important;
  background-color: transparent !important;
}

/* RIGHT ALIGN THE LAST TWO COLUMNS (columns 3 and 4) - STRENGTHENED */
#topbar .table td:nth-child(3),
#topbar .table td:nth-child(4),
#topbar .table th:nth-child(3),
#topbar .table th:nth-child(4) {
  text-align: right !important;
  -webkit-box-pack: end !important;
  -ms-flex-pack: end !important;
  justify-content: flex-end !important;
}

/* Force all table elements to be transparent/black */
#topbar .table,
#topbar .table tbody,
#topbar .table thead,
#topbar .table tr,
#topbar .table td,
#topbar .table th {
  background-color: transparent !important;
  background: transparent !important;
}

/* Override any Bootstrap table styling */
#topbar .table-dark {
  background-color: transparent !important;
}

#topbar .table-dark td,
#topbar .table-dark th {
  background-color: transparent !important;
  border-color: transparent !important;
}

/* Reduce spacing in headings within topbar */
#topbar h2,
#topbar h4 {
  margin-bottom: 0 !important;
  margin-top: 0 !important;
  line-height: 1.2 !important;
}

/* ALIGNMENT FIX: Ensure all content in metals_gold_silver1 section is aligned properly */
#metals_gold_silver1 .table td,
#metals_gold_silver1 .table th {
  vertical-align: middle !important;
  padding-top: 3px !important;
  padding-bottom: 3px !important;
}

/* Align h4 headings specifically in the metals section */
#metals_gold_silver1 h4 {
  margin: 0 !important;
  line-height: 1.1 !important;
  vertical-align: middle !important;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center !important;
  -ms-flex-align: center !important;
  align-items: center !important;
  -webkit-box-pack: center !important;
  -ms-flex-pack: center !important;
  justify-content: center !important; /* Center content by default */
  height: 100% !important;
  text-align: center !important;
  width: 100% !important;
}

/* LEFT-align h4 in first column on ALL screen sizes */
#metals_gold_silver1 .table td:first-child h4 {
  -webkit-box-pack: start !important;
  -ms-flex-pack: start !important;
  justify-content: flex-start !important;
  text-align: left !important;
}

/* STRENGTHENED: RIGHT ALIGN h4 headings in the last two columns */
#metals_gold_silver1 .table td:nth-child(3) h4,
#metals_gold_silver1 .table td:nth-child(4) h4 {
  -webkit-box-pack: end !important;
  -ms-flex-pack: end !important;
  justify-content: flex-end !important;
  text-align: right !important;
  margin-left: auto !important;
  margin-right: 0 !important;
}

/* Make sure all table cells have consistent height and alignment */
#metals_gold_silver1 .table tr {
  height: 40px !important;
}

#metals_gold_silver1 .table td {
  height: 40px !important;
  vertical-align: middle !important;
  display: table-cell !important;
  -webkit-box-align: center !important;
  -ms-flex-align: center !important;
  align-items: center !important;
}

/* Space between the two tables */
#metals_gold_silver1 .table + .table {
  margin-top: -8px !important;
}

/* Center align columns for better visual balance - UPDATE: only first two columns now */
#metals_gold_silver1 .table td:nth-child(2) {
  text-align: center !important;
}

/* Fix the text-end class that was forcing right alignment */
#topbar .table .text-end {
  text-align: center !important;
}

/* ==================================================
   MOBILE RESPONSIVE STYLES
   ================================================== */

@media (max-width: 575px) {
  #topbar {
    background-color: #000 !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
  }

  /* Ensure full centering on mobile */
  #topbar .container {
    text-align: center !important;
  }

  #topbar .row {
    -webkit-box-orient: vertical !important;
    -webkit-box-direction: normal !important;
    -ms-flex-direction: column !important;
    flex-direction: column !important;
    gap: 0 !important;
    -webkit-box-pack: center !important;
    -ms-flex-pack: center !important;
    justify-content: center !important;
    -webkit-box-align: center !important;
    -ms-flex-align: center !important;
    align-items: center !important;
  }

  #metals_gold_silver1 {
    -webkit-box-pack: center !important;
    -ms-flex-pack: center !important;
    justify-content: center !important;
    -webkit-box-align: center !important;
    -ms-flex-align: center !important;
    align-items: center !important;
    width: 100% !important;
  }

  #prices1 {
    -webkit-box-pack: center !important;
    -ms-flex-pack: center !important;
    justify-content: center !important;
    -webkit-box-align: center !important;
    -ms-flex-align: center !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  #topbar .table {
    max-width: 100% !important;
    margin: 0 auto !important;
  }

  #topbar .table td,
  #topbar .table th {
    width: 25% !important;
    padding: 2px !important;
    background-color: transparent !important;
  }

  /* Override any conflicting classes on mobile */
  #topbar .table .text-end {
    text-align: center !important;
  }

  /* MOBILE: Base h4 content styling */
  #metals_gold_silver1 h4 {
    -webkit-box-pack: center !important;
    -ms-flex-pack: center !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: 1.2rem !important;
    line-height: 1 !important;
    width: 100% !important;
  }

  /* Force mobile table backgrounds */
  #topbar .table,
  #topbar .table tbody,
  #topbar .table thead,
  #topbar .table tr,
  #topbar .table td,
  #topbar .table th {
    background-color: transparent !important;
    background: transparent !important;
  }

  /* Mobile alignment fixes */
  #metals_gold_silver1 .table tr {
    height: 35px !important;
  }

  #metals_gold_silver1 .table td {
    height: 35px !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
  }

  /* Balanced closeness on mobile */
  #metals_gold_silver1 .table + .table {
    margin-top: -10px !important;
  }

  /* MOBILE: COLUMN ALIGNMENT - First column LEFT, Second CENTER, Last two RIGHT */
  #metals_gold_silver1 .table td:nth-child(1) {
    text-align: left !important;
    padding-left: 4px !important;
    padding-right: 2px !important;
  }

  #metals_gold_silver1 .table td:nth-child(2) {
    text-align: center !important;
    padding-left: 2px !important;
    padding-right: 6px !important;
  }

  #metals_gold_silver1 .table td:nth-child(3),
  #metals_gold_silver1 .table td:nth-child(4) {
    text-align: right !important;
    padding-right: 4px !important;
    margin-left: auto !important;
  }

  /* MOBILE: H4 ALIGNMENT - First column LEFT, Second CENTER, Last two RIGHT */
  #metals_gold_silver1 .table td:nth-child(1) h4 {
    -webkit-box-pack: start !important;
    -ms-flex-pack: start !important;
    justify-content: flex-start !important;
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    width: 100% !important;
    padding-left: 0 !important;
  }

  #metals_gold_silver1 .table td:nth-child(2) h4 {
    -webkit-box-pack: center !important;
    -ms-flex-pack: center !important;
    justify-content: center !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
  }

  #metals_gold_silver1 .table td:nth-child(3) h4,
  #metals_gold_silver1 .table td:nth-child(4) h4 {
    -webkit-box-pack: end !important;
    -ms-flex-pack: end !important;
    justify-content: flex-end !important;
    text-align: right !important;
    margin-left: auto !important;
    margin-right: 0 !important;
    width: 100% !important;
    padding-right: 2px !important;
  }

  /* Additional mobile spacing to prevent overlap */
  #metals_gold_silver1 .table td:nth-child(3) {
    padding-left: 6px !important;
    padding-right: 4px !important;
  }

  #metals_gold_silver1 .table td:nth-child(4) {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }
}

/* Extra small devices - even more compact with enhanced spacing */
@media (max-width: 480px) {
  #metals_gold_silver1 h4 {
    font-size: 1.1rem !important;
  }

  #topbar .table td,
  #topbar .table th {
    padding: 1px !important;
  }

  /* Extra protection against overlap on very small screens */
  #metals_gold_silver1 .table td:nth-child(1) {
    padding-left: 4px !important;
    padding-right: 1px !important;
  }

  #metals_gold_silver1 .table td:nth-child(2) {
    padding-left: 1px !important;
    padding-right: 8px !important;
  }

  #metals_gold_silver1 .table td:nth-child(3) {
    padding-left: 8px !important;
    padding-right: 6px !important;
  }

  #metals_gold_silver1 .table td:nth-child(4) {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
}

/* ==================================================
   BANNER TOGGLE ANIMATIONS
   ================================================== */

/* Banner toggle fade animation - FADE ONLY */
.banner-toggle-visible {
  opacity: 1;
  -webkit-transition: opacity 0.8s ease-in-out;
  transition: opacity 0.8s ease-in-out;
}

.banner-toggle-hidden {
  opacity: 0;
  -webkit-transition: opacity 0.8s ease-in-out;
  transition: opacity 0.8s ease-in-out;
}

/* ==================================================
   COIN TABLE HOVER EFFECTS
   ================================================== */

/* Coin table hover effects - EXCLUDE FIRST ROW (header) */
#coin_table .table tbody tr:not(:first-child):hover {
  background-color: rgba(255, 215, 0, 0.1) !important;
  -webkit-transform: scale(1.02);
  transform: scale(1.02);
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  -webkit-box-shadow: 0 4px 8px rgba(255, 215, 0, 0.2);
  box-shadow: 0 4px 8px rgba(255, 215, 0, 0.2);
}

#coin_table .table tbody tr:not(:first-child):hover td {
  background-color: rgba(255, 215, 0, 0.1) !important;
}

#coin_table .table tbody tr:not(:first-child):hover h2 {
  color: #ffd700 !important;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

#coin_table .table tbody tr:not(:first-child):hover .coin-clickable {
  -webkit-transform: scale(1.15);
  transform: scale(1.15);
  -webkit-filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

/* Others table (metals table) hover effects */
#others .table tbody tr:hover {
  background-color: rgba(108, 117, 125, 0.2) !important;
  -webkit-transform: translateX(5px);
  transform: translateX(5px);
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  -webkit-box-shadow: 0 2px 6px rgba(108, 117, 125, 0.3);
  box-shadow: 0 2px 6px rgba(108, 117, 125, 0.3);
}

#others .table tbody tr:hover td,
#others .table tbody tr:hover th {
  background-color: rgba(108, 117, 125, 0.2) !important;
}

#others .table tbody tr:hover th {
  color: #ffffff !important;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
}

/* ==================================================
   REFRESH DOTS PROGRESS INDICATOR STYLES
   ================================================== */

.refresh-dots {
  gap: 4px;
}

.refresh-dot {
  width: 12px;
  height: 12px;
  background-color: rgba(108, 117, 125, 0.3);
  border: 1px solid rgba(108, 117, 125, 0.5);
  border-radius: 2px;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

/* Active dot - steady green (market open) */
.refresh-dot.active {
  background-color: #28a745;
  border-color: #28a745;
  -webkit-box-shadow: 0 0 4px rgba(40, 167, 69, 0.5);
  box-shadow: 0 0 4px rgba(40, 167, 69, 0.5);
}

/* Pulsing dot - currently activating (market open) */
.refresh-dot.pulsing {
  background-color: #28a745;
  border-color: #28a745;
  -webkit-animation: dot-pulse 1.5s ease-in-out infinite;
  animation: dot-pulse 1.5s ease-in-out infinite;
  -webkit-box-shadow: 0 0 8px rgba(40, 167, 69, 0.7);
  box-shadow: 0 0 8px rgba(40, 167, 69, 0.7);
}

/* GOLD REFRESH DOT - Final indicator (5th dot) */
.refresh-dot.gold-refresh {
  background-color: #ffd700 !important;
  border-color: #ffc107 !important;
  -webkit-box-shadow: 0 0 6px rgba(255, 215, 0, 0.6) !important;
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.6) !important;
  -webkit-animation: none !important;
  animation: none !important; /* No pulsing animation */
}

/* Override any other classes when gold-refresh is applied */
.refresh-dot.gold-refresh.active,
.refresh-dot.gold-refresh.pulsing {
  background-color: #ffd700 !important;
  border-color: #ffc107 !important;
  -webkit-box-shadow: 0 0 6px rgba(255, 215, 0, 0.6) !important;
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.6) !important;
  -webkit-animation: none !important;
  animation: none !important; /* Ensure no pulsing */
}

@-webkit-keyframes dot-pulse {
  0% {
    opacity: 0.6;
    -webkit-transform: scale(1);
    transform: scale(1);
  }
  50% {
    opacity: 1;
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
  }
  100% {
    opacity: 0.6;
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}

@keyframes dot-pulse {
  0% {
    opacity: 0.6;
    -webkit-transform: scale(1);
    transform: scale(1);
  }
  50% {
    opacity: 1;
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
  }
  100% {
    opacity: 0.6;
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}

/* Inactive/future dots (market open) */
.refresh-dot:not(.active):not(.pulsing):not(.market-closed):not(.gold-refresh) {
  background-color: rgba(108, 117, 125, 0.2);
  border-color: rgba(108, 117, 125, 0.4);
}

/* Market closed dots - red/inactive state */
.refresh-dot.market-closed {
  background-color: rgba(220, 53, 69, 0.3);
  border-color: rgba(220, 53, 69, 0.5);
  -webkit-animation: none !important;
  animation: none !important; /* Stop any pulsing animation */
  -webkit-box-shadow: none !important;
  box-shadow: none !important; /* Remove any glow effects */
}

/* Make dots more subtle on mobile */
@media (max-width: 768px) {
  .refresh-dot {
    width: 10px;
    height: 10px;
  }

  .refresh-dots {
    gap: 3px;
  }
}

/* ==================================================
   SILVER EAGLE GLOW EFFECT
   ================================================== */

/* SILVER EAGLE GLOW EFFECT - Similar to gold but with silver colors */
.silver-eagle-glow {
  -webkit-filter: drop-shadow(0 0 10px rgba(192, 192, 192, 0.7));
  filter: drop-shadow(0 0 10px rgba(192, 192, 192, 0.7));
  -webkit-animation: silver-glow var(--silver-glow-duration, 2s) infinite
    alternate;
  animation: silver-glow var(--silver-glow-duration, 2s) infinite alternate;
  -webkit-transition: -webkit-filter 0.3s ease;
  transition: -webkit-filter 0.3s ease;
  transition: filter 0.3s ease;
  transition:
    filter 0.3s ease,
    -webkit-filter 0.3s ease;
}

/* Silver glow disabled state */
.silver-eagle-glow.glow-disabled {
  -webkit-filter: none !important;
  filter: none !important;
  -webkit-animation: none !important;
  animation: none !important;
}

@-webkit-keyframes silver-glow {
  0% {
    -webkit-filter: drop-shadow(
      0 0 var(--silver-min-glow-size, 5px)
        rgba(192, 192, 192, var(--silver-min-glow-opacity, 0.6))
    );
    filter: drop-shadow(
      0 0 var(--silver-min-glow-size, 5px)
        rgba(192, 192, 192, var(--silver-min-glow-opacity, 0.6))
    );
  }

  100% {
    -webkit-filter: drop-shadow(
      0 0 var(--silver-max-glow-size, 15px)
        rgba(192, 192, 192, var(--silver-max-glow-opacity, 0.9))
    );
    filter: drop-shadow(
      0 0 var(--silver-max-glow-size, 15px)
        rgba(192, 192, 192, var(--silver-max-glow-opacity, 0.9))
    );
  }
}

@keyframes silver-glow {
  0% {
    -webkit-filter: drop-shadow(
      0 0 var(--silver-min-glow-size, 5px)
        rgba(192, 192, 192, var(--silver-min-glow-opacity, 0.6))
    );
    filter: drop-shadow(
      0 0 var(--silver-min-glow-size, 5px)
        rgba(192, 192, 192, var(--silver-min-glow-opacity, 0.6))
    );
  }

  100% {
    -webkit-filter: drop-shadow(
      0 0 var(--silver-max-glow-size, 15px)
        rgba(192, 192, 192, var(--silver-max-glow-opacity, 0.9))
    );
    filter: drop-shadow(
      0 0 var(--silver-max-glow-size, 15px)
        rgba(192, 192, 192, var(--silver-max-glow-opacity, 0.9))
    );
  }
}

/* Default custom properties for the silver glow effect */
:root {
  --silver-glow-duration: 2s;
  --silver-min-glow-size: 5px;
  --silver-max-glow-size: 15px;
  --silver-min-glow-opacity: 0.6;
  --silver-max-glow-opacity: 0.9;
}

/* ==================================================
   LOGIN FORM STYLES
   ================================================== */

/* LOGIN FORM STYLES - Off-white input fields for better visibility */
.login-card .form-control {
  background-color: #f8f9fa !important; /* Off-white background */
  border: 1px solid #dee2e6 !important;
  color: #495057 !important; /* Dark text for contrast */
}

.login-card .form-control:focus {
  background-color: #ffffff !important; /* Pure white when focused */
  border-color: #667eea !important;
  -webkit-box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
  color: #495057 !important; /* Maintain dark text */
}

.login-card .form-control::-webkit-input-placeholder {
  color: #6c757d !important; /* Gray placeholder text */
  opacity: 0.7;
}

.login-card .form-control::-moz-placeholder {
  color: #6c757d !important; /* Gray placeholder text */
  opacity: 0.7;
}

.login-card .form-control:-ms-input-placeholder {
  color: #6c757d !important; /* Gray placeholder text */
  opacity: 0.7;
}

.login-card .form-control::-ms-input-placeholder {
  color: #6c757d !important; /* Gray placeholder text */
  opacity: 0.7;
}

.login-card .form-control::placeholder {
  color: #6c757d !important; /* Gray placeholder text */
  opacity: 0.7;
}

/* Input group button styling */
.login-card .input-group .btn-outline-secondary {
  background-color: #f8f9fa !important;
  border-color: #dee2e6 !important;
  color: #6c757d !important;
}

.login-card .input-group .btn-outline-secondary:hover {
  background-color: #e9ecef !important;
  border-color: #adb5bd !important;
  color: #495057 !important;
}

/* ==================================================
   SPOT PRICE HERO SECTION - LARGE FORMAT DISPLAY
   ================================================== */

#spotmetalprice {
  padding: 50px 0; /* Increased top padding to provide space for card hover animation */
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
  position: relative;
  overflow: hidden;
}

/* Background pattern for subtle texture */
#spotmetalprice::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 25% 25%,
      rgba(255, 215, 0, 0.03) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 75% 75%,
      rgba(192, 192, 192, 0.03) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.spot-price-hero {
  position: relative;
  z-index: 1;
  /* Add top padding to provide space for card hover animation */
  padding-top: 10px;
}

/* Card container columns - Add extra top padding to prevent border clipping */
#gold_card_column,
#silver_card_column {
  padding-top: 15px !important; /* Additional space for hover animation */
}

/* Price Cards */
.price-card {
  background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
  border-radius: 20px;
  padding: 30px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  -webkit-box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  max-width: 500px;
}

.price-card:hover {
  /* Reduced upward movement from -5px to -3px to prevent border clipping */
  -webkit-transform: translateY(-3px);
  transform: translateY(-3px);
  -webkit-box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Gold Card Specific Styling */
.gold-card {
  border: 2px solid rgba(255, 215, 0, 0.3);
  background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
}

.gold-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(255, 215, 0, 0.05) 0%,
    transparent 50%
  );
  pointer-events: none;
}

.gold-card:hover {
  border-color: rgba(255, 215, 0, 0.5);
  -webkit-box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.7),
    0 0 30px rgba(255, 215, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.7),
    0 0 30px rgba(255, 215, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Silver Card Specific Styling */
.silver-card {
  border: 2px solid rgba(192, 192, 192, 0.3);
  background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
}

.silver-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(192, 192, 192, 0.05) 0%,
    transparent 50%
  );
  pointer-events: none;
}

.silver-card:hover {
  border-color: rgba(192, 192, 192, 0.5);
  -webkit-box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.7),
    0 0 30px rgba(192, 192, 192, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.7),
    0 0 30px rgba(192, 192, 192, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Price Header */
.price-header {
  text-align: center;
  margin-bottom: 25px;
  position: relative;
  z-index: 2;
}

.metal-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
  opacity: 0.7;
}

.gold-card .metal-icon {
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.silver-card .metal-icon {
  color: #c0c0c0;
  text-shadow: 0 0 20px rgba(192, 192, 192, 0.5);
}

.metal-name {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  letter-spacing: 3px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.price-unit {
  color: #888888;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 5px;
  display: block;
}

/* Price Main Display */
.price-main {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
  z-index: 2;
}

.price-value {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: baseline;
  -ms-flex-align: baseline;
  align-items: baseline;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  gap: 5px;
}

.currency-symbol {
  font-size: 2.5rem;
  font-weight: 300;
  color: #888888;
  -ms-flex-item-align: start;
  align-self: flex-start;
  margin-top: 8px;
}

.price-number {
  font-size: 4.5rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: -2px;
  line-height: 1;
}

/* Price Change Section */
.price-change {
  position: relative;
  z-index: 2;
}

.change-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  gap: 20px;
}

.change-item {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  text-align: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.change-label {
  display: block;
  font-size: 0.8rem;
  color: #888888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.change-value {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  gap: 5px;
  font-size: 1.2rem;
  font-weight: 600;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  flex-wrap: wrap;
}

.change-value.positive {
  color: #28a745;
}

.change-value.negative {
  color: #dc3545;
}

.change-value i {
  font-size: 0.9rem;
}

/* Live Indicator */
.live-indicator {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  position: relative;
  z-index: 2;
}

.live-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.live-dot.market-open {
  background-color: #28a745;
  -webkit-box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
  box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
  -webkit-animation: pulse-green 2s infinite;
  animation: pulse-green 2s infinite;
}

.live-dot.market-closed {
  background-color: #dc3545;
  -webkit-box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
  box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
}

@-webkit-keyframes pulse-green {
  0%,
  100% {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
  }
}

@keyframes pulse-green {
  0%,
  100% {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
  }
}

.live-text {
  font-size: 0.9rem;
  color: #ffffff;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==================================================
   DATE DISPLAY SPACING
   ================================================== */

/* Add space above the date display section */
#date_display {
  margin-top: 40px !important;
  padding-top: 20px !important;
}

/* Responsive spacing for mobile devices */
@media (max-width: 768px) {
  #date_display {
    margin-top: 30px !important;
    padding-top: 15px !important;
  }
}

@media (max-width: 480px) {
  #date_display {
    margin-top: 25px !important;
    padding-top: 12px !important;
  }
}

/* Last Updated Section */
.last-updated {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px 25px;
  border-radius: 25px;
  color: #888888;
  font-size: 0.9rem;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 8px;
}

.update-label {
  color: #aaaaaa;
}

.update-time {
  color: #ffffff;
  font-weight: 500;
}

/* ==================================================
   BANNER SECTION - MOBILE RESPONSIVE FIXES
   ================================================== */

/* COMPLETELY OVERRIDE ALL PREVIOUS BANNER STYLING */
#banner_section {
  /* Reset ALL the aggressive styling that was causing issues */
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

#banner_section .container {
  /* Reset container to normal Bootstrap behavior */
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#banner_section .row {
  /* Reset row to normal Bootstrap behavior */
  margin-left: -15px !important;
  margin-right: -15px !important;
  width: calc(100% + 30px) !important;
}

#banner_section .col {
  /* Reset column styling */
  padding-left: 15px !important;
  padding-right: 15px !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
  width: 100% !important;
}

/* Banner content container styling */
#smp_banner {
  overflow: hidden !important;
  text-align: center !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* CRITICAL: Make banner image truly responsive */
#smp_banner img {
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  object-position: center !important;
}

/* Mobile-specific banner fixes */
@media (max-width: 768px) {
  #banner_section {
    padding: 5px !important;
  }
  
  #banner_section .container {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
  
  #banner_section .row {
    margin-left: -5px !important;
    margin-right: -5px !important;
    width: calc(100% + 10px) !important;
  }
  
  #banner_section .col {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
  
  #smp_banner img {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 150px !important;
    object-fit: contain !important;
  }
}

@media (max-width: 480px) {
  #banner_section {
    padding: 2px !important;
  }
  
  #banner_section .container {
    padding-left: 2px !important;
    padding-right: 2px !important;
  }
  
  #banner_section .row {
    margin-left: -2px !important;
    margin-right: -2px !important;
    width: calc(100% + 4px) !important;
  }
  
  #banner_section .col {
    padding-left: 2px !important;
    padding-right: 2px !important;
  }
  
  #smp_banner img {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 120px !important;
    object-fit: contain !important;
  }
}

/* Additional safety measures to prevent any overflow */
html, body {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

/* Ensure no elements break out of their containers */
* {
  box-sizing: border-box !important;
}

.container-fluid {
  overflow: hidden !important;
}

/* ==================================================
   RESPONSIVE DESIGN FOR MOBILE (SPOT PRICE HERO)
   ================================================== */

@media (max-width: 768px) {
  #spotmetalprice {
    padding: 30px 0; /* Slightly less padding on mobile */
  }

  /* Maintain card column padding on mobile */
  #gold_card_column,
  #silver_card_column {
    padding-top: 12px !important; /* Reduced but still present for hover animation */
  }

  .price-card {
    padding: 25px 20px;
    margin-bottom: 25px;
  }

  .metal-name {
    font-size: 2rem;
    letter-spacing: 2px;
  }

  .metal-icon {
    font-size: 2rem;
  }

  .price-number {
    font-size: 3.5rem;
  }

  .currency-symbol {
    font-size: 2rem;
    margin-top: 6px;
  }

  .change-row {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 15px;
  }

  .change-item {
    padding: 12px;
  }

  .last-updated {
    padding: 12px 20px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  #spotmetalprice {
    padding: 20px 0; /* Even less padding on very small screens */
  }

  /* Maintain card column padding on very small screens */
  #gold_card_column,
  #silver_card_column {
    padding-top: 10px !important; /* Minimal but still present for hover animation */
  }

  .price-card {
    padding: 20px 15px;
    border-radius: 15px;
  }

  .metal-name {
    font-size: 1.8rem;
    letter-spacing: 1px;
  }

  .metal-icon {
    font-size: 1.8rem;
  }

  .price-number {
    font-size: 3rem;
    letter-spacing: -1px;
  }

  .currency-symbol {
    font-size: 1.8rem;
  }

  .change-value {
    font-size: 1.1rem;
  }

  .last-updated {
    padding: 10px 15px;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    text-align: center;
    gap: 5px;
  }
}

/* ==================================================
   BULLION PAGE LINK TEXT STYLING WITH CHEVRON ICONS
   ================================================== */

/* Specific styling for link_text_bullion element only - adds left-pointing chevron icons to both ends */
#link_text_bullion::before {
  content: "\f053"; /* FontAwesome chevron-left icon */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  margin-right: 15px;
  opacity: 0.8;
  color: inherit;
  font-size: 0.9em;
}

#link_text_bullion::after {
  content: "\f053"; /* FontAwesome chevron-left icon */
  font-family: "Font Awesome 5 Free";
  font_weight: 900;
  margin-left: 15px;
  opacity: 0.8;
  color: inherit;
  font-size: 0.9em;
}

/* Ensure the chevrons don't interfere with the existing link styling */
#link_text_bullion {
  display: inline-block;
  position: relative;
}

/* Mobile responsive adjustments for chevron spacing */
@media (max-width: 768px) {
  #link_text_bullion::before,
  #link_text_bullion::after {
    margin-left: 10px;
    margin-right: 10px;
    font-size: 0.8em;
  }
}

@media (max-width: 480px) {
  #link_text_bullion::before,
  #link_text_bullion::after {
    margin-left: 8px;
    margin-right: 8px;
    font-size: 0.7em;
  }
}

/* ==================================================
   EMPTY SELECTOR PLACEHOLDERS (FOR POTENTIAL FUTURE USE)
   ================================================== */

#allmetals {
  /* Reserved for future allmetals specific styling */
}