
body {
  background-color: #1c1e2e; /* Dark blue background */
}
/* Dashboard Grid Layout */
.dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  grid-gap: 20px; /* Space between grid items */
  padding: 0px;
  background-color: #1e1f39;
  position: relative;
  z-index: 1;
  width: 100%; /* Use full available width */
      max-width: 1200px; /* Ensure max width for larger screens */
  margin: 0 auto; /* Center the dashboard horizontally */
}

/* Adjust the grid positions */
.chart {
  grid-column: 1 / 2; /* First column */
  grid-row: 1 / 2; /* First row */
}

.bpm {
  grid-column: 2 / 3; /* Second column */
  grid-row: 1 / 2; /* First row */
}

.gauge {
  grid-column: 1 / 2; /* First column */
  grid-row: 2 / 3; /* Second row */
}

.new-box {
  grid-column: 2 / 3; /* Second column */
  grid-row: 2 / 3; /* Second row */
}

.log-table {
  grid-column: 3 / 4; /* Third column */
  grid-row: 1 / 3; /* Span rows 1 and 2 */
}

/* General card style for all sections */
.chart,
.bpm,
.log-table,
.gauge,
.new-box {
  background-color: #2c2e54;
  padding: 20px;
  border-radius: 10px;
  box-sizing: border-box; /* Include padding in width calculations */
  text-align: center;
  position: relative;
  z-index: 2;
}

/* Input Fields and Export Button Styles */
.input-fields,
#export-heart-rate {
  margin-top: 20px;
}

.input-fields {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.field label {
  color: white;
  font-size: 14px;
  margin-top: 5px;
}

.field input {
  width: 80px;
  padding: 5px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #2c2e54;
  color: white;
}

#export-heart-rate {
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  display: block;
  width: auto;
  height: 50px;
  margin: 20px auto;
}

#export-heart-rate:hover {
  background-color: #0056b3;
}

/* Adjust BPM Display */
.bpm h1 {
  font-size: 80px;
  font-weight: 700;
  margin: 0;
  color: white;
}

.bpm h1 span {
  font-size: 20px;
  color: #4caf50;
}

/* HRV and Arrow Indicator Styling */
.hrv-container {
  text-align: left;
  margin-top: 10px;
  font-size: 10px;
}

.hrv-container p {
  margin: 0;
}

.arrow-indicator {
  font-weight: bold;
  font-size: 28px;
  color: red;
  margin-right: 5px;
}

.hrv {
  font-size: 20px;
  color: #08d4fc;
}

.hrv-text {
  font-weight: bold;
  font-size: 14px;
  color: #4caf50;
}

/* Connect and Disconnect Buttons */
.bpm button {
  margin-top: 10px;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  display: block;
  width: 100%;
}

#connect-heart-rate {
  background-color: #4caf50;
  color: white;
}

#disconnect-heart-rate {
  background-color: #ec5844 !important;
  color: white;
}

.bpm button:hover {
  opacity: 0.9;
}

/* Heart Rate Statistics */
.statistics {
  display: flex;
  justify-content: space-around;
  margin-top: 15px;
}

.statistics p {
  font-size: 12px;
  color: lightblue;
  margin: 0 10px;
}

/* Logging Table */
.log-table {
  height: 100%; /* Fill the grid area */
  overflow-y: auto;
}

.log-table table {
  width: 100%;
  border-collapse: collapse;
}

.log-table th,
.log-table td {
  border-bottom: 1px solid #3a3d69;
  padding: 5px;
  text-align: center;
  font-size: 12px;
  color: white;
}

.log-table th {
  font-weight: bold;
  font-size: 14px;
}

/* Gauge Display */
.gauge {
  background-color: #2c2e54;
  padding: 20px;
  border-radius: 10px;
  position: relative;
}

.gauge p {
  font-size: 48px;
  margin-top: 20px;
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
}

/* New Box Styles */
.new-box {
  background-color: #2c2e54;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  position: relative;
}

/* HR-Recovery Display */
.hr-recovery {
  text-align: left;
  margin-bottom: 10px; /* Reduced gap */
}

.hr-recovery p {
  font-size: 22px;
  color: pink;
  font-weight: bold;
}

/* HR Recovery Bar Chart */
#hrRecoveryBarChart {
  width: 100%;
  height: 100px;
}

/* Fatigue Progress Bar */
#fatigueChart {
  width: 100%;
  height: 10px;
  margin-top: 0px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .dashboard {
    grid-template-columns: minmax(200px, 1fr); /* Single column layout on small screens */
    grid-template-rows: auto; /* Flexible row height on small screens */
    justify-items: center; /* Center items horizontally */
  }

  /* Remove grid positions to prevent overlap */
  .chart,
  .bpm,
  .gauge,
  .new-box,
  .log-table {
    grid-column: auto !important; /* Reset grid-column */
    grid-row: auto !important; /* Reset grid-row */
    width: 100%; /* Ensure full width */
    margin-bottom: 20px;
  }

  .log-table {
    width: 100%;
  }

  .bpm h1 {
    font-size: 48px;
  }

  .bpm p {
    font-size: 15px;
  }

  /* Adjust header image */
  header a img {
    display: inline-block;
    width: 80%; /* Scales the logo width to 80% of the container */
    max-width: 600px; /* Ensures it doesn't grow too large on larger screens */
    height: auto; /* Maintains the aspect ratio */
  }
}


/* Body Font */
body {
  font-family: Arial, sans-serif;
}

header {
  text-align: center;
}

.up-arrow {
  color: green; /* Up arrow is green */
  font-size: 15px;
}

.down-arrow {
  color: red; /* Down arrow is red */
  font-size: 15px;
}

/* The Chart titles*/
.chart-title {
  font-size: 24px;
  font-weight: bold;
  color: white;
  text-align: start;
  padding-bottom: 20px;
}


/* Resize the Gauge Chart to 70% */
/* #gaugeChart {
  margin: auto !important;
}
/* Resize the HR Recovery Bar Chart to 70% */
/* #hrRecoveryBarChart {
  margin: auto !important;
} 
 #fatigueChart {
  margin: auto !important;
}
*/
#gaugePercentage {
  color: white;
}
#gaugeZone{
	color: white;
}

.login-button {
    float: right;
    padding: 10px 20px;
    background-color: #4c5eaf; /* Button color */
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

/*---------HRV-CALORIES------------*/
.hrv-calories {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.hrv-left, .calories-right {
    display: flex;
    align-items: center;
}
.hrv-left .hrv, .calories-right #calories-value {
    font-size: 18px;
    font-weight: normal;
    margin: 0 5px;
	color: #08d4fc;
}
.hrv-text, .calories-text {
    font-size: 16px;
    color: #4caf50;
}
.calories-right i {
    color: #ff6f00; /* Optional: Color the fire icon */
    margin: 0 5px;
	font-size: 16px;
}

/* Flame icon with gradient color */
#flame-icon {
  font-size: 16px;
  background: linear-gradient(to bottom, #ff6f00, #ff6f00, #ff6f00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Animated flame icon style */
#flame-icon.pulse {
  font-size: 16px; /* Size during animation */
  background: linear-gradient(to bottom, #ff6f00, #ff6f00, yellow); /* New colors */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent; /* Hide the original color */
  display: inline-block; /* Required for transform */
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

#fatigueChart, .chart-title {
    margin: 0;
    padding: 10;
}
#chartContainer {
  height: 50px; /* Set the desired fixed height for the container */
  width: 100%; /* Responsive width */
  overflow: hidden; /* Prevent overflow if the chart grows */
}

#fatigueChart {
  height: 50px; /* Make the canvas take up the full height of the container */
  width: 100%;
}

#gaugeChartContainer {
  height: 250px; /* Ensure the container has a specific height */
  width: 100%; /* Full width */
  display: flex;
  align-items: center; /* Center vertically */
  justify-content: center; /* Center horizontally */
  overflow: hidden; /* Prevent any overflow issues */
}

#gaugeChart {
  width: 100%;
  height: 100%;
}

/* Remove or modify mobile-specific styling */
@media (max-width: 768px) {
   #chartContainer, #fatigueChart {
      height: 50px; /* Fixed height for mobile */
   }
#gaugeChartContainer {
  height: 250px; /* Ensure the container has a specific height */
  width: 100%; /* Full width */
  display: flex;
  align-items: center; /* Center vertically */
  justify-content: center; /* Center horizontally */
  overflow: hidden; /* Prevent any overflow issues */
}

#gaugeChart {
  width: 100%;
  height: 100%;
}
}
