.naruto-panel {
    /* Base Container Styles - Earthy/Ninja Theme without black */
    background-color: #3a2a1a; /* Dark earthy brown */
    color: #f0e0d0; /* Light beige text */
    font-family: 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; /* More Eastern feel */
    border: 2px solid #CC3333; /* Strong Naruto red accent border */
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 0 25px rgba(204, 51, 51, 0.6); /* Red glowing shadow */
    max-width: 100%;
    box-sizing: border-box;
    line-height: 1.6;
    font-size: 15px;
    margin: 10px auto; /* Centering for demonstration, adjust as needed */
    overflow: hidden;
}

/* General Text and Element Styles */
.naruto-panel h4 {
    color: #FF8C00; /* Naruto orange for subheadings */
    border-bottom: 1px dashed #664422; /* Darker brown dashed line */
    padding-bottom: 5px;
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 1.1em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); /* Subtle text shadow for depth */
}

.naruto-panel p,
.naruto-panel span,
.naruto-panel li {
    font-size: 0.95em;
    margin-bottom: 5px;
}

.naruto-panel strong {
    color: #FFD700; /* Gold color for key highlights (Hokage gold) */
    font-weight: bold;
    margin-right: 5px;
    display: inline-block;
    min-width: 80px;
}

.naruto-panel em {
    color: #FFC107; /* Brighter gold for emphasized text */
    font-style: normal;
}

/* Details and Summary (Collapsible Sections) */
.naruto-panel details {
    background-color: #2a1a0a; /* Even darker earthy brown for content */
    border: 1px solid #664422; /* Darker brown border */
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

.naruto-panel details[open] {
    border-color: #CC3333;
    box-shadow: 0 0 12px rgba(204, 51, 51, 0.4);
}

.naruto-panel summary {
    background-color: #4a3a3a; /* Slightly lighter earthy brown for summary bar */
    color: #CC3333; /* Strong red accent for summary text */
    padding: 12px 15px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    position: relative;
    list-style: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.naruto-panel summary:hover {
    background-color: #5a4a4a; /* Darker hover for summary */
    color: #FFD700; /* Gold on hover */
}

/* Custom expand/collapse icon */
.naruto-panel summary::-webkit-details-marker {
    display: none;
}

.naruto-panel summary::before {
    content: '\25B6'; /* Right-pointing triangle */
    color: #FF8C00; /* Naruto orange icon */
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
    font-weight: normal;
    transition: transform 0.2s ease;
}

.naruto-panel details[open] > summary::before {
    content: '\25BC'; /* Down-pointing triangle */
    transform: translateY(-50%) rotate(0deg);
}

.naruto-panel details > div,
.naruto-panel details > ul,
.naruto-panel details > ol,
.naruto-panel details > table,
.naruto-panel details > p,
.naruto-panel details > hr {
    padding: 10px 15px 15px 15px;
    border-top: 1px solid #664422; /* Darker brown separator */
}

.naruto-panel details[open] > summary + * {
    animation: fadein 0.3s ease-in-out;
}

@keyframes fadein {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Info Grid Layout (for key-value pairs) */
.naruto-panel .info-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 5px 10px;
    align-items: baseline;
}

.naruto-panel .info-grid strong {
    min-width: 80px;
    text-align: right;
}

.naruto-panel .info-grid span,
.naruto-panel .info-grid p {
    margin-bottom: 0;
}

/* List Styles */
.naruto-panel ul {
    list-style: none;
    padding-left: 20px;
    margin-top: 10px;
}

.naruto-panel ul li {
    position: relative;
    padding-left: 15px;
    margin-bottom: 5px;
}

.naruto-panel ul li::before {
    content: '\272A'; /* Eight pointed star as bullet */
    color: #CC3333; /* Red accent */
    position: absolute;
    left: 0;
    font-size: 0.8em;
    top: 0.3em;
}

.naruto-panel ol {
    list-style: none;
    padding-left: 25px;
    margin-top: 10px;
}

.naruto-panel ol li {
    position: relative;
    padding: 8px 10px;
    margin-bottom: 8px;
    background-color: #4a3a3a; /* Darker brown for list items */
    border: 1px solid #664422;
    border-radius: 5px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.naruto-panel ol li:hover {
    background-color: #5a4a4a;
    border-color: #FF8C00; /* Orange border on hover */
    box-shadow: 0 0 8px rgba(255, 140, 0, 0.5); /* Orange glow on hover */
    transform: translateX(5px);
}

.naruto-panel ol li::before {
    content: counter(list-item) ". ";
    counter-increment: list-item;
    color: #FFD700; /* Gold accent for numbers */
    font-weight: bold;
    position: absolute;
    left: -20px;
    top: 8px;
    font-size: 0.9em;
}

/* HR Separator */
.naruto-panel hr {
    border: none;
    border-top: 1px dashed #CC3333; /* Dashed red line */
    margin: 20px 0;
    height: 0;
}

/* Table Styles (Memory Section) */
.naruto-panel .memory-section h4 {
    margin-bottom: 10px;
}

.naruto-panel table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.naruto-panel th,
.naruto-panel td {
    border: 1px solid #664422; /* Darker brown border */
    padding: 8px 12px;
    text-align: left;
}

.naruto-panel th {
    background-color: #4a3a3a; /* Darker brown for table headers */
    color: #FF8C00; /* Naruto orange for headers */
    font-weight: bold;
    white-space: nowrap;
}

.naruto-panel tbody tr:nth-child(odd) {
    background-color: #302010; /* Slightly lighter brown zebra striping */
}

.naruto-panel tbody tr:nth-child(even) {
    background-color: #2a1a0a; /* Base content brown */
}

/* Scrollbox for memory */
.naruto-panel .scroll-box {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #664422;
    border-radius: 5px;
    padding-right: 5px;
}

/* Scrollbar Customization */
.naruto-panel ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.naruto-panel ::-webkit-scrollbar-track {
    background: #4a3a3a; /* Darker brown track */
    border-radius: 4px;
}

.naruto-panel ::-webkit-scrollbar-thumb {
    background: #CC3333; /* Red thumb */
    border-radius: 4px;
    border: 1px solid #FF8C00; /* Orange border for thumb */
}

.naruto-panel ::-webkit-scrollbar-thumb:hover {
    background: #FF8C00; /* Orange on hover */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .naruto-panel {
        padding: 10px;
        border-radius: 8px;
        font-size: 14px;
    }

    .naruto-panel summary {
        padding: 10px 12px;
        font-size: 1em;
    }

    .naruto-panel summary::before {
        left: 10px;
    }

    .naruto-panel details > div,
    .naruto-panel details > ul,
    .naruto-panel details > ol,
    .naruto-panel details > table,
    .naruto-panel details > p,
    .naruto-panel details > hr {
        padding: 8px 12px 12px 12px;
    }

    .naruto-panel .info-grid {
        grid-template-columns: 1fr; /* Stack key-value pairs on small screens */
        gap: 2px 0;
    }

    .naruto-panel .info-grid strong {
        min-width: unset;
        text-align: left;
        display: block;
        margin-bottom: 0;
    }
    
    .naruto-panel .info-grid span,
    .naruto-panel .info-grid p {
        margin-left: 10px; /* Indent the value */
        margin-bottom: 5px;
    }

    .naruto-panel table {
        display: block;
        overflow-x: auto; /* Enable horizontal scrolling for tables */
        white-space: nowrap;
    }

    .naruto-panel th,
    .naruto-panel td {
        padding: 6px 8px;
    }

    .naruto-panel ol li {
        padding: 6px 8px;
    }
}