/* Stili frontend */
.ncm-character-sheet {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.ncm-sheet-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ncm-main-photo {
    flex-shrink: 0;
}

.ncm-main-photo img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid #333;
}

.ncm-header-info {
    flex-grow: 1;
}

.ncm-character-name {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    color: #222;
    font-weight: bold;
}

.ncm-code-badge {
    display: inline-block;
    padding: 5px 15px;
    background: #0073aa;
    color: #fff;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.ncm-person-name {
    font-style: italic;
    color: #666;
    margin: 10px 0 0 0;
}

.ncm-sheet-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.ncm-stat {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ncm-stat-label {
    display: block;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

.ncm-stat-value {
    display: block;
    font-size: 1.2em;
    color: #333;
}

.ncm-short-background,
.ncm-full-background,
.ncm-gallery,
.ncm-diary {
    background: #fff;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ncm-short-background h2,
.ncm-full-background h2,
.ncm-gallery h2,
.ncm-diary h2 {
    margin-top: 0;
    color: #0073aa;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.ncm-background-content {
    line-height: 1.8;
    color: #444;
}

.ncm-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.ncm-gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.ncm-gallery-item:hover {
    transform: scale(1.05);
}

.ncm-gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.ncm-diary-entries {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ncm-diary-entry {
    border-left: 4px solid #0073aa;
    padding-left: 20px;
}

.ncm-diary-date {
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.ncm-diary-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.ncm-diary-image {
    flex-shrink: 0;
}

.ncm-diary-image img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.ncm-diary-text {
    flex-grow: 1;
    line-height: 1.6;
    color: #444;
}

/* Lista personaggi */
.ncm-character-list,
.ncm-character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.ncm-character-card,
.ncm-archive-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ncm-character-card:hover,
.ncm-archive-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.ncm-character-photo,
.ncm-card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.ncm-character-photo img,
.ncm-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ncm-character-card:hover .ncm-character-photo img,
.ncm-archive-card:hover .ncm-card-image img {
    transform: scale(1.1);
}

.ncm-character-info,
.ncm-card-content {
    padding: 20px;
}

.ncm-character-info h3,
.ncm-card-title {
    margin: 0 0 10px 0;
    font-size: 1.5em;
    color: #222;
}

.ncm-card-title a {
    text-decoration: none;
    color: #222;
}

.ncm-card-title a:hover {
    color: #0073aa;
}

.ncm-nmd-code,
.ncm-card-code {
    display: inline-block;
    padding: 3px 10px;
    background: #0073aa;
    color: #fff;
    border-radius: 3px;
    font-size: 0.85em;
    font-weight: bold;
    margin-bottom: 8px;
}

.ncm-profession,
.ncm-card-profession {
    color: #666;
    font-style: italic;
    margin-bottom: 10px;
    display: block;
}

.ncm-card-meta {
    margin-bottom: 15px;
}

.ncm-card-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.ncm-card-link.button,
.ncm-character-info .button {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
}

.ncm-card-link.button:hover,
.ncm-character-info .button:hover {
    background: #005a87;
}

/* Responsive */
@media (max-width: 768px) {
    .ncm-sheet-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .ncm-character-name {
        font-size: 2em;
    }
    
    .ncm-diary-content {
        flex-direction: column;
    }
    
    .ncm-diary-image img {
        width: 100%;
        height: auto;
    }
    
    .ncm-character-list,
    .ncm-character-grid {
        grid-template-columns: 1fr;
    }
}

/* Lightbox */
.ncm-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.ncm-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.ncm-lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s ease;
}

.ncm-lightbox-close:hover {
    color: #0073aa;
}

/* Miglioramento spaziatura background */
.ncm-background-content p {
    margin-bottom: 1.5em;
    line-height: 1.8;
}

.ncm-background-content p:last-child {
    margin-bottom: 0;
}

.ncm-short-background p {
    line-height: 1.8;
    margin: 0;
}