/* Estilos base */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 15px;
}

h1, h2 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 20px;
}

/* Tabs */
.tabs {
  display: flex;
  margin-bottom: 15px;
  gap: 5px;
}

.tab {
  flex: 1;
  padding: 12px 5px;
  background: #ecf0f1;
  border: none;
  cursor: pointer;
  font-weight: bold;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.tab:hover {
  background: #d6eaf8;
}

.tab.active {
  background: #3498db;
  color: white;
}

.tab-content {
  display: none;
  background: white;
  padding: 15px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.tab-content.active {
  display: block;
}

/* Formularios */
form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

input, select {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  flex: 1 1 200px;
}

input:focus, select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52,152,219,0.2);
}

button[type="submit"] {
  padding: 12px 15px;
  background: #2ecc71;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  flex: 1 1 100%;
  transition: background 0.3s;
}

button[type="submit"]:hover {
  background: #27ae60;
}

/* Lista de objetivos */
ul {
  list-style: none;
  padding: 0;
}

li {
  padding: 12px;
  background: #f9f9f9;
  margin-bottom: 8px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  word-break: break-word;
  transition: all 0.3s ease;
}

li.completed {
  opacity: 0.7;
  text-decoration: line-through;
  background: #e8f8f5;
}

li:hover {
  background: #f0f0f0;
}

.goal-content {
  flex: 1;
}

.goal-text {
  display: block;
  margin-bottom: 5px;
}

.goal-date {
  font-size: 0.8em;
  color: #7f8c8d;
  display: block;
}

.goal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Checkbox personalizado */
.checkbox-container {
  display: inline-block;
  position: relative;
  padding-left: 25px;
  margin-right: 10px;
  cursor: pointer;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 18px;
  width: 18px;
  background-color: #eee;
  border-radius: 3px;
  transition: all 0.3s;
}

.checkbox-container:hover input ~ .checkmark {
  background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
  background-color: #2ecc71;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

/* Botones */
button {
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

button:hover {
  opacity: 0.9;
}

.eliminar-btn {
  background: #e74c3c;
  color: white;
}

.eliminar-btn:hover {
  background: #c0392b;
}

.logout-btn {
  background: #34495e;
  color: white;
  margin: 10px auto;
  display: block;
  padding: 10px 15px;
}

.logout-btn:hover {
  background: #2c3e50;
}

/* Auth Container */
#auth-container {
  max-width: 400px;
  margin: 50px auto;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  text-align: center;
}

#auth-container input {
  width: 100%;
  margin: 10px 0;
  padding: 12px;
  border-radius: 4px;
  border: 1px solid #ddd;
}

#auth-container button {
  width: 100%;
  padding: 12px;
  margin: 5px 0;
  border-radius: 4px;
}

#google-login {
  background: #4285F4;
  color: white;
}

#google-login:hover {
  background: #357ABD;
}

/* Mensajes de error */
.form-error, #auth-error {
  color: #e74c3c;
  margin: 10px 0;
  font-size: 0.9em;
  width: 100%;
}

/* Loading spinner */
.loading {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  
  .tabs {
    flex-direction: column;
  }

  form {
    flex-direction: column;
  }

  input, select, button[type="submit"] {
    width: 100%;
    flex: 1 1 auto;
    border-radius: 4px !important;
  }

  .form-progress {
    display: flex;
    justify-content: center;
    margin: 15px 0;
  }

  .progress-step {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    margin: 0 5px;
    transition: all 0.3s;
  }

  .progress-step.active {
    background: #3498db;
    transform: scale(1.2);
  }
  
  .goal-actions {
    flex-direction: column;
    align-items: flex-end;
  }
}

/* Animaciones */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.goal-item {
  animation: fadeIn 0.3s ease-out;
}
