/* Stili globali e setup mobile-first */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
}

header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 2px solid #333;
    padding-bottom: 20px;
}

header h1 {
    color: #a50512; /* Colore primario */
}

/* Contenitore principale */
#commands-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Stili per le sezioni delle categorie */
.category-section {
    margin-bottom: 40px;
    opacity: 0; /* Animazione Fade-in */
    transform: translateY(20px);
    animation: fadeIn 0.5s ease-out forwards;
}

.category-title {
    font-size: 2.5rem;
    color: #a50512;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    text-transform: capitalize;
}

/* Griglia per le card dei comandi (mobile-first: 1 colonna) */
.commands-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 colonna su mobile */
    gap: 20px;
    margin-top: 20px;
}

/* Card del singolo comando */
.command-card {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    
    /* Animazione all'hover */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.command-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 6px 12px rgba(182, 26, 6, 0.301);
    border-color: #ff2727;
}

.command-card h3 {
    margin-top: 0;
    font-size: 1.4rem;
    color: #85330d; 
}

.command-card .description {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 15px;
}

/* Lista sottocomandi */
.subcommands-list {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
    border-top: 1px dashed #444;
    padding-top: 15px;
}

.subcommands-list li {
    font-size: 0.95rem;
    color: #bbb;
    padding-left: 20px;
    position: relative;
}

/* Pallino per i sottocomandi */
.subcommands-list li::before {
    content: '↳';
    position: absolute;
    left: 0;
    color: #720b24;
    font-weight: bold;
}

/* Animazione Fade-in */
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loader */
.loader {
    border: 8px solid #333;
    border-top: 8px solid #a50512;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Media Query per Desktop (responsive) */
@media (min-width: 768px) {
    .commands-grid {
        /* 2 colonne per tablet */
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .commands-grid {
        /* 3 colonne per desktop */
        grid-template-columns: repeat(3, 1fr);
    }
}