@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
}
@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
}

:root {
  --bg-primary: #f4f4f5;
  --bg-card: #ffffff;
  --text-primary: #000000;
  --text-secondary: #71717a;
  --accent: #18181b;
  --border: #e4e4e7;
  --nav-bg: #000000;
  --nav-icon: #ffffff;
  --nav-icon-active: #a1a1aa;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body.dark-mode {
  --bg-primary: #000000;
  --bg-card: #18181b;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --accent: #ffffff;
  --border: #27272a;
  --nav-bg: #27272a;
  --nav-icon: #71717a;
  --nav-icon-active: #ffffff;
  --shadow: 0 4px 6px -1px rgba(255, 255, 255, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: "Montserrat", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
  padding-bottom: 100px; /* Espacio para el navbar */
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* Botones Globales */
.primary-btn {
  background-color: var(--accent);
  color: var(--bg-primary);
  border: none;
  padding: 16px 48px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
  text-align: center;
}
.primary-btn:active {
  transform: scale(0.95);
}

.secondary-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  flex: 1;
  transition: background-color 0.2s;
}
.secondary-btn:hover {
  background-color: var(--border);
}

.danger-btn {
  background-color: transparent;
  color: #ef4444;
  border: 1px solid #ef4444;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.danger-btn:hover {
  background-color: rgba(239, 68, 68, 0.1);
}

.danger-btn-filled {
  background: #ef4444;
  border: 1px solid #ef4444;
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  flex: 1;
  transition: background-color 0.2s;
}

/* Header Global */
.main-header {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-brand {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -1px;
}
.date-display {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Contenedor de Páginas */
.main-page {
  display: none;
  padding: 24px;
  animation: fadeIn 0.4s ease;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}
.main-page.active {
  display: block;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modales Globales */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  opacity: 1;
  transition: opacity 0.3s ease;
}
.modal.hidden {
  opacity: 0;
  pointer-events: none;
}
.modal-content {
  background: var(--bg-card);
  padding: 32px 24px;
  border-radius: 24px;
  max-width: 340px;
  width: 90%;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  transform: scale(1);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal.hidden .modal-content {
  transform: scale(0.95);
}
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.modal-content h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.modal-content p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
  font-size: 0.95rem;
}
