/* Import Roboto font */
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');

/* Reset default margins and paddings */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Visually Hidden (for accessibility) */
.visually-hidden {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: visible;
}

/* Light Theme */
body.light {
  background-color: #c9c9c9; /* Neutral color */
  color: #000000; /* Black text for readability */
}

body.light .task-card {
  background-color: #FFFFFF;
}

body.light .header-button {
  background-color: #9cb1c3; /* Personal Dominance color for buttons */
  color: #000000;
}

/* Dark Theme */
body.dark {
  background-color: #242424; /* Neutral color */
  color: #FFFFFF; /* White text for readability */
}

body.dark .task-card {
  background-color: #f4f4f4;
}

body.dark .header-button {
  background-color: #0d1a26; /* Personal Dominance color for buttons */
  color: #FFFFFF;
}

/* General Styles */
body {
  font-family: 'Roboto', sans-serif;
  transition: background-color 1s; /* Smooth background color transition */
  color: #0d0b0f;
}

.app {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

/* Header Grid */
.header-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 10px;
  align-items: center;
}

/* Header Items */
.header-item {
  font-size: 1em;
}

#totalWorkTime {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  text-align: left;
}

#pointsDisplay {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  text-align: center;
  font-size: 1.5em;
}

#bonusBar {
  height: 100%;
  background-color: #008040; /* Green color for the bar */
  width: 0%;
  transition: width linear;
}

#totalPersonalTime {
  grid-column: 3 / 4;
  grid-row: 1 / 2;
  text-align: right;
}

/* Header Buttons */
.header-button {
  padding: 5px 10px;
  border: none;
  cursor: pointer;
  border-radius: 5px;
}

#newGameButton {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
}

#exportButton {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
}

#themeToggle {
  grid-column: 3 / 4;
  grid-row: 2 / 3;
}

/* Current Time Display */
.current-time {
  font-size: 1.2em;
  text-align: center;
  margin-bottom: 10px;
  margin-top: 30px;
}

/* Scoring Display */
.scoring-container {
  margin-bottom: 10px;
}

.scoring-display {
  font-size: 1.2em;
  text-align: center;
  height: 1.5em;
}

/* Streak Timer Bar */
.streak-timer {
  width: 100%;
  height: 5px;
  background-color: #ccc;
  overflow: hidden;
  margin-top: 5px;
}



/* Inactivity Timer Bar */
.inactivity-timer {
  width: 100%;
  height: 5px;
  background-color: #ccc;
  overflow: hidden;
  margin-top: 5px;
}

.inactivity-bar {
  height: 100%;
  background-color: #b64949; /* Pink color for the bar */
  width: 0%;
  transition: width linear;
}

.stopwatch {
  font-size: 2.5em;
  margin: 20px 0;
  text-align: center;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.9; }
  100% { opacity: 1; }
}

/* Task Entry Field */
.task-entry-field {
  margin-bottom: 20px;
}

.task-entry-field input {
  width: 100%;
  padding: 10px;
  font-size: 1em;
  text-align: center;
  font-family: 'Roboto', sans-serif;
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* Task Cards Display */
.task-cards-display {
  max-height: 400px;
  text-align: center;
  overflow: visible;
  color: #f1f1f1;
}

.task-card {
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  font-family: 'Roboto', sans-serif;
  border-radius: 5px;
  animation: fadeIn 0.5s;
  position: relative;
}

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

.task-number {
  font-weight: bold;
  color: #0d0b0f;
}

.task-time {
  font-size: 0.9em;
  color: #666;
}

.task-description {
  margin-top: 5px;
  color: #0d0b0f;
}

/* Task Time Taken */
.task-time-taken {
  font-size: 0.9em;
  color: #666;
  margin-top: 5px;
}

/* Task Category Style */
.task-category {
  margin-top: 5px;
  color: #0d0b0f;
}

.category-button {
  padding: 3px 8px;
  font-size: 0.8em;
  font-style: italic;
  margin-right: 5px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  background-color: #e0e0e0;
  color: #000;
}

.category-button.personal {
  background-color: #cdd7e1; /* Personal Dominance color */
}

.category-button.work {
  background-color: #d7bebf; /* Work Dominance color */
}

.category-button.selected-category {
  border: 3px solid #000;
}

.category-button:hover {
  opacity: 0.8;
}

/* Accessibility Focus Styles */
input:focus, button:focus {
  outline: 2px solid #000;
}

/* Achievement Overlay Styles */
.achievement-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(34, 56, 47, 0.7); /* Semi-transparent background */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out;
  z-index: 9999; /* Ensure it appears above other elements */
}

.achievement-overlay.show {
  opacity: 1;
  visibility: visible;
}

.achievement-content {
  background-color: #000;
  padding: 20px 30px;
  border-radius: 10px;
  text-align: center;
  max-width: 80%;
  animation: zoomIn 0.5s ease-in-out;
}

.achievement-content h2 {
  font-size: 2em;
  margin-bottom: 10px;
  color: #FFFFFF;
}

.achievement-content h3 {
  font-size: 1.5em;
  margin-bottom: 10px;
  color: #FFFFFF;
}

.achievement-content p {
  font-size: 1.2em;
  font-style: italic;
  color: #FFFFFF;
}

/* Zoom In Animation */
@keyframes zoomIn {
  from { transform: scale(0.8); }
  to { transform: scale(1); }
}



/* Wave Effect Animation */
@keyframes wave {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  }
  35% {
    transform: scale(1.02);
    box-shadow: 0 0 80px 80px rgba(255, 255, 255, 0);
  }
  75% {
    transform: scale(0.09);
    box-shadow: 0 0 80px 80px rgba(255, 255, 255, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

#app.wave-effect {
  animation: wave 2s ease-out;
}
