/* =========================
   🎨 Variabili globali
   ========================= */
:root {
    /* 🎯 Font */
    --font-main: "Big Shoulders Display", sans-serif;

    /* 🌈 Colori principali */
    --color-bg-top: rgba(8, 49, 113, 1);
    --color-bg-mid: rgba(9, 9, 121, 1);
    --color-bg-bottom: rgba(84, 19, 103, 1);

    --color-primary: #ff4fb2;
    --color-primary-light: #ff4be1;
    --color-primary-dark: #e04b9d;

    --color-secondary: #541367;

    --color-accent: #fec5e5;
    --color-header-bg: #0d2b68;
    --color-header-border: #583b8b;

    /* 🩵 Colori secondari e testo */
    --color-subtitle: #b8a7df;
    --color-library: #d8c7f3;
    --color-count: #b57ef3;
    --color-profile-bg: #6c4dbf;
    --color-text-light: #fff;

    /* 🌟 Effetti luce / ombra */
    --shadow-pink: 0 0 5px var(--color-primary),
    0 0 10px var(--color-primary),
    0 0 20px var(--color-primary),
    0 0 40px var(--color-secondary),
    0 0 60px var(--color-secondary),
    0 0 80px var(--color-secondary);

    /* 🔤 Tipografia */
    --font-size-title: 4.5rem;
    --font-size-subtitle: 16px;
    --font-size-header-title: 26px;
    --font-size-button: 1.6rem;
    --font-size-secondary: 1.1rem;

    /* 🧱 Spaziatura e bordi */
    --radius-small: 8px;
    --radius-large: 50px;
    --border-width: 3px;

    --buzzer-anim: neonPulse .6s ease
}

/* =========================
   🌌 Struttura generale
   ========================= */
body {
    font-family: var(--font-main);
    background: linear-gradient(
            180deg,
            var(--color-bg-top) 10%,
            var(--color-bg-mid) 50%,
            var(--color-bg-bottom) 100%
    );
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
}

* {
    color: var(--color-text-light);
}

a {
    text-decoration: none;
}

/* =========================
   🏷️ Titolo principale
   ========================= */
.title {
    font-family: var(--font-main) !important;
    color: var(--color-accent);
    font-size: var(--font-size-title);
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    text-shadow: var(--shadow-pink);
}

/* =========================
   🔘 Pulsanti
   ========================= */
.primary-button {
    display: block;
    background: transparent;
    border: var(--border-width) solid var(--color-primary);
    color: var(--color-text-light);
    padding: 0 20px;
    width: 100%;
    font-size: var(--font-size-button);
    border-radius: var(--radius-large);
    text-decoration: none;
    text-align: center;
}

.primary-button:hover {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

.primary-button:active {
    background-color: var(--color-primary-dark);
}

.secondary-button {
    background: none;
    border: none;
    color: var(--color-text-light);
    text-decoration: underline;
    font-size: var(--font-size-secondary);
}

/* =========================
   🧭 Header (Topbar)
   ========================= */
header.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 24px;
    background-color: transparent;
    border-bottom: 1px solid var(--color-header-border);
    position: sticky;
    top: 0;
    backdrop-filter: blur(10px);
    z-index: 999999;
}

header.topbar .navbar{
    width: 100%;
}

header .left-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

header .icon {
    background-color: rgba(255, 0, 255, 0.15);
    border-radius: var(--radius-small);
    padding: 6px 10px;
    color: var(--color-primary-light);
    font-size: 18px;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

header .titles {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

header .title {
    font-size: var(--font-size-header-title);
    font-weight: 600;
}

header .subtitle {
    color: var(--color-accent);
    font-size: var(--font-size-subtitle);
}

header .right-section {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

header .library {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--color-library);
}

header .count {
    color: var(--color-accent);
    font-size: 11px;
}

header .profile {
    width: 32px;
    height: 32px;
    background-color: var(--color-secondary);
    border: 1px solid var(--color-header-border);
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 600;
    font-size: 13px;
}

header .username {
    font-weight: 500;
    font-size: 13px;
    color: var(--color-accent);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #222;
    min-width: 100px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    z-index: 1;
    right: 0;
    border-radius: 4px;
}

.dropdown-content a {
    color: white;
    padding: 8px 12px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: #444;
}

.show {
    display: block;
}

/* Contenitore della pagina */
#main-content, #header-content {
    transition: transform 0.3s ease;
}

/* Sidebar laterale */
#side-menu {
    position: fixed;
    top: 0;
    right: -370px; /* nascosto fuori schermo */
    width: 370px;
    height: 100vh;
    background-color: rgba(30, 30, 47, 0.8); /* scuro */
    box-shadow: -3px 0 8px rgba(0,0,0,0.5);
    padding: 20px;
    color: white;
    transition: right 0.3s ease;
    z-index: 1100;
    overflow-y: auto;
}

/* Sidebar visibile */
#side-menu.active {
    right: 0;
}

/* Nome utente cliccabile */
#user-trigger {
    cursor: pointer;
    color: white;
    font-weight: 600;
    padding: 10px 15px;
    display: inline-block;
    user-select: none;
}

/* Contenuto spostato */
#main-content.shifted, #header-content.shifted {
    transform: translateX(-370px);
}

/* Link nel menu */
#side-menu a {
    color: white;
    text-decoration: none;
    display: block;
    margin: 15px 0;
    font-weight: 600;
}
#side-menu a:hover {
    color: #ffcc00;
}

/* --- ANIMAZIONE --- */
@keyframes slideFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- STILE BASE NOTIFICA --- */
.notify {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    font-family: sans-serif;
    font-size: 16px;
    color: white;
    width: fit-content;
    animation: slideFadeIn 0.3s ease-out forwards;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* Icona tonda */
.notify .icon {
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    font-weight: bold;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 16px;
}

/* --- VARIANTI --- */
.notify.error {
    background: #5c1a7a;         /* viola simile all’immagine */
}
.notify.error .icon {
    color: #5c1a7a;
}

.notify.success {
    background: #1f9d55;        /* verde */
}
.notify.success .icon {
    color: #1f9d55;
}

.notify.warning {
    background: #e09b13;        /* giallo scuro */
}
.notify.warning .icon {
    color: #e09b13;
}

.notify.info {
    background: #2578c3;        /* blu */
}
.notify.info .icon {
    color: #2578c3;
}
