/* Base Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: darkgray;
  color: #333;
  overflow-x: hidden; /* Fix overflow issue */
}

/* Floating effect */
@keyframes floatUp {
  0% { transform: translateY(100vh); opacity: 0; }
  50% { opacity: 0.7; }
  100% { transform: translateY(-10vh); opacity: 0; }
}

/* Existing styles */
header {
  background-color: gray;
  color: #fff;
  text-align: center;
  padding: 30px 20px;
  position: relative;
  z-index: 2;
  margin-top: 8px;
}

header h1 {
  font-size: 2.5em;
  margin: 0;
  animation: simpleFade 0.8s ease-in-out;
}

header p {
  font-size: 1.2em;
  color: darkgray;
  margin: 10px 0 0;
  animation: simpleFade 1.4s ease-in-out;
}

/* Navbar */
nav {
  background-color: blue;
  display: flex;
  overflow-x: auto;
  justify-content: space-around;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 0px 0;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

nav a {
  color: lightgray;
  padding: 10px 15px;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: bold;
  transition: color 0.3s ease, background-color 0.3s ease;
}

nav a:hover {
  background-color: #fff;
  color: blue;
}

/* Futuristic Timer Display */
#timer {
  background: linear-gradient(45deg, #2a2a72, #009ffd);
  display: block;
  color: white;
  font-size: 13px;
  font-family: 'Orbitron', sans-serif;
  font-weight: bold;
  padding: 15px 30px;
  text-align: center;
  position: sticky;
  top: 40px;
  z-index: 10;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
  animation: glow 1s infinite alternate;
}

@keyframes glow {
  0% { text-shadow: 0 0 5px #00f, 0 0 10px #00f, 0 0 20px #00f; }
  100% { text-shadow: 0 0 20px #00f, 0 0 30px #00f, 0 0 40px #00f; }
}

@keyframes scrollIn {
  0% { transform: translateY(-50px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Content Sections */
.content {
  display: flex;
  flex-direction: column;
  padding-top: 80px;
}

.section {
  flex: 0 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
  opacity: 0;
  animation: fadeInContent 0.6s ease-in-out forwards;
}

.section h2 {
  color: #00509e;
  margin-bottom: 20px;
  text-align: center;
}

/* Player Box Styles */  
.player {  
    background: rgba(64, 64, 64, 0.3);  
    backdrop-filter: (10px);  
    border: 1px solid rgba(255, 255, 255, 0.1);  
    border-radius: 16px;  
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);  
    padding: 20px;  
    width:50%;
    text-align: center;  
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;  
    cursor: pointer;  
    position: relative;  
    overflow: hidden;  
    margin-bottom: 20px;  
    color: #fff;  
}  
  
/* Hover Effect for Player Box */  
.player:hover {  
    transform: scale(1.02);  
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);  
    background: rgba(64, 60, 64, 0.8);  
}  
 .notch-info {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0px auto 0px auto;
    width: 220px;
    position: sticky;
    top: 85px; /* Place just below the timer */
    height: 40px;
    background: linear-gradient(45deg, #3c3ca7, #046ba7);
    border-radius: 0px 0px 40px 40px;
    box-shadow: 0 3px 8px rgb(8, 2, 2);
    color: white;
    font-size: 1.1em;
    font-weight: 500;
    letter-spacing: 1px;
    z-index: 11; /* Above content, below nav */
}
/* Toggle Button Styles */  
.toggle-stats {  
    background-color: #4CAF50; /* Green background */  
    color: white; /* White text */  
    border: none;  
    padding: 5px 10px;  
    cursor: pointer;  
    margin-top: 10px;  
    border-radius: 4px;  
    transition: background-color 0.3s ease;  
}  
  
.toggle-stats:hover {  
    background-color: #45a049; /* Darker green on hover */  
}  
  
/* Stats Box Styles */  
.stats {  
    max-height: 0;  
    opacity: 0;  
    overflow: hidden;  
    transition: max-height 0.5s ease, opacity 0.5s ease, padding 0.5s ease;  
    background-color: rgba(0, 0, 0, 0.3);  
    border-radius: 8px;  
    margin-top: 10px;  
    padding: 0 10px;  
    color: #fff;  
}  
  
/* Stats Visible State */  
.stats-visible {  
    max-height: 200px; /* Adjust based on content */  
    opacity: 1;  
    padding: 10px; /* Add padding when visible */  
}  

/* Match History */
.matchhistory {
  background: rgba(255, 245, 250, 0.3);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #ddd;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeInScoreboard 1s ease-in-out forwards;
}

.matchhistory table {
  width: 100%;
  border-collapse: collapse;
  color: red;
  table-layout: fixed;
  
}

.matchhistory th,
.matchhistory td {
  padding: 3px;
  border: 1px solid black;
  overflow: hidden;
  
  
}

.matchhistory th {
  background-color: red;
  color: black;
}

/* Schedule */
.schedule-wrapper {
  overflow-x: auto;
  width: 100%;
}

.schedule {
  background: rgba(240, 255, 255, 0.3);
  padding: 5px;
  border-radius: 8px;
  border: 1px solid #bbb;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeInScoreboard 1s ease-in-out forwards;
}

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

.schedule th,
.schedule td {
  padding: 5px 10px;
  border: 1px solid black;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-word;
  max-width: 126px;
}

.schedule th {
  background-color: blue;
  color: white;
}

/* Expand button */
.expand-btn {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: blue;
  cursor: pointer;
  font-size: 0.9em;
  padding: 0;
  margin: 0;
}

.schedule table tr.overflow td:first-child .expand-btn {
  display: inline-block;
}

.schedule table tr.expanded td {
  white-space: normal;
  overflow: hidden;
  word-wrap: break-word;
}

/* Mobile-friendly schedule */
@media screen and (max-width: 768px) {
  .schedule table,
  .schedule thead,
  .schedule tbody,
  .schedule th,
  .schedule td,
  .schedule tr {
    display: block;
    width: 100%;
  }

  .schedule tr {
    margin-bottom: 15px;
    border-bottom: 2px solid #ccc;
    padding: 10px 0;
    position: relative;
  }

  .schedule td {
    padding-left: 60%;
    position: relative;
    white-space: normal;
    word-break: break-word;
  }

  .schedule td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    top: 8px;
    font-weight: bold;
    color: #00509e;
    width: 100%;
    white-space: normal;
  }

  .schedule thead {
    display: none;
  }

  .expand-btn {
    top: 5px;
    right: 5px;
    font-size: 0.9em;
  }
}

/* Footer */
footer {
  text-align: center;
  background-color: #00509e;
  color: white;
  padding: 5px;
}

/* Animations */
@keyframes simpleFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInContent {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInScoreboard {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}