/* ========================================
   CSS RESET & BASE STYLES
   Reset cross-browser e stili di base
   ======================================== */

/* Box Sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Root Element */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Body */
body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Typography Reset */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    padding: 0;
    font-family: var(--font-heading);
    font-weight: var(--font-bold);
    line-height: 1.2;
}

p {
    margin: 0;
    padding: 0;
}

/* Link Reset */
a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-color);
}

/* List Reset */
ul, ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Image Reset */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Button Reset */
button {
    font-family: inherit;
    font-size: inherit;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    transition: all var(--transition-fast);
}

button:focus {
    outline: none;
}

/* Input Reset */
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    border: none;
    background: none;
    outline: none;
}

/* Table Reset */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Form Element Reset */
fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

legend {
    padding: 0;
}

/* Remove default button styles */
button::-moz-focus-inner,
input::-moz-focus-inner {
    border: 0;
    padding: 0;
}

/* Selection */
::selection {
    background-color: var(--primary-color);
    color: var(--bg-primary);
}

::-moz-selection {
    background-color: var(--primary-color);
    color: var(--bg-primary);
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--radius-sm);
}

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

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-secondary);
}
