:root {
    --primary: #7289da;
    --accent: #f2f2f5;
    --bg: #0f0c29;
    --panel: #1a1a2e;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: linear-gradient(to bottom, #0f0c29, #302b63, #24243e);
    background-attachment: fixed;
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== NAV ===== */
nav {
    width: 100%;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left { display: flex; align-items: center; gap: 15px; }

.logo { font-size: 1.5rem; font-weight: bold; }
.logo span { color: var(--accent); }

/* ===== HAMBURGER ===== */
.hamburger {
    width: 42px;
    height: 42px;
    background: none;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    transition: border-color .3s;
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
}

.hamburger:hover { border-color: var(--accent); }

body.menu-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .hamburger span:nth-child(2) { opacity: 0; }
body.menu-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.lang-menu button {
    background: none;
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    cursor: pointer;
    padding: 5px 10px;
    margin-left: 5px;
    border-radius: 5px;
    transition: 0.3s;
}

.lang-menu button:hover { background: white; color: black; }
.lang-menu button.active { background: var(--accent); border-color: var(--accent); color: #000; font-weight: bold; }

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: var(--panel);
    border-right: 1px solid rgba(255,255,255,0.1);
    padding: 25px 20px;
    transform: translateX(-105%);
    transition: transform .35s ease;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.sidebar.open { transform: translateX(0); }

.side-top { display: flex; align-items: center; gap: 12px; }
.side-top h2 { margin: 0; font-size: 1.2rem; }
.side-role { margin: 3px 0 0; font-size: 0.85rem; color: var(--accent); }

.side-avatar {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    object-fit: cover;
    background: #000;
}

.close-side {
    margin-left: auto;
    background: none;
    border: none;
    color: #888;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.side-bio {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.8);
}

.side-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(255,255,255,0.04);
    border-radius: 20px;
    padding: 8px;
}

.side-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.05);
    transition: background .25s, color .25s;
}

.side-links a:hover { background: rgba(255,255,255,0.14); color: var(--accent); }
.side-links i { width: 18px; text-align: center; }

.side-social { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

.side-social-btn {
    text-align: center;
    padding: 11px;
    border-radius: 14px;
    text-decoration: none;
    color: white;
    font-weight: 600;
}

.side-social-btn.discord { background: var(--primary); }
.side-social-btn.linktree { background: #39e09b; color: #06281c; }

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s;
    z-index: 150;
}

.overlay.show { opacity: 1; pointer-events: auto; }

/* ===== HEADER ===== */
header { text-align: center; margin: 60px 20px 20px; max-width: 700px; }
header h1 { margin: 0 0 10px; font-size: 2.2rem; }
.subtitle { color: rgba(255,255,255,0.7); margin: 0; }

/* ===== SEZIONI ===== */
.block { width: 85%; max-width: 1000px; margin: 45px 0; }

.block-head { margin-bottom: 25px; }

.block-head h2 {
    margin: 0;
    font-size: 1.5rem;
    display: inline-block;
    border-bottom: 3px solid var(--accent);
    padding-bottom: 6px;
}

.block-head p { margin: 12px 0 0; color: rgba(255,255,255,0.65); font-size: 0.95rem; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.card {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
}

.card h3 { margin: 0 0 10px; }
.desc { color: rgba(255,255,255,0.8); min-height: 45px; }

.icon { font-size: 50px; margin-bottom: 15px; }

.badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(114,137,218,0.25);
    border: 1px solid var(--primary);
    color: #cdd6ff;
}

.play-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 25px;
    background: var(--accent);
    color: #000;
    text-decoration: none;
    font-weight: bold;
    border-radius: 25px;
}

.card.tool .play-btn { background: var(--primary); color: #fff; }

/* ===== FOOTER ===== */
footer { margin-top: auto; padding: 50px 20px; text-align: center; }

.footer-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.discord-btn, .linktree-btn {
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    display: inline-block;
}

.discord-btn { background: var(--primary); color: white; }
.linktree-btn { background: #39e09b; color: #06281c; }

/* ===== WIDGET IDEE ===== */
.sugg-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 120;
    font-family: sans-serif;
}

.widget-trigger {
    width: 60px;
    height: 60px;
    background: var(--accent);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.25);
    font-size: 24px;
    transition: transform 0.3s;
}

.widget-trigger:hover { transform: scale(1.1); }

.widget-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 300px;
    max-width: 90vw;
    background: var(--panel);
    border: 1px solid #333;
    border-radius: 15px;
    padding: 20px;
    display: none;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: white;
}

.panel-header h3 { margin: 0; font-size: 1.05rem; }

.close-btn { background: none; border: none; color: #888; font-size: 20px; cursor: pointer; }

.widget-form { display: flex; flex-direction: column; gap: 10px; }

.widget-form input, .widget-form select, .widget-form textarea {
    padding: 10px;
    background: #0f0c29;
    border: 1px solid #444;
    border-radius: 8px;
    color: white;
    font-family: inherit;
}

.widget-form textarea { height: 80px; resize: none; }

.btn-submit {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

/* ===== ACCESSIBILITÀ / MOBILE ===== */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media (max-width: 600px) {
    header { margin-top: 40px; }
    header h1 { font-size: 1.7rem; }
    .block { width: 90%; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
