:root {
    /* --- TEMA DARK (Default) --- */
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --bg-color: #0f172a;      /* Sfondo scuro */
    --card-bg: #1e293b;       /* Sfondo card scuro */
    --text-main: #f8fafc;     /* Testo chiaro */
    --text-muted: #94a3b8;    /* Testo grigio chiaro */
    --step-bg: #334155;
    --border-color: #334155;
    --radius: 12px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

body.always-light .theme-switch-btn {
    display: none;
}

/* --- TEMA LIGHT (Attivato tramite classe .light-mode) --- */
body.light-mode {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --step-bg: #eff6ff;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* --- TEMA SEMPRE CHIARO (Per le Policy) --- */
body.always-light {
    --primary-color: #0066FF;
    --primary-hover: #0052cc;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --step-bg: #eff6ff;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body.always-light .container {
    max-width: 760px;
    padding-bottom: 80px;
}

body.always-light .site-nav {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

body.always-light h1 {
    text-align: left;
    font-size: 2.2rem;
    margin-top: 20px;
}

body.always-light h2 {
    justify-content: flex-start;
    text-align: left;
    margin-top: 40px;
    font-size: 1.4rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

body.always-light .back-link {
    margin-bottom: 40px;
    display: block;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 0;
}

/* --- SITE NAVBAR --- */
.site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 0;
    z-index: 1000;
    background-color: var(--bg-color);
    transition: all 0.3s ease;
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 !important;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -1px;
}

.logo-img {
    height: 45px; /* Regola l'altezza in base al tuo logo */
    width: auto;
}

/* --- HEADER & ABOUT --- */
header {
    text-align: center;
    margin-bottom: 60px;
}

.profile-img {
    width: 100px;
    height: 100px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 20px;
}

h1 { font-size: 2.5rem; margin-bottom: 10px; letter-spacing: -1px; }

.about-text {
    max-width: 650px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* --- SECTIONS --- */
section { margin-bottom: 80px; }

h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    text-align: center;
}

h2 i { color: var(--primary-color); }

/* --- APP CARDS --- */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.app-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s, background-color 0.3s;
    border: 1px solid var(--border-color);
}

.app-card:hover { transform: translateY(-5px); }

.app-card.placeholder { opacity: 0.6; border-style: dashed; }

.app-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.app-card-header h3 {
    margin: 0;
}

.app-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
}

.app-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.app-description { color: var(--text-muted); margin-bottom: 25px; }

.btn-main {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-main:hover { background: var(--primary-hover); }

.btn-main i { margin-left: 8px; }

.policy-link-wrapper { margin-top: 15px; font-size: 0.95rem; }
.policy-link-wrapper a { color: var(--text-muted); text-decoration: none; }
.policy-link-wrapper a:hover { text-decoration: underline; }

/* --- TESTER GUIDE --- */
.tester-box {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--radius);
    border-left: 5px solid var(--primary-color);
    box-shadow: var(--shadow);
    transition: background-color 0.3s;
}

.step-list { list-style: none; padding: 0; margin-top: 30px; }

.step-item {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.step-number {
    background: var(--step-bg);
    color: var(--primary-color);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 { margin: 0 0 5px 0; font-size: 1.1rem; }
.step-content p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.step-content a { color: var(--primary-color); font-weight: 600; text-decoration: none; }
.step-content a:hover { text-decoration: underline; }

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 40px 20px 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

.footer-links {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 800;
    transition: color 0.2s;
}

@media (hover: hover) {
    .footer-links a:hover {
        color: var(--primary-color);
    }
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 60px;
}

/* --- BOTTONE SWITCH TEMA (UI) --- */
.theme-switch-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.theme-switch-btn:hover {
    transform: scale(1.05);
}

/* Style for the tester reward badge */
.reward-badge {
    background: linear-gradient(135deg, var(--primary-color), #6366f1);
    color: white;
    padding: 20px;
    border-radius: var(--radius);
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.reward-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reward-badge i {
    font-size: 1.6rem;
}

.reward-badge p {
    margin: 0;
    font-size: 1.05rem;
}

/* Style for the utility note */
.tester-note {
    background: var(--step-bg);
    padding: 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 30px;
}

.tester-note i {
    color: var(--primary-color);
    margin-right: 8px;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 600px) {
    body { font-size: 1.1rem; }
    h1 { font-size: 2rem; }
    h2 {
            display: block;
            text-align: center;
        }

        h2 i {
            margin-right: 10px;
            vertical-align: middle;
        }
    .tester-box {
            padding: 20px;
            border-left: none;
            border-radius: 8px;
        }
    .tester-note {
            font-size: 1.1rem;
            line-height: 1.5;
        }
    .step-number {
            width: 45px;
            height: 45px;
            font-size: 1.3rem;
        }
    .step-content {
            text-align: center;
        }
    .step-content h4 {
            font-size: 1.3rem;
            margin-bottom: 8px;
        }
    .step-content p {
            font-size: 1.1rem;
            line-height: 1.5;
        }
    .step-item {
            flex-direction: column;
            align-items: center;
            gap: 10px;
            margin-bottom: 40px;
        }
    .theme-switch-btn { top: 10px; right: 10px; padding: 8px 12px; }
    .footer-links {
            flex-direction: column;
            align-items: center;
            padding: 5px 0;
            gap: 15px;
        }
    .footer-links a {
            font-size: 1.4rem;
        }
}

.maintenance-banner {
    background: #f59e0b;
    color: white;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 1001;
}

body.always-light .maintenance-banner {
    display: none;
}

.maintenance-on .theme-switch-btn {
    top: 70px; /* 20px originali + 50px di spazio per il banner */
}
.theme-switch-btn {
    z-index: 2000;
}