/* ===== Slide Presentation – stili condivisi ===== */
/* Font: definire --font-sans e --font-mono in ogni pagina per personalizzare */

:root {
    --bg-dark: #1a1a2e;
    --bg-slide: #16213e;
    --accent: #0f3460;
    --highlight: #e94560;
    --text: #eaeaea;
    --text-dim: #a0a0b8;
    --code-bg: #0d1117;
    --green: #3ddc84;
    --blue: #4fc3f7;
    --orange: #ffb74d;
    --purple: #ce93d8;
    /* Font di default – sovrascrivere per pagina se necessario */
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg-dark);
    color: var(--text);
    overflow: hidden;
    height: 100vh;
}

.slide-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide {
    display: none;
    width: 90vw;
    max-width: 1100px;
    min-height: 70vh;
    max-height: 90vh;
    padding: 3rem 4rem;
    background: linear-gradient(135deg, var(--bg-slide), var(--accent));
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    position: relative;
}

.slide.active { display: flex; }

/* Title slide */
.slide.title-slide {
    text-align: center;
    justify-content: center;
    align-items: center;
}

.slide.title-slide h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, var(--blue), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.slide.title-slide .subtitle {
    font-size: 1.5rem;
    color: var(--text-dim);
    font-weight: 300;
    margin-bottom: 2rem;
}

.slide.title-slide .logo {
    font-size: 6rem;
    margin-bottom: 1.5rem;
}

.slide.title-slide .meta {
    font-size: 0.95rem;
    color: var(--text-dim);
    margin-top: 1rem;
}

/* Section divider slide */
.slide.section-slide {
    text-align: center;
    justify-content: center;
    align-items: center;
}

.slide.section-slide h2 {
    font-size: 3rem;
    color: var(--purple);
}

.slide.section-slide p {
    color: var(--text-dim);
    font-size: 1.3rem;
    margin-top: 0.5rem;
}

.slide h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--blue);
}

.slide h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
    color: var(--orange);
}

.slide p, .slide li {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text);
}

.slide ul, .slide ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.slide li { margin-bottom: 0.5rem; }

.slide .highlight {
    color: var(--highlight);
    font-weight: 600;
}

.slide .keyword {
    color: var(--purple);
    font-family: var(--font-mono);
    font-size: 0.95em;
}

/* Code blocks */
pre {
    background: var(--code-bg);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin: 1rem 0;
    overflow-x: auto;
    border-left: 4px solid var(--highlight);
}

code {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    line-height: 1.6;
}

.code-inline {
    background: var(--code-bg);
    padding: 0.15rem 0.5rem;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--green);
}

/* Syntax highlighting */
.kw   { color: #c586c0; }
.type { color: #4ec9b0; }
.str  { color: #ce9178; }
.num  { color: #b5cea8; }
.cm   { color: #6a9955; }
.fn   { color: #dcdcaa; }
.var  { color: #9cdcfe; }
.op   { color: #d4d4d4; }

/* Two columns */
.columns {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.columns .col { flex: 1; }

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    padding: 0.7rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 1.05rem;
}

th {
    color: var(--blue);
    font-weight: 600;
    border-bottom: 2px solid var(--blue);
}

/* Info / warning boxes */
.info-box {
    background: rgba(79, 195, 247, 0.1);
    border: 1px solid rgba(79, 195, 247, 0.3);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin: 1rem 0;
}

.warning-box {
    background: rgba(233, 69, 96, 0.1);
    border: 1px solid rgba(233, 69, 96, 0.3);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin: 1rem 0;
}

/* Diagram */
.diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.diagram .box {
    background: rgba(255,255,255,0.08);
    border: 2px solid var(--blue);
    border-radius: 12px;
    padding: 0.8rem 1.5rem;
    text-align: center;
    font-weight: 600;
    min-width: 120px;
}

.diagram .arrow {
    font-size: 1.5rem;
    color: var(--highlight);
}

/* Badge */
.badge {
    display: inline-block;
    background: var(--highlight);
    color: white;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Navigation */
.nav {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(0,0,0,0.5);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    z-index: 100;
}

.nav button {
    background: none;
    border: 2px solid var(--text-dim);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.nav button:hover {
    border-color: var(--highlight);
    color: var(--highlight);
    transform: scale(1.1);
}

.nav .counter {
    color: var(--text-dim);
    font-size: 0.9rem;
    min-width: 60px;
    text-align: center;
}

/* Progress bar */
.progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--highlight), var(--purple));
    transition: width 0.3s;
    z-index: 100;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.slide.active { animation: fadeInUp 0.4s ease-out; }
