/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Roboto:wght@300;400&display=swap');

body {
  background-color: #000;
  color: aliceblue;
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  text-align: center;
}

/* =================
   Header Styles
   ================= */

header {
  padding: 25px 15px;
  margin-bottom: 20px;
}

h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 3.5rem;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin: 0;
  text-shadow: 
    0 0 5px rgba(0, 255, 255, 0.5), 
    0 0 10px rgba(0, 255, 255, 0.3), 
    0 0 15px rgba(0, 255, 255, 0.2);
}

#day, #todayDate {
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
  color: #b0c4de;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.8;
}

#day {
  margin-top: 15px;
  margin-bottom: 5px;
}

#todayDate {
  margin-top: 5px;
}


/* =================
   Quote Box
   ================= */

.quote-box {
  max-width: 80%;
  margin: 40px auto;
  padding: 30px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.15);
  color: #0ff;
  position: relative;
  text-align: center;
}

.quote-box p {
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.6;
  font-family: 'Georgia', serif;
  margin: 0;
}

.quote-icon {
  position: absolute;
  top: -25px;
  left: 20px;
  font-size: 5rem;
  color: rgba(0, 255, 255, 0.3);
  font-family: serif;
}


/* =================
   Aspects & Progress
   ================= */

.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 20px;
}

.asp_box {
  flex: 1 1 250px;
  max-width: 400px;
  background-color: #111;
  border-radius: 15px;
  padding: 15px;
  box-shadow: 0 0 15px rgba(0,255,255,0.3);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.asp_box:hover {
  transform: translateY(-5px);
}

.asp_box img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}
.progress-section {
  width: 65%;
  margin: 0 auto;
  padding: 20px 0;
}

.neon-text {
  font-size: 24px;
  font-family: 'Orbitron', system-ui;
  color: #0ff;
  text-shadow:0 0 5px #245ff7, 0 0 11px #245ff7, 0 0 12px #245ff7, 0 0 15px #245ff7 ;
  margin-bottom: 10px;
}

.progress-bar {
  background: linear-gradient(90deg, #0ff, #09f);
  height: 100%;
  text-align: right;
  padding-right: 10px;
  color: #fff;
  font-weight: bold;
  line-height: 24px;
  transition: width 0.6s ease;
  width: 0;
}

.progress-label {
  text-align: left;
  font-size: 16px;
  color: #0ff;
  margin-top: 10px;
  margin-bottom: 5px;
  font-weight: bold;
  text-transform: uppercase;
}
.progress {
  background-color: #333;
  border-radius: 20px;
  overflow: hidden;
  height: 24px;
  margin-top: 15px;
  box-shadow: inset 0 0 5px #000;
}


/* =================
   Chart Section
   ================= */
.chart-section {
  width: 70%;
  margin: 40px auto;
  background: #111;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
}


/* ==================================
   Task Input Section
   ================================== */

.task-input-section {
  width: 80%;
  max-width: 800px;
  margin: 50px auto;
  padding: 30px 40px;
  background: #0d0d0d;
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 15px;
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.1);
}

#taskForm {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

#taskForm input[type="text"], 
#taskForm select {
  background-color: #1a1a1a;
  border: 1px solid #444;
  color: #e0e0e0;
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 1rem;
  flex-grow: 1;
  min-width: 150px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#taskForm input[type="text"]::placeholder {
  color: #777;
}

#taskForm input[type="text"]:focus, 
#taskForm select:focus {
  outline: none;
  border-color: #0ff;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

#taskForm button {
  background: linear-gradient(90deg, #09f, #0ff);
  color: #000;
  font-weight: bold;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 12px 30px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

#taskForm button:hover {
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
  transform: translateY(-2px);
}


/* ==================================
   Task Popup
   ================================== */

.popup {
  display: none;
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.popup-content {
  background: #1a1a1a;
  margin: 10% auto;
  padding: 25px 35px;
  border-radius: 15px;
  border: 1px solid rgba(0, 255, 255, 0.3);
  width: 90%;
  max-width: 650px;
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
  position: relative;
  text-align: center;
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2.5rem;
  color: #777;
  cursor: pointer;
  transition: color 0.3s;
}
.close:hover {
  color: #fff;
}

#popupTitle {
  font-family: 'Orbitron', sans-serif;
  color: #0ff;
  font-size: 1.8rem;
  margin-top: 10px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.popup-completion-rate {
  color: #fff;
  background: #2a2a2a;
  display: inline-block;
  padding: 5px 15px;
  border-radius: 20px;
  margin: 0 auto 25px auto;
  font-weight: bold;
  font-size: 0.9rem;
  border: 1px solid #444;
}

#taskList {
  text-align: left;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 15px;
}

.task-item-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  margin-bottom: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid #333;
  transition: background-color 0.3s, border-color 0.3s;
}
.task-item-container:hover {
  background-color: rgba(0, 255, 255, 0.05);
  border-color: rgba(0, 255, 255, 0.2);
}

.task-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 1.1rem;
  color: #ddd;
  flex-grow: 1;
  margin-right: 15px;
}

.task-label input[type="checkbox"] {
  margin-right: 15px;
  transform: scale(1.3);
  cursor: pointer;
  accent-color: #0ff;
}

.task-label input[type="checkbox"]:checked + span {
  text-decoration: line-through;
  color: #888;
}

.start-task-btn {
    background: transparent;
    border: 1px solid #0ff;
    color: #0ff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
    flex-shrink: 0;
}
.start-task-btn:hover {
    color: #000;
    background: #0ff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* ==================================
   Authentication Section Styles
   ================================== */

#authContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 20;
}

#loginForm,
#signupForm {
  width: 90%;
  max-width: 400px;
  padding: 40px;
  background: #0d0d0d;
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 15px;
  box-shadow: 0 0 35px rgba(0, 255, 255, 0.15);
  text-align: center;
}

#authContainer h3 {
  font-family: 'Orbitron', sans-serif;
  color: #0ff;
  font-size: 1.8rem;
  margin-top: 0;
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow:
    0 0 5px rgba(0, 255, 255, 0.6),
    0 0 10px rgba(0, 255, 255, 0.4);
}

#authContainer input[type="email"],
#authContainer input[type="password"] {
  width: 100%;
  padding: 15px;
  margin-bottom: 20px;
  background-color: #1a1a1a;
  border: 1px solid #444;
  color: #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#authContainer input::placeholder {
  color: #666;
}

#authContainer input:focus {
  outline: none;
  border-color: #0ff;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

#authContainer button {
  width: 100%;
  padding: 15px;
  background: linear-gradient(90deg, #0077ff, #00e5ff);
  color: #000;
  font-weight: bold;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

#authContainer button:hover {
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.6);
  transform: translateY(-3px);
}

#signupForm {
  display: none;
}

.form-switcher {
  margin-top: 25px;
  font-size: 0.9rem;
  color: #aaa;
}

.form-switcher span {
  color: #00e5ff;
  font-weight: bold;
  cursor: pointer;
  text-decoration: underline;
}

/* ==================================
   Header Buttons
   ================================== */
.header-buttons {
  display: flex;
  justify-content: center;
  gap: 15px; /* Adds space between buttons */
  margin: 20px 0;
}

#profileButton, #logoutButton {
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: 1px solid;
    font-size: 0.9rem;
}

#profileButton {
    background: rgba(0, 255, 255, 0.1);
    border-color: rgba(0, 255, 255, 0.3);
    color: #0ff;
}

#profileButton:hover {
    background: #0ff;
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

#logoutButton {
    background: rgba(255, 107, 107, 0.15);
    border-color: #ff6b6b;
    color: #ff6b6b;
}

#logoutButton:hover {
    background: #ff6b6b;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.5);
}


/* ==================================
   Profile Page Styles
   ================================== */
#profilePage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.profile-container {
  width: 100%;
  max-width: 600px;
  background: #111;
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.1);
  max-height: 90vh;
  overflow-y: auto;
}

.profile-container h2 {
  font-family: 'Orbitron', sans-serif;
  color: #0ff;
  margin-top: 0;
}

.profile-emoji-container {
  margin-bottom: 20px;
}

.emoji-display {
  font-size: 80px;
  line-height: 1;
  padding: 15px;
  background-color: rgba(0, 255, 255, 0.1);
  border-radius: 50%;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px auto;
  border: 4px solid #0ff;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.profile-emoji-container p {
  color: #b0c4de;
  font-weight: bold;
}

.emoji-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 350px;
  margin: 0 auto;
  padding-top: 10px;
}

.emoji-option {
  font-size: 32px;
  cursor: pointer;
  padding: 5px;
  border-radius: 8px;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.emoji-option:hover {
  transform: scale(1.2);
}

.emoji-option.selected {
  background-color: rgba(0, 255, 255, 0.3);
}

.profile-details {
  margin-bottom: 25px;
}

.profile-details label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #b0c4de;
  text-align: left;
}

.profile-details input {
  width: 100%;
  padding: 12px;
  background-color: #1a1a1a;
  border: 1px solid #444;
  color: #e0e0e0;
  border-radius: 8px;
  box-sizing: border-box;
}

#monthlyStats {
  background: rgba(0, 0, 0, 0.2);
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 25px;
  border: 1px solid #333;
}

.profile-actions button {
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

#saveProfileButton {
  background: linear-gradient(90deg, #09f, #0ff);
  color: #000;
  margin-right: 10px;
}

.profile-actions button.secondary {
  background: #333;
  color: #fff;
}


/* ==================================
   Tomorrow's Tasks Slider
   ================================== */
.tomorrow-tasks-section {
  width: 85%;
  max-width: 1200px;
  margin: 60px auto;
  padding: 30px 40px;
  background: #0d0d0d;
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 15px;
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.1);
}

.slider-container {
  position: relative;
  display: flex;
  align-items: center;
}

.tasks-slider-wrapper {
  flex-grow: 1;
  overflow: hidden;
}

.tasks-slider {
  display: flex;
  gap: 20px;
  padding: 20px 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.tasks-slider::-webkit-scrollbar {
  display: none;
}

.task-card {
  flex: 0 0 280px;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
}
.task-card:hover {
  transform: translateY(-5px);
  border-color: #0ff;
}

.task-card-aspect {
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
  color: #0ff;
  margin-bottom: 10px;
  opacity: 0.7;
}

.task-card-text {
  font-size: 1.1rem;
  color: #e0e0e0;
  margin-bottom: 20px;
  flex-grow: 1;
  line-height: 1.5;
}

.delete-task-btn {
  background: rgba(255, 107, 107, 0.15);
  border: 1px solid #ff6b6b;
  color: #ff6b6b;
  padding: 8px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  align-self: flex-end;
}
.delete-task-btn:hover {
  background: #ff6b6b;
  color: #000;
  box-shadow: 0 0 15px rgba(255, 107, 107, 0.5);
}

.slider-nav-btn {
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 255, 0.3);
  color: #0ff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  cursor: pointer;
  z-index: 5;
  transition: all 0.3s ease;
}
.slider-nav-btn:hover {
  background: #0ff;
  color: #000;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}
#sliderPrevBtn {
  margin-right: 10px;
}
#sliderNextBtn {
  margin-left: 10px;
}


/* =================
   Focus Mode Page
   ================= */

#focusModePage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #fff;
  animation: fadeIn 0.5s ease;
}

.focus-container {
  text-align: center;
  border: 2px solid #0ff;
  padding: 40px 60px;
  border-radius: 20px;
  background: rgba(10, 10, 10, 0.8);
  box-shadow: 0 0 50px rgba(0, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

#focusStatus {
  font-size: 1.5rem;
  font-weight: bold;
  color: #0ff;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
}

#focusTaskTitle {
  font-size: 2.5rem;
  margin: 15px 0;
  font-family: 'Roboto', sans-serif;
  max-width: 600px;
}

#focusSessionCount {
  font-size: 1.2rem;
  color: #b0c4de;
  margin-bottom: 30px;
}

#focusTimerDisplay {
  font-family: 'Orbitron', sans-serif;
  font-size: 8rem;
  font-weight: 700;
  color: #0ff;
  text-shadow: 0 0 25px rgba(0, 255, 255, 0.7);
  margin-bottom: 40px;
  /* SOLUCIÓN 2: Esta propiedad asegura que todos los números ocupen el mismo espacio. */
  font-variant-numeric: tabular-nums;
}

.focus-controls {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.focus-controls button {
  padding: 15px 35px;
  font-size: 1rem;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 10px;
  border: 2px solid;
  cursor: pointer;
  transition: all 0.3s ease;
}

#focusPlayPauseButton, #focusStartNextButton {
  background-color: #0ff;
  border-color: #0ff;
  color: #000;
}
#focusPlayPauseButton:hover, #focusStartNextButton:hover {
  background-color: #fff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

#focusExitButton {
  background-color: transparent;
  border-color: #ff6b6b;
  color: #ff6b6b;
}
#focusExitButton:hover {
  background-color: #ff6b6b;
  color: #000;
}


/* =================
   Responsive
   ================= */

@media (max-width: 768px) {
  #focusTimerDisplay {
    font-size: 5rem;
  }
  #focusTaskTitle {
    font-size: 1.8rem;
  }
  .focus-container {
    padding: 30px;
    width: 90%;
  }
  .focus-controls {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  h1 {
    font-size: 2.5rem;
  }
  .asp_box {
    width: 90%;
  }
  .chart-section, .progress-section, .task-input-section, .tomorrow-tasks-section {
    width: 90%;
    padding: 20px;
  }
  .popup-content {
    width: 90%;
    margin: 20% auto;
    padding: 20px;
  }
  #authContainer {
    padding: 10px;
  }
  #loginForm, #signupForm {
    padding: 25px;
  }
  .task-card {
    flex: 0 0 220px;
  }
}