/* colours */
:root {
  --primary: #4072BB;
  --accent: #2589CC;
  --background-color: ##F8F9F0;
  --text-color: #FFF;
  --text-color2: #374151;
  --button-color: #0097CE;
}

/* fonts */

.roboto-<uniquifier> {
  font-family: "Roboto", sans-serif;
  font-optical-sizing: auto;
  font-weight: <weight>;
  font-style: normal;
  font-variation-settings:
    "wdth" 100;
}

.lilita-one-regular {
  font-family: "Lilita One", sans-serif;
  font-weight: 400;
  font-style: normal;
}


/* General styling */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: var(--text-color);
  background-color: var(--background-color);
  font-family: "roboto", sans-serif;
}






/* streak styling */
.streak-container {
  width: calc(100% - 20px);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  background: linear-gradient(230deg, var(--primary), var(--accent));
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  text-align: center;
  margin: 10px;
  border-radius: 15px;
  font-family: 'Lilita One';
  position: relative;
  z-index: 1000;
}

.streak-main {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.streak-logo {
  display: flex;
  flex-direction: column;
}

.streak-number {
  font-size: 70px;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.streak-text {
  font-size: 43.5px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.fire {
  width: 40px;
  height: 40px;
}

h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
}





/* close button */
.close-button {
  position: relative;
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  margin-right: 30px;
}

.close-button img {
  width: 40px;
}




/* Water animation canvas */
canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#progress {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 40px;
  font-weight: bold;
  color: var(--primary);
  z-index: 10;
}




/* Navbar styling */
.navbar {
  position: fixed;
  bottom: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--accent);
}

.navbar-section {
  flex: 1;
  display: flex;
  justify-content: center;
}


.navbar .middle {
  background-color: var(--primary);
  border-radius: 15px;
  padding: 10px 0;
}

.navbar img {
  width: 35px;
  height: 35px;
  padding: 7px;
}





/* Calendar styling */
.calendar-container {
  overflow-x: auto;
  margin: 10px;
  margin-top: 120px;
}

.calendar {
  width: 100%;
  border-collapse: collapse;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;

}

.calendar th,
.calendar td {
  border: 1px solid #ccc;
  padding: 6px;
  width: 14.2%;
  vertical-align: top;
  height: 70px;
  font-size: 0.8rem;
}

.calendar th {
  background: var(--accent);
  font-size: 0.9rem;
  text-align: center;
  vertical-align: middle;
  height: 50px;
}

.calendar td input {
  margin-top: 4px;
  width: 95%;
  padding: 4px;
  font-size: 0.75rem;
  text-align: center;
  box-sizing: border-box;
  border: 1px solid #aaa;
  border-radius: 4px;
}

/*Mobile phone responsive design*/
@media (max-width: 600px) {
  h1 {
    font-size: 1.1rem;
  }



  .calendar th,
  .calendar td {
    padding: 4px;
    height: 60px;
    font-size: 0.9rem;
  }

  .calendar td input {
    font-size: 0.9rem;
    padding: 3px;
  }
}


/* Settings styling */
.settings-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-top: 10px;
  margin: 10px;
}

.settings-panel h1 {
  font-size: 40px;
  color: var(--text-color2);
  margin: 0;
  padding: 0 10px;
}

.inputs{
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.input-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  
}

.input-label {
  font-size: 23px;
  font-weight: 600;
  color: var(--text-color2);
}
.input-field {
  padding: 0.75rem 1rem;
  border: 1px solid #2589CC;
  border-radius: 0.5rem;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  outline: none;
  font-size: 1.3rem;
}
.input-field:focus {
  border-color: #2589CC;
  box-shadow: 0 0 0 3px rgba(34, 97, 194, 0.5);
}

.ok-button {
  width: 100%;
  margin-top: 2rem;
  background-color: #0097CE;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}
.ok-button:hover {
  background-color: #016FB9;
  transform: scale(1.02);
}

.goal-display {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 1.85rem;
  color: #374151;
}

.goal-text {
  font-weight: 700;
  color: #0097CE;
}

.error-text {
  font-weight: 700;
  color: #ef4444; 
}

.water-goal-text {
  color: var(--text-color2);
  font-size: 20px;
  line-height: 1.4;            
  margin-bottom: 20px;
}

.water-goal-text .highlight {
  font-weight: 600;
  color: var(--primary);
  padding: 2px 6px;            /* subtle "tag" effect */
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.05); /* faint background highlight */
}

/* Bottom bar */
.clear-bar {
  margin-top: auto;
  width: 100%;
  background-color: #f3f4f6;
  border-top: 1px solid #d1d5db;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  box-sizing: border-box;
  height: 80px;
}

.clear-bar span {
  font-size: 18px;
  color: #374151;
}

.clear-button {
  background-color: #ef4444;
  color: #ffffff;
  font-size: 20px;
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.clear-button:hover {
  background-color: #dc2626;
}

.modal {
  display: none; /* hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  padding: 20px;
  width: 80%;
  max-width: 400px;
  border-radius: 12px;
  text-align: center;
  color: #374151;
}

.modal-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.yes-button {
  background-color: #ef4444;
  color: white;
  font-size: 16px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 48%;
}

.no-button {
  background-color: #9ca3af;
  color: white;
  font-size: 16px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 48%;
}

.yes-button:hover {
  background-color: #dc2626;
}

.no-button:hover {
  background-color: #6b7280;
}



/* water buttons */
.content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.water-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 10px;
}

.water-btn {
  flex: 1 1 40%;
  min-width: 100px;
  padding: 15px;
  font-size: 18px;
  border: none;
  border-radius: 12px;
  background: var(--button-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.water-btn img {
  width: 100px;
  height: 100px;
  margin-bottom: 10px
}

.water-btn:hover {
  background-color: var(--primary);
}

.divider {
  width: 100%;
  border-radius: 2.5px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  color: var(--text-color2);
  font-weight: 600

}

.divider div {
  width: 100%;
  height: 5px;
  background-color: var(--accent);
  border-radius: 2.5px;
  margin: 0 10px;
}



/* numpad styling */
.water-numpad-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: calc(100% - 20px);
  margin: 10px;
  height: 100%;
  padding-bottom: 10px;
}

#waterAmount {
  width: 100%;
  font-size: 20px;
  text-align: center;
  padding: 10px 0;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 1fr); /* change this */
  gap: 10px;
  width: 100%;
  height: 100%; /* make grid fill container */
}

.numpad button {
  width: 100%;
  height: 100%; /* make buttons fill their grid cell */
  font-size: 20px;
  border-radius: 12px;
  border: none;
  background-color: var(--button-color);
  color: var(--text-color);
  cursor: pointer;
  min-height: 40px;
}


.numpad button:active {
  background-color: var(--accent);
}








@media (max-height: 850px) {
  body {
    overflow-y: auto;   /* allow vertical scrolling */
    -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
  }