/* Clock.now — Custom CSS (plain CSS — Tailwind CDN does not process @apply) */

/* Hide Alpine-managed elements before Alpine initialises to prevent flash */
[x-cloak] { display: none !important; }

/* ============ Navigation ============ */
.nav-link {
  color: #d1d5db;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 2px;
  transition: color 0.15s ease, background-color 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.nav-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

.mobile-nav-link {
  display: block;
  color: #d1d5db;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 2px;
  transition: color 0.15s ease;
  text-decoration: none;
}
.mobile-nav-link:hover {
  color: #ffffff;
}

.footer-link {
  color: #9ca3af;
  font-size: 0.875rem;
  transition: color 0.15s ease;
  text-decoration: none;
}
.footer-link:hover {
  color: #e5e7eb;
}

/* ============ Flash Messages ============ */
.flash-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.flash-danger,
.flash-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.flash-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}
.flash-warning {
  background: #fefce8;
  border: 1px solid #fef08a;
  color: #854d0e;
}

/* ============ Tool Cards ============ */
.tool-card {
  background: #ffffff;
  border: 1px solid #f3f4f6;
  border-radius: 4px;
  padding: 1.25rem;
  box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  display: block;
  text-decoration: none;
}
.tool-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  border-color: #7dd3fc;
}

.tool-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.tool-title {
  font-weight: 700;
  color: #111827;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  transition: color 0.15s ease;
}
.tool-card:hover .tool-title {
  color: #0284c7;
}

.tool-desc {
  color: #6b7280;
  font-size: 0.75rem;
  line-height: 1.5;
}

/* ============ Admin Sidebar ============ */
.admin-nav-link {
  display: block;
  color: #d1d5db;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: 2px;
  transition: color 0.15s ease, background-color 0.15s ease;
  text-decoration: none;
}
.admin-nav-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}
.admin-nav-link.active {
  background-color: #0284c7;
  color: #ffffff;
}

/* ============ Hero Clock ============ */
.hero-clock-container {
  position: relative;
  display: inline-block;
}

#hero-clock {
  text-shadow: 0 0 60px rgba(56, 189, 248, 0.2);
  letter-spacing: -0.02em;
}

/* ============ Clock precision rendering ============ */
.live-clock {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ============ Prose Styles for Blog ============ */
.prose h1, .prose h2, .prose h3 {
  font-weight: 700;
  color: #111827;
}
.prose h2 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.prose h3 {
  font-size: 1.125rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}
.prose p {
  color: #4b5563;
  line-height: 1.75;
  margin-bottom: 0.75rem;
}
.prose a {
  color: #0284c7;
  text-decoration: underline;
}
.prose a:hover {
  color: #0369a1;
}
.prose ul, .prose ol {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}
.prose li {
  color: #4b5563;
  margin-bottom: 0.25rem;
}
.prose code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  background: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 2px;
  color: #1f2937;
}
.prose pre {
  background: #111827;
  color: #f3f4f6;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1rem 0;
}
.prose blockquote {
  border-left: 4px solid #38bdf8;
  padding-left: 1rem;
  font-style: italic;
  color: #6b7280;
  margin: 1rem 0;
}

/* ============ Animations ============ */
@keyframes pulse-slow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.animate-pulse-slow {
  animation: pulse-slow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============ Scrollbar (webkit) ============ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ============ Focus rings ============ */
:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

/* ============ Responsive image ============ */
img { max-width: 100%; height: auto; }

/* ============ Navy utilities (Tailwind CDN can't generate these from config) ============ */
.bg-navy-800 { background-color: #0d1224; }
.bg-navy-900 { background-color: #0a0e1a; }
.bg-navy-700 { background-color: #111827; }
.text-navy-800 { color: #0d1224; }

/* ============ Line clamp ============ */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============ SVG Icon sizing helpers ============ */
.icon-xs { width: 0.875rem; height: 0.875rem; }
.icon-sm { width: 1rem;     height: 1rem; }
.icon-md { width: 1.25rem;  height: 1.25rem; }
.icon-lg { width: 1.5rem;   height: 1.5rem; }
.icon-xl { width: 2rem;     height: 2rem; }
.icon-2xl { width: 2.5rem;  height: 2.5rem; }
.icon-3xl { width: 3rem;    height: 3rem; }
