body {
    margin: 0;
    padding: 80px 40px 40px 40px;
    box-sizing: border-box;
    background-color: #000001;
}

h1 {
    color: snow;
    padding: 5px 5px 5px 5px;
    font-family: 'Roboto';
    margin-right: 10px;
}

h2 {
    color: snow;
    font-family: 'Roboto';
    margin-right: 10px;
}

h3 {
    color: snow;
    font-family: 'Roboto';
    margin-right: 10px;
    font-size: 20px;
}

h4 {
    color: snow;
    font-family: 'Roboto';
    margin-right: 10px;
}

strong {
    font-weight: 700;
    color: #fff;
}

/* header menu  */


ul {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    /* Aggiungendo un font per una migliore estetica */
}

header {
    background-color: rgba(0, 0, 0, 0.2);
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.menu ul {
    list-style-type: none;
    display: flex;
    align-items: center;
}

.menu li {
    margin: 0 20px;
}

.menu a {
    text-decoration: none;
    color: white;
    font-size: 18px;
    padding: 10px 20px;
    border-radius: 5px;
    transition: 0.3s;
}

.menu a:hover {
    background-color: #555;
}

.hamburger-menu {
    position: relative;
    z-index: 1000;
}

.hamburger-icon {
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

.hamburger-menu.active .hamburger-icon span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.hamburger-menu.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-icon span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.menu-content {
    position: absolute;
    top: 60px;
    left: 0;
    width: 200px;
    background-color: #333;
    padding: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    visibility: hidden;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.hamburger-menu.active .menu-content {
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
}

.menu-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-content li {
    margin: 15px 0;
}

.menu-content a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    display: block;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.menu-content a:hover {
    color: #ef233c;
}

/**/



.graph1 {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    overflow: hidden;
}

.graph1 .images {
    display: flex;
    justify-content: center;
    width: 100%;
    overflow: hidden;
}

.graph1 .images .image-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.graph1 .images img {
    width: 49%;
    height: auto;
    object-fit: contain;
}

/* SLIDESHOW X TAG OCCURR */

.slideshow {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    height: auto;
    overflow: visible;
    position: relative;
    align-items: center;
    justify-content: center;
    margin: 30px auto;
    padding: 0 20px;
    gap: 20px;
}

.right-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: visible;
    position: relative;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

/* Nuova sezione per i container */
.container-section {
    display: flex;
    max-width: 100%;
    height: auto;
    overflow: visible;
    position: relative;
    align-items: center;
    justify-content: center;
    margin: 30px auto;
    padding: 0 20px;
}

.container-section .content-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: visible;
    position: relative;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.container-section .content-wrapper .container-1,
.container-section .content-wrapper .container,
.container-section .content-wrapper .graph1 {
    width: 100%;
    margin: 20px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.container-section .content-wrapper .container-1 h2,
.container-section .content-wrapper .container h2,
.container-section .content-wrapper .graph1 h2 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 24px;
}

.right-section .row {
    display: grid;
    grid-template-columns: repeat(6, 160px);
    gap: 15px;
    padding: 15px;
    overflow: visible;
    height: auto;
    min-height: 670px; /* Altezza minima per 4 righe di immagini (160px * 4 + gap * 3) */
    justify-content: center;
}

.right-section .row::-webkit-scrollbar {
    height: 8px;
}

.right-section .row::-webkit-scrollbar-track {
    background: #333;
    border-radius: 4px;
}

.right-section .row::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 4px;
}

.right-section .row::-webkit-scrollbar-thumb:hover {
    background: #888;
}

.right-section .row .img-wrap {
    width: 160px;
    height: 160px;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    background: #000;
}

.right-section .row .img-wrap:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.right-section .row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.img-wrap:hover img {
    transform: scale(1.05);
}

.img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 100%);
    color: white;
    padding: 10px;
    opacity: 0;
    transition: opacity 0.2s ease;
    overflow-y: auto;
    font-size: 11px;
    line-height: 1.3;
}

.img-wrap:hover .img-overlay {
    opacity: 1;
}

.img-overlay .bold {
    font-weight: bold;
    color: #ef233c;
    margin: 3px 0;
    font-size: 12px;
}

.img-overlay .tags {
    color: #98c1d9;
    margin-top: 5px;
    font-size: 10px;
    opacity: 0.9;
}

.arrow-left,
.arrow-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0.7;
}

.arrow-left:hover,
.arrow-right:hover {
    background: rgba(0, 0, 0, 0.9);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.arrow-left {
    left: 20px;
}

.arrow-right {
    right: 20px;
}

.arrow-left img,
.arrow-right img {
    width: 16px;
    height: 16px;
    filter: invert(1);
    opacity: 0.8;
}

@media (max-width: 1200px) {
    .right-section .row {
        grid-template-columns: repeat(6, 140px);
        min-height: 585px; /* Altezza minima per 4 righe di immagini (140px * 4 + gap * 3) */
    }
    
    .right-section .row .img-wrap {
        width: 140px;
        height: 140px;
    }
}

@media (max-width: 900px) {
    .right-section .row {
        grid-width: 1200px;
        min-height: 585px;
    }
}

@media (max-width: 768px) {
    .right-section .row {
        grid-template-columns: repeat(6, 110px);
        gap: 10px;
        padding: 10px;
        min-height: 460px; /* Altezza minima per 4 righe di immagini (110px * 4 + gap * 3) */
    }
    
    .right-section .row .img-wrap {
        width: 110px;
        height: 110px;
    }
    
    .img-overlay {
        font-size: 10px;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .right-section .row {
        grid-template-columns: repeat(6, 110px);
        min-height: 460px;
    }
}











/* TITOLO SEZIONE 1*/

.left-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    align-items: center;
}

.image-count {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.image-count h4 {
    margin: 0;
    text-align: center;
    font-size: 16px;
    color: #fff;
}

.image-count #active-tag-image-count {
    font-size: 18px;
    color: white;
    width: 100%;
    text-align: center;
}

.image-count #active-tag-gender-count {
    display: none;
}

.button-grid {
    display: grid;
    gap: 10px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px 0;
}

/* Stile per il button-grid che contiene i dropdown */
.button-grid:has(.dropdown-btn) {
    grid-template-columns: repeat(5, 1fr);
}

/* Stile per il button-grid che contiene il campo di ricerca */
.button-grid:has(.othertags),
.button-grid:has(.parent-container) {
    position: relative;
    grid-template-columns: 1fr;
    padding-bottom: 0; /* Remove bottom padding when containing search input */
}

.button-grid .btn4 {
    background-color: #333;
    color: white;
    border: 1px solid #666;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.button-grid .btn4:hover {
    background-color: #444;
    border-color: #888;
}

.button-grid .btn4.active {
    background-color: #666;
    border-color: #999;
}

.button-grid .othertags {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-size: 16px;
    position: relative;
}

.parent-container {
    width: 100%;
    max-width: 1000px;
    margin: 10px auto;
    height: 40px;
    display: flex;
    align-items: center;
    position: relative;
    gap: 0;
}

.othertags {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-size: 16px;
    position: relative;
    margin: 0;
}

#resetBtn {
    width: 100%;
    max-width: 1000px;
    padding: 10px;
    text-align: center;
    background-color: #ef233c;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    margin: 10px auto;
    display: block;
}

#resetBtn:hover {
    background-color: #d90429;
}

#active-tags {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1000px;
    margin: 10px auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    min-height: 40px;
    flex-wrap: wrap;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Roboto', sans-serif;
    color: white;
    text-align: center;
}

#active-tags::after {
    content: none;
}

#radar-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    display: flex;
    justify-content: center;
}

#radarChart {
    width: 100%;
    max-width: 700px;
    height: 500px;
}

.radar-chart-container {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    display: flex;
    justify-content: center;
}

@media (max-width: 1200px) {
    .button-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .button-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .btn4 {
        font-size: 14px;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .button-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}











/* menu a tendina*/

.dropdown-btn {
    background-color: #333;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 8px;
    transition: background-color 0.3s;
    width: 100%;
}

.dropdown-btn.active {
    background-color: #ef233c;
    color: white;
}

.dropdown-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(0, 0, 0, 0.92);
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    z-index: 1000;
    padding: 0;
    width: 100%;
}

.dropdown-content .column {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

/* Stile comune per i bottoni nei menu a tendina e nelle suggerimenti */
.dropdown-content a.btn4,
.suggestions a.btn4 {
    color: white;
    padding: 8px 12px;
    text-decoration: none;
    display: block;
    border-radius: 0;
    transition: background-color 0.2s;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    margin: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.dropdown-content a.btn4:hover,
.suggestions a.btn4:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.dropdown-content a.btn4.active,
.suggestions a.btn4.active {
    background-color: #ef233c;
    border-color: #ef233c;
    color: white;
}

.dropdown-content.show {
    display: block;
}

/* Stile base per i bottoni principali */
.btn4 {
    background-color: #333;
    color: white;
    padding: 8px 16px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    border-radius: 8px;
    transition: background-color 0.3s;
    width: 100%;
}

.btn4.active {
    background-color: #ef233c;
    color: white !important;
}

/* search bar */

.suggestions {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    right: 0;
    background: #000;
    border: 1px solid #333;
    border-top: none;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    display: none; /* Hide by default */
}

/* Show suggestions only when it has content */
.suggestions:not(:empty) {
    display: block;
}

.suggestions a {
    display: block;
    padding: 8px 12px;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid #333;
    margin: 0;
}

.suggestions a:hover {
    background: #333;
}

.suggestions a.active {
    color: #ff0000;
}







#active-tags {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1000px;
    margin: 10px auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    min-height: 40px;
    flex-wrap: wrap;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Roboto', sans-serif;
    color: white;
    text-align: center;
}

#active-tags::after {
    content: none;
}





/* COLOR ANALYSIS 1*/

.containerP {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    display: flow-root;
    height: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.containerP-intro {
    margin-bottom: 30px;
    text-align: center;
}

.containerP-intro p {
    margin: 0 auto 1.5rem;
    clear: both;
}

.containerP-intro .case-after-image {
    display: block;
    clear: both;
    margin-top: 2.5rem;
}

.containerP-intro h2 {
    margin-bottom: 15px;
    font-size: 28px;
}

.containerP-intro h4 {
    font-size: 18px;
    line-height: 1.6;
    color: #ccc;
}

.rhetoric-list {
    list-style: none;
    padding: 0;
    margin: 30px auto;
    max-width: 800px;
}

.rhetoric-list p {
    font-size: 18px;
    line-height: 1.6;
    color: #f0f0f0;
    margin: 0;
    text-align: left;
}

.rhetoric-image-box {
    width: min(564px, 100%);
    height: 226px;
    border: 1px dashed rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    margin: 10px auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.rhetoric-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.case-dual-image-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    width: min(795px, 100%);
    height: 224px;
    margin: 0 auto 2rem;
    clear: both;
}

.case-dual-image {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
}

.case-single-image-box {
    width: min(398px, 100%);
    height: 224px;
    margin: 0 auto 2rem;
    display: flex;
    justify-content: center;
    clear: both;
}

.case-video-copy {
    display: inline;
}

.case-video-copy .case-video-trigger {
    font-weight: 700;
    cursor: pointer;
    transition: color 0.3s ease;
    color: #4da3ff;
    text-decoration: underline;
}

.case-video-copy .case-video-trigger:hover {
    color: #8dc8ff;
}

.case-video-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.case-video-grid.case-video-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.case-video-grid.case-video-grid-2 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    max-width: 1200px;
}

.case-video-grid.case-video-grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    max-width: 1200px;
    height: clamp(255px, 29.1vw, 437px);
}

.case-video-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    aspect-ratio: 9 / 16;
    width: 70%;
    margin: 0 auto;
}

.case-video-item.case-video-item-landscape {
    aspect-ratio: 16 / 9;
}

.case-video-grid.case-video-grid-4 .case-video-item {
    width: 100%;
}

.case-video-grid.case-video-grid-2 .case-video-item {
    width: 100%;
}

.case-video-grid.case-video-grid-5 .case-video-item {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
}

.case-video-table {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    max-width: 600px;
    height: clamp(130px, 17vw, 210px);
    margin: 0 auto 40px;
}

.case-video-table .case-video-item {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
}

.case-video-table-right {
    display: grid;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.case-video-item .case-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    transition: opacity 0.3s ease;
    display: block;
}

@media (max-width: 900px) {
    .case-video-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .case-video-item {
        width: 100%;
    }

    .case-video-table {
        grid-template-columns: 1fr;
        height: auto;
    }

    .case-video-table .case-video-item {
        aspect-ratio: 9 / 16;
        height: auto;
    }
}

.time4tag, .histogram, #stat-SB {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.colorsx, .colordx {
    width: 100%;
    margin: 20px 0;
}

.colorcx {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.histogram {
    width: 100%;
    height: 600px;
    position: relative;
    margin: 20px 0;
}

.histogram canvas {
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 768px) {
    .containerP {
        padding: 15px;
        margin: 20px auto;
    }
    
    .containerP-intro h2 {
        font-size: 24px;
    }
    
    .containerP-intro h4 {
        font-size: 16px;
    }
}

.loading-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: #ef233c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .container-section .content-wrapper {
        padding: 15px;
    }
    
    .container-section .content-wrapper .container-1,
    .container-section .content-wrapper .container,
    .container-section .content-wrapper .graph1 {
        padding: 15px;
    }
}

/* Hero section styling */
.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.hero-content h1 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(45deg, #fff, #888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text {
  max-width: 800px;
}

/* Intro section styling */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.intro-text {
  padding: 1rem;
}

.intro-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Graph section styling */
.graph1 .images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 1rem;
}

.graph-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

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

.graph-card img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.graph-caption {
  color: #fff;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .intro-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-content h1 {
    font-size: 3rem;
  }
  
  .graph1 .images {
    grid-template-columns: 1fr;
  }
}

.time4tag {
    width: 100%;
    height: 600px;
    position: relative;
}

.time4tag canvas {
    width: 100% !important;
    height: 100% !important;
}

#stat-SB {
    width: 100%;
    height: 600px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#stat-SB h4 {
    font-size: 18px;
    line-height: 1.6;
    color: #ccc;
    margin: 0;
    text-align: center;
}

#scatterPlot {
    flex: 1;
    width: 100% !important;
    height: 100% !important;
}

.axis-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1;
    padding: 10px;
    border-radius: 5px;
}

.axis-selector label {
    color: white;
    margin-right: 10px;
}

.axis-selector select {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.axis-selector select:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.axis-selector select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
}

.histogram-container {
    width: 100%;
    height: 600px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 20px;
    position: relative;
}

.histogram-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.stat-container {
    width: 100%;
    margin: 20px 0;
}

#stat-SB svg {
    width: 100%;
    height: 100%;
    display: block;
}

.histogram-container {
    width: 100%;
    height: 600px;
    position: relative;
    margin: 20px 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 20px;
}

.histogram-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.axis-selector {
    margin-bottom: 20px;
    text-align: right;
}

.axis-selector label {
    color: white;
    margin-right: 10px;
}

.axis-selector select {
    background: rgba(0, 0, 0, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 4px;
}

.axis-selector select:focus {
    outline: none;
    border-color: #ef233c;
}

/* Button Row Styles */
.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

.button-row .btn4 {
    padding: 10px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.button-row .btn4:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.button-row .btn4.active {
    background-color: #ef233c;
    color: white;
    border-color: #ef233c;
}

/* Stile base comune per tutti i bottoni */
.btn-base {
    color: white;
    padding: 8px 12px;
    text-decoration: none;
    display: block;
    border-radius: 4px;
    transition: background-color 0.2s;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

.btn-base:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.btn-base.active {
    background-color: #ef233c;
    border-color: #ef233c;
    color: white;
}

/* Applico lo stile base ai vari tipi di bottoni */
.dropdown-content .btn4,
.suggestions .btn4 {
    composes: btn-base;
}

/* Rimuovo lo stile generico .btn4 che potrebbe causare conflitti */
.btn4 {
    composes: btn-base;
}

#resetBtn {
    composes: btn-base;
    background-color: #ef233c;
    border-color: #ef233c;
    width: 100%;
    max-width: 1000px;
    margin: 10px auto;
    display: block;
}

#resetBtn:hover {
    background-color: #d90429;
    border-color: #d90429;
}

.active-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    min-height: 40px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.active-tags:empty {
    display: flex;
    min-height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
