* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: var(--font);
    /* Smooth color-scheme transitions when toggling dark mode */
    color-scheme: light;
}

[data-theme="dark"] {
    color-scheme: dark;
}

html, body {
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv11', 'ss01', 'ss02';
    transition: background-color var(--duration) var(--ease-out), color var(--duration) var(--ease-out);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 650;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0.5rem 0;
}

::selection {
    background: var(--primary-200);
    color: var(--primary-900);
}

[data-theme="dark"] ::selection {
    background: var(--primary-800);
    color: var(--primary-50);
}

/* Bessere Focus-Visibility (Tastaturnutzer) */
:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
    border-radius: var(--radius-sm);
}

/* Custom Scrollbar (dezent, modern) */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
}

[data-theme="dark"] * {
    scrollbar-color: var(--gray-700) transparent;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--gray-700);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.hidden {
    display: none !important;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.text-secondary {
    color: var(--text-secondary);
}

.screen {
    min-height: 100vh;
}
