/* 
 * EXCENTRICA - Estilos Base y Reset
 * ==================================
 * Tema oscuro estilo Red Social
 */

/* ===== RESET CSS ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Prevenir ajuste de tamaño de texto en rotación en iOS */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

/* Cuerpo base - Tema Oscuro */
body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* ===== TIPOGRAFÍA ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-4);
}

h1 {
    font-size: var(--font-size-4xl);
}

h2 {
    font-size: var(--font-size-3xl);
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

h5 {
    font-size: var(--font-size-lg);
}

h6 {
    font-size: var(--font-size-base);
}

p {
    margin-bottom: var(--spacing-4);
    color: var(--color-text-secondary);
}

/* ===== ENLACES ===== */
a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* ===== IMÁGENES ===== */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ===== FORMULARIOS ===== */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* Remover estilos de autocompletado */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
select:-webkit-autofill:active {
    -webkit-text-fill-color: #EDE6F2 !important;
    -webkit-box-shadow: 0 0 0px 1000px #0F001D inset !important;
    box-shadow: 0 0 0px 1000px #0F001D inset !important;
    background-color: #0F001D !important;
    color: #EDE6F2 !important;
    transition: background-color 5000s ease-in-out 0s;
    caret-color: #EDE6F2 !important;
}

/* ===== LISTAS ===== */
ul, ol {
    list-style: none;
}

/* ===== TABLAS ===== */
table {
    border-collapse: collapse;
    width: 100%;
}

/* ===== OTROS ===== */
hr {
    border: none;
    border-top: var(--border-width-thin) solid var(--color-border);
    margin: var(--spacing-8) 0;
}

blockquote {
    border-left: var(--border-width-thick) solid var(--color-primary);
    padding-left: var(--spacing-4);
    margin: var(--spacing-4) 0;
    font-style: italic;
    color: var(--color-text-secondary);
}

code {
    font-family: 'Fira Code', 'Consolas', monospace;
    background-color: var(--color-gray-100);
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
}

pre {
    background-color: var(--color-gray-800);
    color: var(--color-gray-100);
    padding: var(--spacing-4);
    border-radius: var(--border-radius-lg);
    overflow-x: auto;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ===== SELECCIÓN DE TEXTO ===== */
::selection {
    background-color: var(--color-primary-200);
    color: var(--color-primary-900);
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ===== SCROLL ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-400);
    border-radius: var(--border-radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-500);
}

/* ===== CLASES DE UTILIDAD PARA ACCESIBILIDAD ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-2) var(--spacing-4);
    z-index: var(--z-tooltip);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
}
