:root {
    /* Neutral colors */
    --neutral-light: #F7F7F7;
    --neutral-dark: #182126;

    /* Accent colors */
    --primary-color: #19DE8B;
    --secondary-color: #5942DC;
    --tertiary-color: #2FE9F9;

    /* Fonts and spacing */
    --primary-font: "Press Start 2P", system-ui, monospace;
    --secondary-font: "Jersey 10", sans-serif;
    --tertiary-font: "Jersey 20", sans-serif;
    --line-height: 1.5;

    --font-small: clamp(0.875rem, 0.8125rem + 0.2vw, 1rem);
    --font-medium: clamp(1rem, 0.9375rem + 0.25vw, 1.125rem);
    --font-large: clamp(1.25rem, 1.125rem + 0.5vw, 1.5rem);
    --font-xl: clamp(1.4rem, 1.2rem + 1vw, 1.8rem);
    --font-xxl: clamp(2rem, 1.75rem + 1.25vw, 2.3rem);
    --font-xxxl: var(--font-xxl);

    /* UI elements */
    --button-padding: 12px 24px;
    --border-radius: 4px;
    --transition-duration: 0.3s;

    /* Accessibility */
    --focus-outline: 4px solid var(--tertiary-color);
    --focus-offset: 4px;
}

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

body {
    background: var(--neutral-dark);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-offset);
}

/* Utility screen reader */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Skip link per accessibilità da tastiera */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--tertiary-color);
    color: var(--neutral-dark);
    padding: 10px 20px;
    text-decoration: none;
    font-family: var(--primary-font);
    font-size: var(--font-small);
    z-index: 9999;
    border-radius: 0 0 8px 8px;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    outline: none;
}

#main-content:focus {
    outline: none;
}

/* bottoni */
.arcade-btn {
    font-family: var(--primary-font);
    color: var(--neutral-light);
    background-color: rgba(0, 0, 0, 0.25);
    border: 0.4cqw solid var(--tertiary-color);
    box-shadow: inset 0 0 0 0.3cqw var(--secondary-color);
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.arcade-btn:hover,
.arcade-btn:focus-visible {
    background-color: rgba(247, 247, 247, 0.12);
    outline: 1px solid var(--primary-color);
    outline-offset: 2px;
}

/* navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0.7rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
}

.logo_piccolo {
    width: 6rem;
    height: 6rem;
    margin-right: 2rem;
    background-image: url('../assets/images/favicon.ico');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-family: var(--primary-font);
    font-size: var(--font-medium);
    text-transform: uppercase;
    transition: color 0.3s;
}

.nav-links a.disabled {
    color: var(--neutral-light);
    opacity: 0.5;
    pointer-events: none; /* Impedisce interazioni del mouse e click */
    cursor: default;
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--neutral-light);
}

/* background stars */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    background-color: #111111;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    opacity: 0.5;
    animation: twinkle var(--duration, 2s) infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}


/* --- Blocco ridimensionamento finestra --- */
.resize-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #952929;
    font-family: var(--primary-font);
    font-size: var(--font-medium);
    line-height: 2;
}

@media screen and (max-width: 1100px), screen and (min-width: 1800px) {
    .resize-warning {
        display: flex;
    }
}