@font-face {
  font-family: 'requiem';
  src: url('/udl/assets/Requiem.ttf') format('truetype');
}

@font-face {
  font-family: 'hector';
  src: url('/udl/assets/Hector.ttf') format('truetype');
}

/* Layout + base font */
html, body {
  font-family: Arial, Helvetica, sans-serif;
  height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  /* BACKGROUND IMAGE */
  background: #d7d7d7 url('/udl/assets/graveyard-bg.png') no-repeat center top;
  background-size: cover;
  background-attachment: fixed;

  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
}


/* Top nav */
.navtop {
  background-color: rgb(139, 0, 25);
  height: 100px;
  width: 100%;
    min-height: 99px;
  border: 0;
  position: relative; /* Ensure elements are positioned relative to this */
}

.navtop div {
  display: flex;
  margin: 0 auto;
  width: 1000px;
  height: 100%;
  justify-content: flex-end;
}

.navtop div h1,
.navtop div a {
  display: inline-flex;
  align-items: center;
}

.navtop div h1 {
  font-family: 'hector'; /* Original font for h1 */
  flex: 1;
  font-size: 26px;
  padding: 0;
  margin: 0;
  color: gold; /* Retain gold color */
  font-weight: normal;
  white-space: nowrap;
}

.navtop div a {
  font-family: 'requiem'; /* Original font for links */
  padding: 0 20px;
  text-decoration: none;
  color: white; /* White text */
  font-weight: bold;
}

.navtop div a:hover {
  color: gold; /* Gold hover effect */
}

.navtop div a i {
  padding: 2px 8px 0 0;
}

#page:hover {
  text-decoration: none;
}

#page i {
  color: gold;
}

i {
  text-decoration: none !important;
}

/* Main content wrapper */
.content {
  width: 1000px;
  margin: 0 auto;
  flex: 1 0 auto;   /* ⬅ change from `flex: 1;` if needed */
}


.content h2 {
  font-family: 'hector';
  color: rgb(139, 0, 25);
  margin: 0;
  padding: 25px 0;
  font-size: 20px;
}


.content > .box {
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1);
  padding: 25px;
  margin-bottom: 25px;
  margin-left: 0;
  background-color: #ffffffa3;
  width: 50%;
}

.content > .box table td {
  padding: 4px 0px;
}

.content > .box table td:first-child {
  color: rgb(139, 0, 25);
  font-family: 'requiem';
  padding-right: 28px;
}

.content > .box p {
  padding: 5px;
  margin: 0 0 10px 0;
}

.box h2 {
  padding: 0 0 15px 0;
  font-size: 20px;
}

.content > .box2 {
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1);
  padding: 25px;
  margin-bottom: 25px;
  margin-top: 25px;
  margin-left: 0;
  background-color: #ffffffa3;
  width: 50%;
}

.content > .box2 h2{
  padding-top: 0;
}

.content > .box3 {
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1);
  padding: 25px;
  margin-bottom: 25px;
  margin-top: 25px;
  margin-left: 10px;
  background-color: #ffffffa3;
  width: 80%;
}

.content > .box3 h2{
  padding-top: 0;
}

/* Forms */
.formitem,
.formitem2 {
  padding-bottom: 10px;
}

.formitem label {
  font-family: 'requiem';
  color: rgb(139, 0, 25);
  display: inline-block;
  width: 200px;
  text-align: left;
}

.formitem2 {
  padding-left: 205px;
  font-family: 'requiem';
  color: rgb(139, 0, 25);
}

.formitem3 label {
  font-family: 'requiem';
  color: rgb(139, 0, 25);
}

/* League & death tables */

.league {
  background-color: #ffffffa3;
  width: 600px;padding-left: 25px;border-left-width: 25px;margin-left: 1px;margin-top: 25px;padding-bottom: 25px;border-top-width: unset;
}

.league > table th,
.league > table td {
  padding-right: 20px;
}

.hide {
  display: none;
}

.league th:first-child {
  color: rgb(139, 0, 25);
  font-family: Arial, Helvetica, sans-serif;
  padding-right: 30px;
}

.league td:nth-child(3) {
  text-align: right;
}

.death {
  background-color: #ffffffa3;
  width: 400px;padding-left: 25px;border-left-width: 25px;margin-left: 1px;margin-top: 25px;padding-bottom: 25px;border-top-width: unset;
}

.death > table th,
.death > table td {
  padding-right: 20px;
}

.death td:nth-child(4),
.death td:nth-child(5) {
  text-align: right;
}

.admin {
  background-color: #ffffffa3;
  width: 900px;
  padding-left: 25px;
  border-left-width: 25px;
  margin-left: -25px;
  margin-top: 0;
  padding-bottom: 25px;
  border-top-width: unset;
}

.admin > table th,
.admin > table td {
  padding-right: 20px;
}

.admin td:nth-child(4),
.admin td:nth-child(5) {
  text-align: right;
}


/* Misc */
#udl {
  padding-left: 0px;
  flex: 1;
}

button {
  font-family: 'requiem', Arial, Helvetica, sans-serif;
  color: rgb(139, 0, 25);
}

button:hover {
  background-color: gold;
}

#adminbtn {
  background-color: rgb(139, 0, 25);
  color: gold;
  border-style: solid;
  border-width: 1px;
  border-radius: 2px;
  padding: 2px 10px;
  margin-right: 5px;
}

#adminbtn:hover {
  background-color: gold;
  color: rgb(139, 0, 25);
  border-style: inset;
  border-width: 2px;
  border-radius: 2px;
  padding: 1px 9px;
}

#dod {
  color: rgb(139, 0, 25);
}

#dodnull {
  color: gray;
}

#pts {
  width: 50px;
  text-align: center;
  color: rgb(139, 0, 25);
}

p {
  margin-top: 0;
}

/* Footer: sticky bottom */
.footer {
  width: 100%;
  background-color: rgb(139, 0, 25);
  height: 40px;
  color: white;
  margin: 0 auto;
  flex: 0 0 auto;   /* ⬅ NEW: don’t let flex push it away */
  /* IMPORTANT: remove `margin-top: auto;` from here */
}

.footstuff {
  display: flex;
  margin: 0 auto;
  font-family: 'requiem';
  font-size: small;
  width: 1000px;
  height: 100%;
}

/* Tables */
table thead {
  font-family: 'requiem', Arial, Helvetica, sans-serif;
  color: rgb(139, 0, 25);
  text-align: left;
}

table td p {
  font-size: 14px;
  margin: 0 0 0 10px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.4);
}

/* Modal Content */
.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 20px;
  border: 1px solid #888;
  width: 25%;
}

.modal-content h4 {
  text-decoration: underline;
}

/* Close button */
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* Save button */
#savebtn {
  font-family: 'requiem', Arial, Helvetica, sans-serif;
  color: rgb(139, 0, 25);
  position: fixed; /* Sticks the button relative to the viewport */
  bottom: 50px;    /* Distance from the bottom of the viewport */
  right: 400px;    /* Distance from the right of the viewport */
  z-index: 1000;   /* Ensures the button stays on top of other elements */
}

#savebtn:hover {
  background-color: gold;
}

/* Burger menu default */
.burger-menu {
  display: none; /* Hide burger menu by default on large screens */
}

/* Responsive Styles for Small Screens */
@media screen and (max-width: 1000px) {

  .navtop .burger-list {
    display: none; /* Ensure it is hidden by default */
  }

  .burger-list {
    display: none;
    flex-direction: column;
    background-color: #333;
    position: absolute;
    top: 100px; /* Adjust based on your layout */
    right: 0px;
    width: 120px !important;
    z-index: 999;
  }

  .navtop .burger-list.active {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    height: 115px;
  }

  .navtop .burger-list a {
    color: white;
    text-decoration: none;
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #444;
    padding: 5px 15px;
  }

  .navtop .burger-list a:hover {
    background-color: gold;
    color: black;
  }

  .navtop div h1 {
    font-size: 14px;
    color: gold;
    margin: 0 10px;
    font-family: 'hector';
  }

  .burger-menu {
    display: block;
    cursor: pointer;
    font-size: 2em;
    color: gold;
    z-index: 1000;
    position: absolute;
    top: 25px;
    right: 20px;
  }

  .formitem label {
    width: 100px;
  }

  .formitem2,
  .formitem {
    width: 100px;
    padding-left: 5px;
  }

  .content h2 {
    width: 200px;
  }

  .content {
    flex: 1;
    margin: 0 10px;
    width: 100% !important;
  }

  #savebtn {
    font-family: 'requiem', Arial, Helvetica, sans-serif;
    color: rgb(139, 0, 25);
    position: fixed;
    bottom: 50px;
    right: 50px;
    z-index: 1000;
    height: 50px;
  }

  .content > .box {
    box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 25px;
    margin-left: -25px;
    background-color: #ffffffcb;
    width: 100%;
  }
}

@media (max-width: 768px) {
    body {
        background-image: url('../assets/background2.png');
        background-size: cover;
        background-position: center;
        background-attachment: scroll;
    }

    .content {
      margin-left: 0;
    }

    .content > .league {
      margin-left: 0;
      margin-top: 6px;
      padding-left: 10px;
    }

    .content > .box {
      margin-left: 0;
    }

    /* Modal Content */
.modal-content {
  background-color: #fefefe;
  margin: 20px;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
}

.death > table th,
.death > table td {
  padding-right: 1px;
}

.league > table th,
.league > table td {
  padding-right: 1px;
}

  }

@media (max-width: 768px) {

    html, body {
        max-width: 100%;
        overflow-x: hidden; /* kills horizontal scroll */
    }

    table {
        width: 400px;           
        table-layout: auto;    
        border-collapse: collapse;
    }

    th, td {
        padding: 4px;           /* tighter padding for mobile */
/*        font-size: 0.8rem;      slightly smaller text */
        word-wrap: break-word;  /* long text wraps instead of causing overflow */
         white-space: normal;    /* allow multi-line cells */
    }


    /* If you have any fixed-width containers, clamp them too */
    .container,
    .content,
    .scorecard-container {
        max-width: 100%;
    }
}
