.section-heading{
  margin-top:1em;
}

#subheading{
  font-size: 1em;
  font-weight: normal;
  margin: 1.2em 0;
}

label {
  display: block;
  margin-top: 1rem;
  font-weight: bold;
  text-align: left;
}

#login-frm{
 margin-bottom: 2.5em;
}

input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.3rem;
  border-radius: 3px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  font-size: 0.85rem;
  background-color: #a8d2ee4d;
}

.login-btn {
  width: 100%;
  flex: 1;
  padding: 0.75em 1em;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  color: #0d0d0d;
  font-size: 0.95rem;
  background-color: #32ff7e;
  margin-top: 1.5rem;
}

.login-btn:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  background-color: #198754;
  color: #fff;
}

#pick-btn {
  width: 100%;
  flex: 1;
  padding: 0.75em 1em;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  color: #0d0d0d;
  font-size: 1.2rem;
  background-color: #32ff7e;
  margin: 1.5rem;
  text-decoration: none;
  text-transform: uppercase;
}

#pick-btn:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  background-color: #198754;
  color: #fff;
  text-decoration: underline;
}

#forgot-pwd-link{
  color: #13125E;
}

@media (min-width: 992px) {
  .login-section {
    display: flex;
    margin: 0 auto;
    gap:1em;
  }

  .login-btn {
    font-size: 0.95rem;
    padding:0 2em;
    margin-top: 0;
    min-width: 150px;
  }

  input{
    margin: 0 1em;
  }

  input[type="email"],
  input[type="password"] {    
    margin-top: 0;
  }

  label {
    margin-top: 0;
    align-content: center;
    font-size: 1.1em;
  }

  #forgot-pwd-link{
    margin-left: 3.5em;
    font-size: 1.2em;
  }
}

@media (min-width: 1200px) {
  .login-btn {
    max-width: 33%;
    display: block;
  }
}


#game-status{
  background-color: #13125E;
  margin: 1em 0 0.5em 0;
  text-align: center;
}

#gameweek-dtl{
  color: #32ff7e;
  padding: 0.8em 0 0.3em 0;
  font-size: 1.1em;
  font-weight: bold;
  text-transform: uppercase;
}

#chooseBy{
  color: #fff;
  font-size: 0.9em;
  padding-bottom: 2em;
}

#game-intro{
  background-color: #32ff7e;
  font-size: 0.9em;
  color: #13125E;
  margin-bottom: 0.5em;
  text-align: center;
  padding: 0.5em;
}

.intro-line{
  padding: 0.5em 0;
}

#signup{
  text-transform: uppercase;
  font-weight: bold;
  font-size: 1.4em;
}

#signup-btn{
  background: #13125E;
  padding: 0.3em;
  text-decoration: none;
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

#signup-btn:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  color: #32ff7e;
}

.league-img{
  width: 100%;
  margin-bottom: 0.5em;
  cursor: pointer;
}

#join-leagues{
  display: none;
}

@media (min-width: 992px) {
  #league-imgs-section{
    display: flex;
    justify-content: space-between;
    background-color: #a8d2ee4d;
    align-content: center;
  }

  .league-img{
    max-width: 350px;
    margin-bottom: 0;
  }

  #join-leagues{
    display: flex;
    text-align: center;
    align-items: center;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 1.6em;
    padding: 0.4em
  }

  #gameweek-dtl{
    font-size: 2em;
  }

  #chooseBy{
    font-size: 1.3em;
    padding-bottom: 1em;
  }

  #game-intro{
    font-size: 1.1em;
  }

  #signup{
    font-size: 1.6em;
  }

}

@media (min-width: 1200px) {
  #join-leagues{
    font-size: 2.5em;
    padding: 0.4em
  }
  
  #game-intro{
    font-size: 1.4em;
  }
}


/* Modal Wrapper */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.8);
  overflow: auto;
}

/* Show modal */
.modal.show,
.modal.block {
  display: flex;
}

/* Modal Content */
.modal-content {
  width: 90%;
  max-width: 400px;
  background: linear-gradient(to bottom right, #13125E, #003f88, #00b4d8);
  border-radius: 12px;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  padding: 1.5em;
  color: white;
  animation: fadeInUp 0.3s ease-out;
  position: relative;
  box-sizing: border-box;
}

/* Fade-in animation */
@keyframes fadeInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Modal Header */
.modal-header {
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 1.2rem;
}

.modal-txt {
  margin: 0.5em 0;
  font-size: 0.85rem;
}

/* Modal Buttons Wrapper */
.modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  margin-top: 1.5rem;
}

/* Modal Buttons */
.modal-btn {
  width: 100%;
  flex: 1;
  padding: 0.75em 1em;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  font-size: 0.85rem;
}

/* Primary Button */
.modal-btn {
  color: #0d0d0d;
}

.btn-green {
  background-color: #32ff7e;
}

.btn-green:hover {
  background-color: #198754;
  color: #fff;
}

.btn-grey {
  background-color: #d3d3d3;
}

.btn-grey:hover {
  background-color: #5d5d5d;
}

.modal-btn:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* MEDIA QUERIES — Larger Screens */
@media (min-width: 768px) {
  .modal-txt,
  .modal-btn {
    font-size: 0.95rem;
  }
}


.join-btn {
  width: 100%;
  flex: 1;
  padding: 0.75em 1em;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  color: #0d0d0d;
  font-size: 0.95rem;
  background-color: #32ff7e;
  display: block;
  margin: 1em 0;
  text-align: center;
  text-decoration: none;
}

.join-btn:hover {
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  background-color: #198754;
}

/* Large Screens */
@media (min-width: 992px) {
  .join-btn {
    max-width: 40%;
  }
}

/* Large Screens */
@media (min-width: 1200px) {
  .login-btn {
    font-size: 1em;
  }

  #subheading{
    font-size: 1.3em;
  }

  #reg-sub{
    font-size: 1.3em;
  }

  .join-btn{
    font-size: 1em;
  }

}

@media (min-width: 992px) {
  .frm-group{
    display:flex;
    width: 45%;
  }

  .frm-input{
    width: 100%;
    margin-left:1em;
  }

  input{
    margin: 0;
  }
}

/* Table styles */
#leader-sect{
  background-color: #a8d2ee4d;
}

#leaderboard-head{
  font-size: calc(0.8rem + 1.5vw);
  padding: 0.3em;
  margin-bottom: 0;
  background-color: #13125e;
  color: #32ff7e;
  text-align: center;
  margin-top: 0.3em;
}

.league-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.league-table thead tr {
  background-color: #13125e;
  color: #fff;
  font-size: 0.9rem;
  font-weight: bold;
}

.league-table th {
  background: transparent;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  padding: 0.25em 0 0.75rem 0;
  text-align: center;
  white-space: normal;
}

.league-table td {
  font-size: 0.85rem;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
  padding: 0.6rem 0;
  color: #13125e;
}

/* Target name column specifically */
.league-table td:nth-child(2) {
  text-align: left;
  width: auto;
  white-space: normal;
  word-break: break-word;      /* Breaks long strings (e.g. no-space names) */
  overflow-wrap: anywhere;     /* Modern way to allow breaking anywhere */
}

/* Optional: constrain height or limit lines */
.league-table td:nth-child(2) a {
  display: block;
  line-height: 1.3em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.league-table th:nth-child(2) {
  text-align: left;
}

/* Force other columns to take minimal, equal width */
.league-table th:not(:nth-child(2)),
.league-table td:not(:nth-child(2)) {
  width: 15%;
}

/* Highlight the logged-in user's row */
.league-table .user-row {
  background-color: #ccf2ff;
}

/* Tablet/Desktop Enhancements */
@media (min-width: 768px) {
  .league-table th {
    font-size: 1rem;
    padding: 0.25em 0 0.75rem 0;
  }

  .league-table td {
    font-size: 0.95rem;
  }
}

/* Hide "For" and "Against" columns on mobile */
.hide-on-mobile {
  display: none;
}

/* Show them on tablets and larger */
@media (min-width: 668px) {
  .hide-on-mobile {
    display: table-cell;
  }
}

/* Mobile-first: Show short labels, hide full */
.short-label {
  display: inline;
}
.full-label {
  display: none;
}

/* On larger screens, show full labels instead */
@media (min-width: 768px) {
  .short-label {
    display: none;
  }
  .full-label {
    display: inline;
  }
}