/* RULES: No @apply — it does not work with the Tailwind browser build */
/* RULES: Use DaisyUI semantic colors (primary, base-100, etc.) not raw Tailwind colors (blue-500, gray-200) */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&display=swap');

:root {
  --cat-design: oklch(70% 0.22 285);
  --cat-music: oklch(68% 0.22 0);
  --cat-3d: oklch(70% 0.2 150);
  --cat-research: oklch(68% 0.18 215);
  --cat-notes: oklch(75% 0.2 80);
  --cat-custom: oklch(68% 0.15 50);
  --radius-card: 1.25rem;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
}

h1, h2, .display-font {
  font-family: 'Syne', system-ui, sans-serif;
}

/* ── Layout ──────────────────────────────── */

.view {
  min-height: calc(100vh - 4rem);
  padding-bottom: 6rem;
}

@media (min-width: 1024px) {
  .view {
    min-height: 100vh;
    padding-bottom: 2rem;
  }
}
/* ── Home Background + Liquid Glass ──────── */

.home-view {
  position: relative;
  overflow: hidden;
}

.home-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  transition: opacity 1s ease;
  opacity: 0;
}

.home-bg.loaded {
  opacity: 1;
}

.home-glass-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  backdrop-filter: blur(40px) saturate(1.6) brightness(0.35);
  -webkit-backdrop-filter: blur(40px) saturate(1.6) brightness(0.35);
  background: oklch(15% 0.04 260 / 0.55);
}

/* Glass card mixin for cards on the home page */
.home-view .stat-card,
.home-view .cat-card,
.home-view .quote-card {
  background: oklch(20% 0.04 260 / 0.45);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid oklch(50% 0.08 270 / 0.2);
  box-shadow: 0 8px 32px oklch(0% 0 0 / 0.3), inset 0 1px 0 oklch(100% 0 0 / 0.06);
}
/* ── Quote Card ───────────────────────────── */

.quote-card {
  background: linear-gradient(135deg, oklch(30% 0.08 270), oklch(22% 0.05 250));
  border: 1px solid oklch(40% 0.1 270 / 0.4);
  border-radius: var(--radius-card);
  position: relative;
  overflow: hidden;
}

.quote-card::before {
  content: '"';
  position: absolute;
  top: -1rem;
  left: 1rem;
  font-family: 'Syne', system-ui, sans-serif;
  font-size: 8rem;
  font-weight: 800;
  color: oklch(60% 0.18 270 / 0.12);
  line-height: 1;
  pointer-events: none;
}

.quote-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, oklch(65% 0.25 275 / 0.15), transparent 70%);
  top: -60px;
  right: -40px;
  pointer-events: none;
}

/* ── Stat Cards ───────────────────────────── */

.stat-card {
  border-radius: var(--radius-card);
  background: oklch(22% 0.04 260);
  border: 1px solid oklch(35% 0.06 265 / 0.5);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
}

/* ── Category Cards ───────────────────────── */

.cat-card {
  border-radius: var(--radius-card);
  background: oklch(20% 0.04 260);
  border: 1px solid oklch(35% 0.06 265 / 0.4);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
}

.cat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--cat-color, oklch(65% 0.2 270));
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: inherit;
}

.cat-card:hover::after {
  opacity: 0.08;
}

.cat-card:hover {
  transform: translateY(-2px);
  border-color: var(--cat-color);
}

.cat-icon-wrap {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: var(--cat-color, oklch(65% 0.2 270));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.cat-icon-wrap svg {
  width: 1.25rem;
  height: 1.25rem;
}

.cat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cat-color, oklch(65% 0.2 270));
  flex-shrink: 0;
}

/* ── Project Cards ────────────────────────── */

.project-card {
  border-radius: var(--radius-card);
  background: oklch(20% 0.04 260);
  border: 1px solid oklch(35% 0.06 265 / 0.4);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: var(--cat-color, oklch(60% 0.15 270));
}

.project-card-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--cat-color, oklch(65% 0.2 270));
  border-radius: 4px 0 0 4px;
}

/* ── Category Pills for Filter ─────────────── */

.cat-pill {
  cursor: pointer;
  border-radius: 9999px;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid oklch(40% 0.08 265 / 0.5);
  background: oklch(22% 0.04 260);
  color: oklch(75% 0.05 260);
  transition: all 0.15s;
  white-space: nowrap;
}

.cat-pill:hover {
  border-color: var(--cat-color, oklch(65% 0.2 270));
  color: var(--cat-color, oklch(65% 0.2 270));
}

.cat-pill.active {
  background: var(--cat-color, oklch(65% 0.2 270));
  border-color: var(--cat-color, oklch(65% 0.2 270));
  color: white;
}

/* ── Status Badge ─────────────────────────── */

.status-not-started { color: oklch(70% 0.03 260); border-color: oklch(50% 0.03 260 / 0.5); }
.status-in-progress { color: oklch(72% 0.18 220); border-color: oklch(60% 0.15 220 / 0.5); background: oklch(60% 0.15 220 / 0.1); }
.status-paused { color: oklch(80% 0.18 70); border-color: oklch(70% 0.15 70 / 0.5); background: oklch(70% 0.15 70 / 0.1); }
.status-done { color: oklch(72% 0.18 150); border-color: oklch(60% 0.15 150 / 0.5); background: oklch(60% 0.15 150 / 0.1); }

/* ── AI Inspiration ───────────────────────── */

.ai-output-box {
  background: oklch(22% 0.05 270);
  border: 1px solid oklch(40% 0.1 270 / 0.4);
  border-radius: 0.875rem;
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: oklch(85% 0.05 270);
}

.prompt-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: oklch(24% 0.05 270);
  border: 1px solid oklch(38% 0.08 270 / 0.3);
  font-size: 0.875rem;
  color: oklch(85% 0.04 270);
  line-height: 1.5;
}

.prompt-number {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--cat-color, oklch(65% 0.2 270));
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Sidebar ──────────────────────────────── */

.sidebar-logo {
  font-family: 'Syne', system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, oklch(75% 0.2 285), oklch(70% 0.2 320));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-cat-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.625rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.15s;
  color: oklch(75% 0.04 260);
}

.sidebar-cat-item:hover {
  background: oklch(30% 0.05 265);
  color: oklch(90% 0.04 260);
}

/* ── Empty State ──────────────────────────── */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  color: oklch(60% 0.04 260);
}

.empty-state svg {
  opacity: 0.3;
  margin-bottom: 1rem;
}

/* ── Modal Customizations ─────────────────── */

.modal-box {
  border-radius: 1.25rem;
  max-height: 90vh;
  overflow-y: auto;
}

/* ── Loading animation ─────────────────────── */

@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.ai-loading {
  animation: pulse-glow 1.5s ease-in-out infinite;
}

/* ── Mobile navbar ─────────────────────────── */

.mobile-header {
  background: oklch(18% 0.035 265);
  border-bottom: 1px solid oklch(30% 0.05 265 / 0.5);
}

/* ── Scrollbar ─────────────────────────────── */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: oklch(40% 0.06 265 / 0.5); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: oklch(55% 0.1 270 / 0.7); }

/* ── Progress ring ─────────────────────────── */
.progress-arc {
  stroke-dasharray: 251.2;
  stroke-dashoffset: 251.2;
  transition: stroke-dashoffset 1s ease;
  stroke-linecap: round;
  transform-origin: center;
  transform: rotate(-90deg);
}

/* ── Toast ──────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 5rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  #toast-container {
    bottom: 1.5rem;
  }
}

/* ── Section header ─────────────────────────── */
.section-title {
  font-family: 'Syne', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: oklch(88% 0.04 265);
  letter-spacing: -0.01em;
}

/* ── Add category modal grid ─────────────────── */
.cat-pick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 0.5rem;
  border-radius: 0.875rem;
  border: 2px solid oklch(35% 0.06 265 / 0.4);
  background: oklch(22% 0.04 260);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.75rem;
  font-weight: 600;
  color: oklch(70% 0.04 260);
  text-align: center;
}

.cat-pick-item:hover {
  border-color: var(--cat-color, oklch(65% 0.2 270));
  background: oklch(24% 0.05 265);
}

.cat-pick-item.selected {
  border-color: var(--cat-color, oklch(65% 0.2 270));
  background: oklch(25% 0.06 268);
  color: oklch(88% 0.05 265);
}

.cat-pick-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  background: var(--cat-color, oklch(65% 0.2 270));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.cat-pick-icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* ── Status selector buttons ──────────────────── */
.status-btn {
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1.5px solid oklch(40% 0.06 265 / 0.5);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
  color: oklch(70% 0.04 260);
}

.status-btn:hover {
  background: oklch(28% 0.05 265);
}

.status-btn.active-not-started { border-color: oklch(60% 0.04 265); color: oklch(75% 0.04 265); background: oklch(28% 0.04 265); }
.status-btn.active-in-progress { border-color: oklch(60% 0.15 220); color: oklch(72% 0.18 220); background: oklch(60% 0.15 220 / 0.12); }
.status-btn.active-paused { border-color: oklch(70% 0.15 70); color: oklch(80% 0.18 70); background: oklch(70% 0.15 70 / 0.12); }
.status-btn.active-done { border-color: oklch(60% 0.15 150); color: oklch(72% 0.18 150); background: oklch(60% 0.15 150 / 0.12); }

/* ── Notes textarea ───────────────────────────── */
.notes-textarea {
  background: oklch(22% 0.04 265);
  border: 1px solid oklch(38% 0.06 265 / 0.5);
  border-radius: 0.75rem;
  padding: 0.75rem;
  color: oklch(85% 0.04 265);
  font-size: 0.875rem;
  line-height: 1.6;
  resize: vertical;
  width: 100%;
  min-height: 100px;
  font-family: 'Inter', system-ui, sans-serif;
  transition: border-color 0.15s;
}

.notes-textarea:focus {
  outline: none;
  border-color: oklch(65% 0.18 275 / 0.7);
}

/* ── Desktop sidebar width ──────────────────── */
.drawer-side > aside {
  min-width: 260px;
}

/* ── Entry Card ───────────────────────────────── */

.entry-card {
  border-radius: 0.875rem;
  background: oklch(22% 0.04 265);
  border: 1px solid oklch(35% 0.06 265 / 0.4);
  padding: 1rem;
}

.entry-card:hover {
  border-color: oklch(45% 0.08 270 / 0.6);
  background: oklch(24% 0.05 268);
}

.entry-date {
  font-size: 0.75rem;
  color: oklch(70% 0.03 265);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Fixed Add Button ──────────────────────────── */

.btn-circle.btn-primary {
  box-shadow: 0 4px 12px oklch(75% 0.2 280 / 0.3);
  transition: all 0.2s;
}

.btn-circle.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px oklch(75% 0.2 280 / 0.4);
}

.btn-circle.btn-primary:active {
  transform: scale(0.95);
}

/* ── Mobile Layout Adjustments ─────────────────── */

@media (max-width: 768px) {
  .view {
    padding-bottom: 8rem;
  }
}

/* ── Table Styling ──────────────────────────────── */

.table {
  background: oklch(20% 0.04 260);
  border: 1px solid oklch(35% 0.06 265 / 0.4);
  border-radius: 0.875rem;
  overflow: hidden;
}

.table thead {
  background: oklch(25% 0.05 268);
  border-bottom: 2px solid oklch(35% 0.06 265 / 0.5);
}

.table thead th {
  color: oklch(75% 0.05 265);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
}

.table tbody tr {
  border-bottom: 1px solid oklch(35% 0.06 265 / 0.3);
}

.table tbody tr:hover {
  background: oklch(22% 0.04 265);
}

.table tbody td {
  padding: 1rem;
  color: oklch(85% 0.04 265);
  border: none;
}

.table.table-zebra tbody tr:nth-child(odd) {
  background: oklch(22% 0.04 265);
}

.table.table-zebra tbody tr:nth-child(even) {
  background: oklch(20% 0.03 260);
}

.table.table-zebra tbody tr:nth-child(even):hover {
  background: oklch(22% 0.04 265);
}
