/* Body styling */
body {
  font-family: 'Play', Arial, sans-serif;
  margin: 0;
  padding: 0;
}

/* Main content styling */
.main-content {
  padding: 20px;
  height: 100%;
}

/* Remove margin-left on mobile */
@media (max-width: 768px) {
  .main-content {
    margin-left: 0; /* Remove the sidebar margin */
    padding: 10px; /* Optional: Adjust padding for smaller screens */
  }
}

/* Content styling specific to clanladder.php */
.content {
  color: #ffffff;
  text-align: center;
  width: calc(100% - 260px); /* Adjust width to account for sidebar */
  margin-left: 260px; /* Match sidebar width for content alignment */
}

.content h1 {
  font-size: 3.5rem; /* Adjust for a modern and prominent title */
  margin-bottom: 1rem;
  font-weight: bold;
  text-transform: uppercase; /* Optionally, make text uppercase */
  letter-spacing: 2px; /* Increase letter spacing for emphasis */
}

.content p {
  font-size: 1.5rem; /* Adjust for paragraph text */
  line-height: 1.6; /* Improve readability with increased line height */
}

@media (max-width: 820px) {
  .content {
      width: 100%; /* Full width on smaller screens */
      margin-left: 0; /* No left margin on smaller screens */
  }

  .content h1 {
      font-size: 2.5rem; /* Adjust for smaller screens */
  }

  .content p {
      font-size: 1.3rem; /* Adjust for smaller screens */
  }
}

/* Center table headers */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0; /* Added margin for spacing */
  font-family: 'Roboto', sans-serif; /* Changed font for better readability */
  background-color: #1a2a38; /* Dark background for the table */
  color: #dadada; /* White text */
  border-radius: 10px; /* Rounded corners */
  overflow: hidden; /* Ensure rounded corners are visible */
}

th, td {
  text-align: center;
  padding: 5px; /* Adjusted padding for table cells */
  border-bottom: 1px solid #444; /* Dark grey border */
}

th {
  background-color: #111C26; /* Dark background for headers */
  color: #dadada; /* White text for headers */
  text-transform: uppercase; /* Uppercase text */
}

tr:nth-child(even) {
  background-color: #0d1924;  /* Slightly lighter background for even rows */
}

tr:hover {
  background-color: #2d4458; /* Highlight row on hover */
}

.td1 {
  text-align: left;
  padding: 15px; /* Adjusted padding */
  border-bottom: 1px solid #444; /* Dark grey border */
}

.Rank, .clanIdCell {
  width: 10px; /* Adjusted width */
  text-align: center;
  background-color: #203b53;
}

/* Specific styles for logos */
td.teamNameCell img, td.teamNameCell img {
  width: auto; /* Automatically adjust width */
  height: 50px; /* Set a larger height */
  object-fit: contain; /* Maintain aspect ratio */
}

/* Style for clan list */
.clan-list {
  margin-top: 20px; /* Adjust spacing above the clan list */
}

.clan-list table {
  margin: 0 auto; /* Center the table horizontally */
  width: 100%;
  border-collapse: collapse;
}

.clan-list tr:not(:last-child) {
  border-bottom: none; /* Ensure no border is applied */
}

.clan-list th,
.clan-list td {
  text-align: center; /* Center align table data */
  padding: 5px; /* Adjusted padding for table cells */
  font-size: 2.0rem; /* Adjust font size for table headers and data */
}

/* Style for the table */
.clan-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px; /* Adjust spacing as needed */
  min-width: 500px; /* Ensures all columns can show */
  
}

/* Style for table rows */
.clan-table tr {
  border-bottom: none; /* No separator between rows */
}

/* Style for table cells */
.clan-table td {
  padding: 5px; /* Adjusted padding for table cells */
  font-size: 20px; /* Adjust font size as needed */
  vertical-align: middle;
  text-align: center;
  color: #ffffff; /* Ensure all cells are white */
}

.clan-table td.teamNameCell {
  padding-left: 5px;
  padding-right: 5px;
  text-align: center; /* or center if you prefer */
}

/* Ensure no spacing between wins, '/', and losses */
.wins-losses {
  padding: 0; /* Remove padding */
  text-align: center; /* Center text */
}

/* Style for team logos */
.clan-table img.team-logo {
  width: 40px; /* Adjust size of logos */
  height: 40px;
  border-radius: 50%;
  margin-right: 10px; /* Increased spacing between logo and team name */
  vertical-align: middle; /* Align vertically with text */
}

/* Hover effect for team names */
.clan-table a.teamname {
  text-decoration: none; /* Remove underline */
  display: inline-block; /* Allow setting max width */
  max-width: calc(100% - 50px); /* Adjust to leave space for logo */
  white-space: nowrap; /* Prevent text from wrapping */
  overflow: hidden; /* Hide overflow text */
  text-overflow: ellipsis; /* Add ellipsis for overflow text */
  vertical-align: middle; /* Align vertically with logo */
  transition: color 0.3s; /* Smooth transition for color change */
}

/* Specific style for Dominant team name */
.clan-table a.teamname.dominant {
  color: yellow; /* Yellow text color for Dominant team name */
}

/* Hover effect for all team names */
.clan-table a.teamname:hover {
  color: whitesmoke; /* Light gray text color on hover for non-dominant team names */
}

/* Hover effect for Dominant team name */
.clan-table a.teamname.dominant:hover {
  color: whitesmoke; /* Light gray text color on hover for Dominant team name */
}


/* Gold text color for team with crown */
.teamname.gold {
  color: gold; /* Gold text color */
}

/* Style for activity indicator */
.clan-table .activity {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: green;
  border-radius: 50%;
  vertical-align: middle;
}

/* Specific styles for table headers "Rank" and "XP" */
.clan-table th.Rank,
.clan-table th.streakCell:nth-child(8),
.clan-table td.Rank,
.clan-table td.streakCell:nth-child(8) {
  color: #ffffff; /* White text color */
}

.teamNameCell .team-tag {
  justify-content: flex-start;
  font-size: 1.0em;
  color: #868686;
  top: -50px; /* Adjust this value to move the tag up */
  left: calc(100% + 5px); /* Position it to the right of the team name with some spacing */
  white-space: nowrap; /* Prevent the tag from wrapping to the next line */
}

/* Align content in teamNameCell to the left */
.teamNameCell {
  text-align: center; /* Align text to the left */
}

/* Ensure all elements within teamNameCell are inline and aligned */
.teamNameCell img,
.teamNameCell a,
.teamNameCell span {
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px; /* Space between icons and text */
  color: white;
}

.teamNameCell img.team-logo {
  margin-right: 10px; /* Increased spacing between logo and team name */
}

/* Gold background color for the team with the crown */
.gold-background {
  background-color: gold; /* Gold */
}

/* Gold glowing effect for the team with the crown */
@keyframes gold-glow {
  0% {
    box-shadow: 0 0 5px gold;
  }
  50% {
    box-shadow: 0 0 20px gold;
  }
  100% {
    box-shadow: 0 0 5px gold;
  }
}

.gold-glow {
  animation: gold-glow 1.5s infinite alternate;
}

/* Styles for the clan ladder container */
.clan-ladder-container {
    display: block;
}

@keyframes glowing {
    0% { box-shadow: 0 0 5px rgba(255, 255, 255, 0.5), 0 0 15px rgba(255, 255, 255, 0.5), 0 0 20px rgba(255, 255, 255, 0.5); }
    50% { box-shadow: 0 0 10px rgba(255, 255, 255, 1), 0 0 20px rgba(255, 255, 255, 1), 0 0 30px rgba(255, 255, 255, 1); }
    100% { box-shadow: 0 0 5px rgba(255, 255, 255, 0.5), 0 0 15px rgba(255, 255, 255, 0.5), 0 0 20px rgba(255, 255, 255, 0.5); }
}

.ladder-selection-container {
    display: block;
}

.ladder-options {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px; /* Space between boxes */
  margin-top: 20px;
}

.ladder-box {
  width: 100px;
  height: 120px; /* Increased height to accommodate text */
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 10px;
  background-color: rgba(0, 0, 0, 0.5);
  text-align: center;
  padding: 10px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column; /* Stack icon and text vertically */
  align-items: center; /* Center align icon and text */
  justify-content: center; /* Center content vertically */
}

.ladder-box.current-ladder {
  background-color: #2d4458; /* Highlight color */
  opacity: 0.8; /* Make it slightly transparent */
  border: 2px solid #ffffff; /* Optional: Add a border for emphasis */
}

.ladder-box:hover {
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.ladder-icon {
  font-size: 36px; /* Adjust icon size */
  color: #fff;
  margin-bottom: 10px; /* Add space between icon and text */
}

.ladder-name {
  font-size: 14px;
  color: #fff;
  text-transform: capitalize;
  word-wrap: break-word; /* Ensure long text wraps */
  text-align: center; /* Center align text */
}

/* Styling for the ladder title, aligned in the center */
.ladder-title {
    text-align: center;
    font-size: 1.0rem;
    color: gold;
    margin-bottom: 5px;
    position: relative;
}

.ladder-select {
    display: block;
    margin-top: 5px;
}

/* Create Clan Button container */
.create-clan-container {
    display: flex;
    align-items: center;
    flex-basis: 20%; /* Adjust as needed */
    padding-top:10px;
}

/* Styling for the Create Clan button */
.create-clan-button {
    padding: 5px;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1rem;
    text-align: center;
    white-space: nowrap; /* Prevents breaking onto a new line */
}

.create-clan-button:hover {
    background-color: #218838;
}

.rank-icon {
    width: 35px;
    height: 35px;
    vertical-align: middle;
}

.clan-table-wrapper {
  width: 100%;
  overflow-x: auto;
}




/* Small Display */
@media (max-width: 992px) {

  /* Main content styling */
  .main-content {
    margin-left: 0px; /* Default for desktop view */
    height: 100%;
  }

  .clan-table a.teamname {
      font-size: 30px; /* Adjust font size for smaller screens */
  }


}


/* Small Display */
@media (max-width: 768px) {
  .clan-table td, .clan-table th {
    padding: 4px 8px; /* Reduce padding */
    font-size: 13px;
  }

  .Rank {
    width: 40px;
  }

  .teamNameCell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .teamNameCell img.team-logo {
    width: 28px;
    height: 28px;
    margin-right: 5px;
  }

  .clan-table a.teamname {
    font-size: 14px;
    max-width: 120px;
  }

  .team-tag {
    display: none;
  }

  .collapse1,
  .collapse2 {
     display: table-cell !important;
  }
  
  /* Still hide activity if you want */
  .collapse3 {
    display: none;
   }
  
   .create-clan-container {
    display: flex;
    flex-basis: 20%;
    padding-top: 10px;
    justify-content: center;
   }

  .clan-table td.teamNameCell {
    padding: none;
    text-align: center;
}

  }

@media (max-width: 576px) {
  .clan-table td, .clan-table th {
    font-size: 12px;
    padding: 6px 4px;
  }

  .teamNameCell img.team-logo {
    width: 24px;
    height: 24px;
  }

  .clan-table a.teamname {
    font-size: 13px;
    max-width: 100px;
  }
}
