body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #212121; /* Dark background for a game vibe */
    color: #f4f4f9; /* Light text for contrast */
    margin: 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;   
}

/* HEADER */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #111; /* Dark header for gaming aesthetic */
    padding: 10px 30px;
    color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4); /* Adding shadow for depth */
}

header .logo {
    display: flex;
    align-items: center;
    gap: 1px;
}

header .logo img {
    width: 65px;
    height: auto;
}

header .logo h1 {
    font-size: 30px;
    font-weight: bold;
    position: relative;
    letter-spacing: 2px; /* Adds a more techy look */
    left: 20px;
}

header .profile, 
header .language,
header .login-lin {
    font-size: 18px;
    cursor: pointer;
    transition: color 0.3s ease;
}
header {
    position: relative;
}

.language {
    font-size: 18px;
    cursor: pointer;
    transition: color 0.3s ease;
    position: relative;
    right: 350px;
}




header .profile:hover, 
header .language:hover,
header .login-lin:hover {
    color: #ff9800; /* Highlight color when hovered */
}
/*dropdown language*/
.language-options {
    display: none;
    position: absolute;
    top: 30px;
    left: 0;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 100;
}

.lang-option {
    padding: 10px 15px;
    color: white;
    cursor: pointer;
    white-space: nowrap;
}

.lang-option:hover {
    background-color: #555;
}


/* DASHBOARD */
.dashboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 50px;
    gap: 40px;
}

/* NAVIGATION */
nav {
    margin-bottom: 0px;
    display: flex;
    justify-content: center;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: #f4f4f9; /* Light color for the text */
    font-size: 20px;
    padding: 12px 25px;
    background: #212121; /* Same as background */
    border: none; /* No border */
    transition: color 0.3s ease; /* Transition for color change */
}

nav a:not(:last-child) {
    border-right: 2px solid #444; /* Add a subtle border between the buttons */
}

nav a:hover {
    color: #ff9800; /* Change text color on hover to orange */
}

/* FOOTER */
footer {
    margin-top: 50px;
    text-align: center;
    font-size: 16px;
    color: #888;
}

   /* Spinner styles */
    .spinner-container {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;
      height: 150px; /* Adjust height as needed */
      margin: 2rem 0;
    }
    .spinner {
      width: 48px;
      height: 48px;
      border: 5px solid #eee;
      border-top-color: #3f51b5; /* Indigo accent */
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }
    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    .dashboard-container {
  display: flex;
  flex-direction: row;
  width: 100%;
}

/* Default: large screen layout */
.dashboard-container nav {
  flex-direction: row;
  width: auto;
}

#main-content {
  flex-grow: 1;
  padding: 2rem;
}


@media (max-width: 768px) {
  #main-content {
    font-size: 14px;
  }

  #main-content h2 {
    font-size: 18px;
  }

  #main-content p,
  #main-content li,
  #main-content div {
    font-size: 13px;
    line-height: 1.4;
  }
}



/* RESPONSIVE DESIGN */

/* For large screens (2048px and wider) */
@media (min-width: 2048px) {
    header {
        padding: 20px 80px;
    }

    header .logo h1 {
        font-size: 40px;
    }

    header .profile,
    header .language,
    header .login-lin {
        font-size: 22px;
    }

    nav {
        gap: 50px;
    }

    nav a {
        font-size: 24px;
        padding: 15px 30px;
    }

    .dashboard {
        padding: 80px;
        gap: 60px;
    }

    footer {
        font-size: 18px;
    }

    /* Optional: Adjust language position */
    .language {
        left: 650px; /* More space on wide screens */
        position: relative;
        right: 350px;
    }
    
}

@media (min-width: 1025px) and (max-width: 1200px) {
         /* Optional: Adjust language position */
    .language {
        position: relative;
        left:-250px;  
    }
    }



/* For tablets (iPad and similar devices) */
@media (max-width: 1024px) {
    header {
        padding: 15px 20px;
    }

    header .logo h1 {
        font-size: 24px;
    }

  

    nav a {
        font-size: 18px;
        padding: 10px 20px;
    }

    .dashboard {
        padding: 30px;
    }
    .language {
        position: static;
        transform: none;
        margin-left: 10px;
        position: relative;
        right: 70px;
    }
    header .login-lin {
        position: relative;
        right: 65px;
    }
    header .profile{
        position: relative;
        left: -40px;

    }
    
}
@media (max-width: 613px) {
    header {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-rows: auto auto;
        align-items: center;
        padding: 10px;
        text-align: center;
        position: relative;
        width: 100%;
    }
    header .logo img {
        width: 55px;
        height: auto;
    }
    header .logo h1 {
        font-size: 20px;
        font-weight: bold;
        position: relative;
        top:-10px

       
    }

    .logo {
        grid-column: 1 / 2;
        flex-direction: row;
        align-items: center;
        gap: 5px;
        position: relative;
        top: 12px;
    }
    .logo img {
        max-width: 100%; /* prevent overflow */
    }

    .logo h1 {
        grid-column: 2 / 3;
        font-size: 20px;
        margin: 0 auto;
        justify-self: center;
    }

    .profile {
        grid-column: 3 / 4;
        justify-self: end;
        font-size: 16px;
    }

    .language {
        grid-column: 2 / 3;
        grid-row: 2;
        justify-self: center;
        font-size: 14px;
        margin-top: 5px;
    }

    .language-options {
        left: 50%;
        transform: translateX(-50%);
    }
    header .language {
        font-size: 14px;
    }
    header .login-lin {
        font-size: 16px;
    }
    header .login-lin {
        position: relative;
        left: 75px;
    }
    header .language {
        position: relative;
       left: -60px;
        top: -8px;
    }
    header .profile{
        font-size: 16px;
        position: relative;
        left: -40px;

    }
  

    .login-lin {
        display: none; /* Optional: hide login link if profile is showing */
       
    }

    nav {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 0px;
        gap: 10px;
    }

    .dashboard {
        padding: 20px;
        align-items: flex-start;
        gap: 20px;
    }

    footer {
        font-size: 14px;
        text-align: center;
        margin-top: 30px;
    }
}

@media (max-width: 568px) {
    header {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-rows: auto auto;
        align-items: center;
        padding: 10px;
        text-align: center;
        position: relative;
        width: 100%;
    }
    header .logo img {
        width: 55px;
        height: auto;
    }
    header .logo h1 {
        font-size: 20px;
        font-weight: bold;
        position: relative;
        top:-10px

       
    }

    .logo {
        grid-column: 1 / 2;
        flex-direction: row;
        align-items: center;
        gap: 5px;
        position: relative;
        top: 12px;
    }
    .logo img {
        max-width: 100%; /* prevent overflow */
    }

    .logo h1 {
        grid-column: 2 / 3;
        font-size: 20px;
        margin: 0 auto;
        justify-self: center;
    }

    .profile {
        grid-column: 3 / 4;
        justify-self: end;
        font-size: 16px;
    }

    .language {
        grid-column: 2 / 3;
        grid-row: 2;
        justify-self: center;
        font-size: 14px;
        margin-top: 5px;
    }

    .language-options {
        left: 50%;
        transform: translateX(-50%);
    }
    header .language {
        font-size: 14px;
    }
    header .login-lin {
        font-size: 16px;
    }
    header .login-lin {
        position: relative;
        left: 75px;
    }
    header .language {
        position: relative;
       left: -60px;
        top: -8px;
    }
    header .profile{
        font-size: 16px;
        position: relative;
        left: -40px;

    }
  

    .login-lin {
        display: none; /* Optional: hide login link if profile is showing */
       
    }

    nav {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 10px;
        gap: 10px;
    }

    .dashboard {
        padding: 20px;
        align-items: flex-start;
        gap: 20px;
    }

    footer {
        font-size: 14px;
        text-align: center;
        margin-top: 30px;
    }
}

html, body {
    overflow-x: hidden;
    width: 100vw;
    position: relative;
  }

  #output {
    width: 100%;
    overflow-x: auto;
    box-sizing: border-box;

    /* Hide scrollbar */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;     /* Firefox */
  }
  #output::-webkit-scrollbar {
    display: none;  /* Chrome, Safari, Opera */
  }

.scoreboard-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;  /* Default for large screens */
  padding-bottom: 1rem;
  box-sizing: border-box;
  margin-top: 1rem;

  /* Hide scrollbar */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;     /* Firefox */
}



/* Very large screens (TVs, Ultra-wide monitors ≥1800px) */
@media (min-width: 1800px) {
  .scoreboard-scroll {
    width: 120%;
  }
}

/* Large desktops (1440px–1799px) */
@media (min-width: 1440px) and (max-width: 1799px) {
  .scoreboard-scroll {
    width: 110%;
  }
}

/* Standard desktops (1200px–1439px) */
@media (min-width: 1200px) and (max-width: 1439px) {
  .scoreboard-scroll {
    width: 100%;
  }
}

/* Small desktops & large tablets (992px–1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .scoreboard-scroll {
    width: 100%;
  }
}

/* Tablets (768px–991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .scoreboard-scroll {
    width: 100%;
  }
}

/* Large phones / small tablets (600px–767px) */
@media (min-width: 601px) and (max-width: 767px) {
  .scoreboard-scroll {
    width: 100%;
  }
}

/* Phones (below 600px) */
@media (max-width: 600px) {
  .scoreboard-scroll {
    width: 95%;
  }
   nav {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 0px;
        gap: 10px;
    }
}
@media (max-width: 550px) {
  .scoreboard-scroll {
    width: 85%;
  }
}
@media (max-width: 500px) {
  .scoreboard-scroll {
    width: 80%;
  }
}
@media (max-width: 450px) {
  .scoreboard-scroll {
    width: 75%;
  }
}
@media (max-width: 400px) {
  .scoreboard-scroll {
    width: 70%;
  }
}
@media (max-width: 350px) {
  .scoreboard-scroll {
    width: 65%;
  }
}
@media (max-width: 300px) {
  .scoreboard-scroll {
    width: 60%;
  }
}

  .scoreboard-scroll::-webkit-scrollbar {
    display: none;  /* Chrome, Safari, Opera */
  }

  .scoreboard-header,
  .user-info {
    min-width: 600px;
    display: flex;
    gap: 20px;
    align-items: center;
    box-sizing: border-box;
    border-bottom: 1px solid #eee;
    padding: 0.5rem 0;
  }

  .scoreboard-header {
    font-weight: bold;
    border-bottom: 2px solid #ccc;
  }

  .scoreboard-header > div,
  .user-info > div {
    box-sizing: border-box;
  }

  .scoreboard-header > div:nth-child(1),
  .user-info > div:nth-child(1) {
    width: 30px;
    font-weight: bold;
  }

  .scoreboard-header > div:nth-child(2),
  .user-info > div:nth-child(2) {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .scoreboard-header > div:nth-child(3),
  .user-info > div:nth-child(3) {
    width: 80px;
    text-align: right;
    font-weight: bold;
  }

  .scoreboard-header > div:nth-child(4),
  .user-info > div:nth-child(4) {
    width: 100px;
    text-align: right;
  }

  .scoreboard-header > div:nth-child(5),
  .user-info > div:nth-child(5) {
    width: 120px;
    text-align: right;
  }

  .user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
  }

  .user-info .text-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 0.95em;
  }

  .user-info .user-name {
    font-weight: bold;
  }

  .user-info .user-email {
    font-size: 0.85em;
    color: #555;
  }

  #user-card {
    text-align: center;
    margin-bottom: 2rem;
  }


