:root {
    --bg-color: #0a0a0a;
    /* Nero quasi assoluto */
    --card-bg: #121212;
    /* Grigio scurissimo */
    --border-color: #222;
    /* Bordi sottili */
    --text-main: #ffffff;
    --text-muted: #666666;
    --accent: #ffffff;
    /* Accento bianco puro */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: block; /* Cambiato da flex a block per permettere il posizionamento naturale */
}

/* Wrapper centrato orizzontalmente e leggermente staccato dall'alto */
.wrapper {
    width: 100%;
    max-width: 500px;
    margin: 40px auto; /* Centra orizzontalmente con auto */
    padding: 20px;
}

/* HEADER */
.main-header {
    text-align: left;
    margin-bottom: 50px;
}

.main-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.main-header h1 span {
    color: var(--text-muted);
}

.main-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* GRID */
.tool-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* CARD */
.tool-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, border-color 0.2s;
}

.tool-card:active {
    transform: scale(0.98);
    border-color: #444;
}

.card-content h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.card-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.arrow {
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 300;
}

/* DISABLED CARD */
.disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

/* FOOTER */
.minimal-footer {
    margin-top: 60px;
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 2px;
}

/* Navigazione fissa in alto a sinistra */
.back-navigation {
    padding: 20px;
    width: 100%;
    display: flex;
    justify-content: flex-start; /* Allinea a sinistra */
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-color); /* Per non far vedere il testo sotto mentre scorri */
}
.btn-home-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #666;
    /* Grigio discreto */
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    transition: color 0.2s;
}

.btn-home-back:hover {
    color: #fff;
    /* Bianco al passaggio */
}