
/* =========================================
   CSS MAIN - Base Styles, Variables & Resets
   ========================================= */

/* --- CSS Variables (Light Mode Default) --- */
:root {
    /* Background & Foreground */
    --background: 0 0% 100%;
    --foreground: 240 10% 3.9%;

    /* Primary & Secondary */
    --primary: 240 5.9% 10%;
    --primary-foreground: 0 0% 98%;
    --secondary: 240 4.8% 95.9%;
    --secondary-foreground: 240 5.9% 10%;

    /* Muted & Accent */
    --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 & Border */
    --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 */
    --radius: 0.75rem;
}

/* --- CSS Variables (Dark Mode) --- */
.dark {
    /* Background & Foreground */
    --background: 240 10% 3.9%;
    --foreground: 0 0% 98%;

    /* Primary & Secondary */
    --primary: 0 0% 98%;
    --primary-foreground: 240 5.9% 10%;
    --secondary: 240 3.7% 15.9%;
    --secondary-foreground: 0 0% 98%;

    /* Muted & Accent */
    --muted: 240 3.7% 15.9%;
    --muted-foreground: 240 5% 64.9%;
    --accent: 240 3.7% 15.9%;
    --accent-foreground: 0 0% 98%;

    /* Destructive & Border */
    --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%;
}

/* --- Global Reset & Base Styles --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.5;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- Typography Base --- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

p {
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

/* --- Images & Media --- */
img, 
picture, 
video, 
canvas, 
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* --- Form Elements Base --- */
input, 
button, 
textarea, 
select {
    font: inherit;
    color: inherit;
    background: transparent;
    border: none;
    outline: none;
}

button {
    cursor: pointer;
}

/* --- Utility Classes (Custom) --- */
.text-muted-foreground {
    color: hsl(var(--muted-foreground));
}

.bg-background {
    background-color: hsl(var(--background));
}

.text-foreground {
    color: hsl(var(--foreground));
}

.border-border {
    border-color: hsl(var(--border));
}

.bg-secondary {
    background-color: hsl(var(--secondary));
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: hsl(var(--background));
}

::-webkit-scrollbar-thumb {
    background: hsl(var(--border));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--muted-foreground));
}
