/* Titoo-inspired Aesthetic Baby Design for Bitácora de Santiago - Ultra Fast & Smooth */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --titoo-bg: #f4f9ff;
  --titoo-card-bg: #ffffff;
  --titoo-pink: #38bdf8;
  --titoo-pink-hover: #0284c7;
  --titoo-pink-light: #e0f2fe;
  --titoo-yellow: #fef08a;
  --titoo-yellow-light: #fefce8;
  --titoo-purple: #c084fc;
  --titoo-purple-light: #f3e8ff;
  --titoo-blue: #38bdf8;
  --titoo-blue-light: #e0f2fe;
  --titoo-mint: #34d399;
  --titoo-mint-light: #ecfdf5;
  --titoo-text-dark: #1e293b;
  --titoo-text-muted: #64748b;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--titoo-bg);
  color: var(--titoo-text-dark);
  letter-spacing: -0.01em;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeSpeed;
}

h1, h2, h3, .font-title {
  font-family: 'Fredoka', cursive, sans-serif;
  letter-spacing: 0.01em;
}

/* Dark Night Theme */
html.dark {
  --titoo-bg: #0f172a;
  --titoo-card-bg: #1e293b;
  --titoo-text-dark: #f8fafc;
  --titoo-text-muted: #94a3b8;
  --titoo-pink-light: #162a3f;
  --titoo-purple-light: #2b1842;
  --titoo-blue-light: #162a3f;
  --titoo-mint-light: #14352b;
}

html.dark body {
  background-color: var(--titoo-bg);
  color: var(--titoo-text-dark);
}

/* Category Circular Action Buttons */
.titoo-cat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  will-change: transform;
  transition: transform 0.15s ease-out;
}

.titoo-cat-btn:hover {
  transform: translateY(-2px);
}

.titoo-cat-btn:active {
  transform: scale(0.94);
}

.titoo-cat-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.15);
  border: 3px solid rgba(255, 255, 255, 0.9);
}

html.dark .titoo-cat-circle {
  border: 3px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

/* Big Interactive Clock Button Widget */
.clock-widget-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7dd3fc, #38bdf8);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  will-change: transform;
  transition: transform 0.15s ease-out;
  border: 4px solid #ffffff;
  position: relative;
}

.clock-widget-circle:hover {
  transform: scale(1.04);
}

.clock-widget-circle:active {
  transform: scale(0.94);
}

/* Pulse Ring Animation */
.clock-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid #38bdf8;
  animation: clockPulse 1.8s ease-out infinite;
}

@keyframes clockPulse {
  0% { transform: scale(0.95); opacity: 0.9; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* Titoo Pill Button with Arrow Circle */
.titoo-btn-pill {
  background-color: var(--titoo-pink);
  color: #ffffff;
  font-family: 'Fredoka', cursive, sans-serif;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
  will-change: transform;
  transition: transform 0.15s ease-out, background-color 0.15s ease-out;
}

.titoo-btn-pill:hover {
  background-color: var(--titoo-pink-hover);
  transform: translateY(-1px);
}

.titoo-btn-pill:active {
  transform: scale(0.95);
}

.titoo-btn-arrow {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--titoo-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* Card Styling */
.titoo-card {
  background-color: var(--titoo-card-bg);
  border-radius: 24px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 18px rgba(186, 230, 253, 0.25);
}

html.dark .titoo-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

/* Pill Badges */
.titoo-badge {
  font-family: 'Fredoka', cursive, sans-serif;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
}

/* Fast Hardware-Accelerated Modal Animations */
.titoo-modal-backdrop {
  background-color: rgba(15, 23, 42, 0.6);
  will-change: opacity;
  animation: fadeIn 0.15s ease-out forwards;
}

.titoo-modal-content {
  will-change: transform, opacity;
  animation: popup 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

@keyframes popup {
  from { transform: scale(0.96) translateY(12px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.4);
  border-radius: 99px;
}
