body.server-profile-page {
  background-color: rgb(50, 51, 57);
  font-family: 'Segoe UI', sans-serif;
  color: white;
  margin: 0;
  padding: 0 20px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}


.time-box {
  width: 105px;
  display: flex;
  flex-direction: column;      /* label above select */
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  padding: 10px 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Shared label/select styles */
.time-box label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ccc;
  margin-bottom: 0.5rem;
}

.time-box select {
  padding: 0.5rem;
  border-radius: 0.375rem;
  border: none;
  background-color: #2a2a2a;
  color: white;
  font-weight: bold;
}

.compare-toggle-container {
  text-align: center;
  margin: 1.5rem auto;
}

#compare-toggle-btn {
  background-color: rgb(101, 0, 0); 
  color: white;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#compare-toggle-btn:hover {
  background-color: rgb(122, 0, 0); 
}


#compare-time-row {
  display: grid;
  grid-template-columns: repeat(2, 145px); /* match real time-box width */
  justify-content: center;
  justify-items: center;
  gap: 20px;
  margin-top: 1rem;
  width: fit-content;              /* center the whole grid block */
  margin-left: auto;
  margin-right: auto;
}

#compare-time-row .unique-compare-box {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(500px, 90vw);
  text-align: center;
}


.unique-note {
  display: block;
  font-size: 0.8rem;
  opacity: 0.8;
  margin-top: 4px;
}

.unique-note em {
  display: block;
}

.top-row {
  position: relative;
  width: 100%;
  max-width: 80vw;
  margin: 20px auto;
  height: auto;        /* was 44px */
  min-height: 0;
}

.single-time-form {
  display: flex;
  justify-content: center;
  width: 100%;      /* take full row width */
}


.scan-server-button-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.scan-server-button {
  background-color: #5e60ce;
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.scan-server-button:hover {
  background-color: #4a4cd0;
  transform: scale(1.05);
}

/* Bigger, cleaner purchased button */
.scan-server-button-purchased {
  background-color: #d4af37;          /* gold */
  color: #2b1900;
  padding: 20px 36px;                 /* bigger */
  border-radius: 16px;                /* smoother */
  font-size: 1.1rem;                  /* increased base size */
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transition: background-color .2s ease, box-shadow .2s ease;
  white-space: normal;
}

/* No transform scaling! */
.scan-server-button-purchased:hover {
  background-color: #e3c557;
  box-shadow: 0 8px 22px rgba(0,0,0,0.32);
}

/* Line styling */
.scan-server-button-purchased .scan-btn-line {
  display: block;
  margin: 3px 0;
}

/* header line */
.scan-btn-top {
  font-size: 1.2rem;
  font-weight: 800;
}

/* middle line */
.scan-btn-mid {
  font-size: 1rem;
  font-weight: 600;
}

/* bottom line */
.scan-btn-bottom {
  font-size: 0.95rem;
  opacity: 0.95;
}


.exact-time-glass {
  margin-top: -6px;                 /* pulls it closer to the scan button */
  margin-bottom: 14px;
  padding: 10px 18px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.exact-time-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ccc;
  margin-bottom: 4px;
  text-align: center;
}

.exact-time-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
}


.server-glass {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 20px;
  margin: 15px 0;
  backdrop-filter: blur(10px);
  width: 100%;
  max-width: 80vw;
  box-sizing: border-box;
}

.alliance-dropdown {
  width: 100%;
  max-width: 80vw;
  padding: 20px;
  margin-top: 20px;
  position: relative;
}

.dropdown-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}

.dropdown-arrow {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid white;
  transition: transform 0.3s ease;
  margin-top: 20px;
  display: inline-block;
}


.dropdown-arrow.rotate {
  transform: rotate(180deg); /* rotate only */
}

.dropdown-header:hover .dropdown-arrow {
  transform: rotate(0deg) scale(1.2); /* hover scale */
}

.dropdown-header:hover .dropdown-arrow.rotate {
  transform: rotate(180deg) scale(1.2); /* hover + rotate */
}


.dropdown-content {
  display: none;
  margin-top: 15px;
}

.dropdown-content.show {
  display: block;
}

.alliance-list-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.alliance-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px 18px;
  color: white;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  align-items: center;
  font-size: clamp(14px, 1.3vw, 20px);
  cursor: pointer;
}

.left-group {
  text-align: left;
  padding-left: 5vw;
}

.center-group {
  text-align: center;
}

.right-group {
  text-align: right;
  padding-right: 5vw;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.lord-position {
  text-align: left;
  padding-left: 3vw;
}

.lord-entry:first-child {
  margin-top: 10px; /* adjust as needed */
}

.lord-details-list {
  display: none; /* keep hidden by default */
  grid-column: 1 / -1;
  background-color: rgba(255, 255, 255, 0);
  border-radius: 8px;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.lord-details-list.show {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.lord-entry {
  display: grid;
  grid-template-columns: 0.5fr 1.5fr 1fr 1.5fr;
  align-items: center;
  padding: 6px 18px;
  font-size: clamp(13px, 1vw, 17px);
  gap: 10px;
  background-color: rgba(255, 255, 255, 0.1); /* gives faint box */
  border-radius: 6px;
}
.lord-id {
  text-align: left;
  padding-left: 5vw;
}

.lord-name {
  text-align: center;
}

.lord-power {
  text-align: right;
  padding-right: 5vw;
}

.lord-dropdown-arrow {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid white;
  transition: transform 0.3s ease;
  display: inline-block;
  margin-left: 10px;
}


.lord-dropdown-arrow.rotate {
  transform: rotate(180deg); /* rotate only */
}

.alliance-item:hover .lord-dropdown-arrow {
  transform: rotate(0deg) scale(1.2); /* hover scale */
}

.alliance-item:hover .lord-dropdown-arrow.rotate {
  transform: rotate(180deg) scale(1.2); /* hover + rotate */
}


.lord-details-list,
.lord-entry,
.lord-id,
.lord-name,
.lord-power {
  -webkit-user-select: text; 
  -ms-user-select: text;     
  user-select: text;
}

.power-filter-form {
  margin-top: 10px;
  text-align: center;
}

.power-dropdown {
  padding: 6px 10px;
  font-size: 16px;
  border-radius: 8px;
  border: none;
  background-color: #f0f0f0;
  color: #333;
  cursor: pointer;
}

.core-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px; 
  padding: 20px;
}

.server-label {
  display: flex;
  flex-direction: row;
  align-items: center; 
  gap: 15px;
}


.power-spread-box,
.faction-spread-box {
  text-align: center;
}



.power-top-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 30px;
  width: 100%;
}


.power-grid-eight {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  width: 100%;
}


.power-top-three > div,
.power-grid-eight > div,
.faction-spread-grid > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}


.faction-spread-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  max-width: 80vw;
  margin: 0 auto;
  gap: 30px;
  box-sizing: border-box;
}

.faction-spread-grid > div:nth-child(1) .subtle {
  color: #0c640c;
  font-weight: bold;
}

.faction-spread-grid > div:nth-child(2) .subtle{
  color: #2b4e79;
  font-weight: bold; 
}

.faction-spread-grid > div:nth-child(3) .subtle{
  color: #750c00;
  font-weight: bold; 
}

.stat-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-between;
  width: 100%;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 25px;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  width: 48%;
  min-width: 300px; /* optional for responsiveness */
  box-sizing: border-box;
}

.core-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  width: 100%;
  max-width: 80vw;
}

.core-info > div {
  flex: 1 1 30%;
  text-align: center;
}

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}

.modal {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 22px 24px;
  width: min(520px, 92vw);
  color: #fff;
  text-align: center;
  box-shadow: 0 10px 35px rgba(0,0,0,0.35);
}

.modal-title { margin: 0 0 10px; font-size: clamp(18px, 2.4vw, 22px); }
.modal-message { margin: 0 0 18px; color: #ddd; }

.modal-actions { display: flex; gap: 12px; justify-content: center; }

.cta-button {
  background-color: #5e60ce;
  color: white; font-weight: 700;
  padding: 12px 20px; border: none;
  border-radius: 10px; cursor: pointer;
  text-decoration: none; display: inline-block;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform .15s ease, background-color .2s ease;
}
.cta-button:hover { background-color: #4a4cd0; transform: scale(1.04); }

.secondary-button {
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 10px; padding: 12px 16px;
  cursor: pointer; transition: background-color .2s ease, transform .15s ease;
}
.secondary-button:hover { background: rgba(255,255,255,0.08); transform: scale(1.02); }

@media (max-width: 768px) {
  .stat-columns {
    flex-direction: column;
    align-items: center;          /* center children */
    justify-content: flex-start;  /* avoid big gaps */
    gap: 20px;                    /* tighter spacing */
  }

  .stat-columns .stat-grid {
    width: 100%;                  /* full width grid */
    min-width: 0;                 /* allow shrinking */
    margin: 0 auto;
    justify-items: center;        /* center grid children */
  }

  .stat-item,
  .stat-item .subtle,
  .stat-item .value {
    text-align: center;           /* force text center */
    margin-left: auto;
    margin-right: auto;
  }

  .power-top-three {
    grid-template-columns: 1fr;
  }

  .power-grid-eight {
    grid-template-columns: repeat(2, 1fr);
  }

  .faction-spread-grid {
    grid-template-columns: 1fr;
  }

  .core-line {
    flex-direction: column;
    gap: 12px;
    padding: 15px;
  }

  .server-label {
    flex-direction: column;
    gap: 2px;
  }

  .alliance-item {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 6px;
    padding: 12px 10px;
  }

  .left-group,
  .center-group,
  .right-group {
    padding: 0;
    text-align: center;
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .right-group {
    flex-direction: column;
  }

  .lord-dropdown-arrow {
    margin-left: 0;
    margin-top: 4px;
  }

  .dropdown-header h3 {
    text-align: center;
    font-size: 18px;
  }

  .lord-details-list {
    display: none; /* Keep hidden by default */
    flex-direction: column;
    gap: 10px;
  }

  .lord-details-list.show {
    display: flex; /* Only show when toggled */
  }

  .lord-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 10px;
    font-size: 15px;
  }

  .lord-position {
    font-weight: bold;
    font-size: 17px;
    padding-left: 0;
  }

  .lord-id,
  .lord-name,
  .lord-power {
    padding: 2px 0;
  }

  .lord-id {
    order: 1;
  }

  .lord-name {
    order: 2;
  }

  .lord-power {
    order: 3;
    margin-top: 4px;
  }
  #compare-time-row {
    grid-template-columns: 1fr;
    justify-content: center;
    justify-items: center;
    width: 100%;
    gap: 14px;
  }

  /* Start & End small */
  #compare-time-row .time-box {
    width: 105px;
  }

  /* Unique compare box bigger */
  #compare-time-row .unique-compare-box {
    width: 260px; 
    max-width: 85vw;
  }

  /* Smaller note text */
  #compare-time-row .unique-note {
    font-size: 0.72rem;
    line-height: 1.15;
    margin-top: 3px;
  }

  .dropdown-arrow {
    margin-top: 4px;   /* was 20px — try 14px, 12px, or 10px */
  }
  
}