@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 240 10% 3.9%;
  --primary: 240 5.9% 10%;
  --primary-foreground: 0 0% 98%;
  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --accent: 240 4.8% 95.9%;
  --accent-foreground: 240 5.9% 10%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 98%;
  --border: 240 5.9% 90%;
  --input: 240 5.9% 90%;
  --ring: 240 5.9% 10%;
  --radius: 0.5rem;
}

.dark {
  --background: 240 10% 3.9%;
  --foreground: 0 0% 98%;
  --card: 240 10% 3.9%;
  --card-foreground: 0 0% 98%;
  --popover: 240 10% 3.9%;
  --popover-foreground: 0 0% 98%;
  --primary: 0 0% 98%;
  --primary-foreground: 240 5.9% 10%;
  --secondary: 240 3.7% 15.9%;
  --secondary-foreground: 0 0% 98%;
  --muted: 240 3.7% 15.9%;
  --muted-foreground: 240 5% 64.9%;
  --accent: 240 3.7% 15.9%;
  --accent-foreground: 0 0% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 0 0% 98%;
  --border: 240 3.7% 15.9%;
  --input: 240 3.7% 15.9%;
  --ring: 240 4.9% 83.9%;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

.main-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
}

.main-container.is-app-view {
    justify-content: space-between;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: hsl(var(--muted-foreground) / 0.3);
    border-radius: 20px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: hsl(var(--muted-foreground) / 0.5);
}

/* Animations */
@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes resultGlow {
  0% { box-shadow: 0 0 5px hsl(var(--primary) / 0.5); border-color: hsl(var(--primary)); }
  50% { box-shadow: 0 0 15px hsl(var(--primary) / 0.8); border-color: hsl(var(--primary)); }
  100% { box-shadow: none; border-color: transparent; }
}

.result-glow-animate {
    animation: resultGlow 1s ease-out;
}

#content-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    /* Removed backdrop-filter: blur(2px) for performance */
    z-index: 20;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

/* Transitions */
.view-container {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

/* Note Item Styles managed by Tailwind classes in HTML where possible,
   but specific hover effects on children need CSS */
.note-item-actions {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.note-item:hover .note-item-actions {
    opacity: 1;
}

/* Helper for hidden inputs/spinners */
.hidden {
    display: none !important;
}

/* Restored Logo Glow - Adapted for Shadcn Theme */
.logo-glow {
    /* using drop-shadow to avoid edge outlines on rounded images */
    filter: drop-shadow(0 0 15px hsl(var(--primary) / 0.3));
    transition: filter 0.3s ease-in-out;
    border: none !important;
    outline: none !important;
    background-color: transparent !important;
    --tw-ring-color: transparent !important;
}
.logo-glow:hover {
    filter: drop-shadow(0 0 30px hsl(var(--primary) / 0.6));
}

/* Fast-Load CSS Rules */
html.is-logged-in #login-view {
    display: none !important;
}

html.is-logged-in #app-view {
    display: flex !important;
    opacity: 1 !important;
    transform: scale(1) !important;
}

html.is-logged-in .main-container {
    justify-content: space-between !important;
}
