/**
 * Osservatorio SERP - Custom Styles
 */

/* General Styles */
* {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Heading Styles */
h1, h2, h3, h4, h5, h6 {
    font-weight: 200 !important;
}
a {
    color: #4c82f7;
}
a:hover {
    color: #1a68d1;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: radial-gradient(ellipse at bottom, #2c3e50 0%, #1a2332 100%);
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

/* Space Background - Stars Layer 1 (small stars) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 60px 70px, white, transparent),
        radial-gradient(1px 1px at 50px 50px, white, transparent),
        radial-gradient(1px 1px at 130px 80px, white, transparent),
        radial-gradient(2px 2px at 90px 10px, white, transparent),
        radial-gradient(1px 1px at 160px 120px, white, transparent),
        radial-gradient(2px 2px at 200px 90px, white, transparent),
        radial-gradient(1px 1px at 250px 30px, white, transparent),
        radial-gradient(1px 1px at 300px 100px, white, transparent),
        radial-gradient(2px 2px at 350px 60px, white, transparent);
    background-size: 400px 300px;
    background-repeat: repeat;
    animation: twinkle 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
    transform: translate(var(--stars-offset-1-x, 0), var(--stars-offset-1-y, 0));
    transition: transform 0.1s ease-out;
}

/* Space Background - Stars Layer 2 (medium stars) */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(3px 3px at 100px 150px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(2px 2px at 180px 220px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(3px 3px at 320px 180px, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(2px 2px at 420px 100px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(3px 3px at 520px 250px, rgba(255, 255, 255, 0.7), transparent);
    background-size: 600px 400px;
    background-repeat: repeat;
    animation: twinkle 3s ease-in-out infinite reverse;
    pointer-events: none;
    z-index: 0;
    transform: translate(var(--stars-offset-2-x, 0), var(--stars-offset-2-y, 0));
    transition: transform 0.1s ease-out;
}

/* Page Wrapper */
.page-wrapper {
    width: 80%;
    /*min-width: 1450px;*/
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Planets - Real elements for parallax */
.planet-parallax {
    position: fixed;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.planet-1 {
    width: 80px;
    height: 80px;
    box-shadow:
        0 0 20px rgba(79, 195, 247, 0.3),
        0 0 40px rgba(79, 195, 247, 0.2),
        0 0 60px rgba(79, 195, 247, 0.15);
    top: 15%;
    right: 7%;
}

.planet-1::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 100%;
    left: 0;
    top: 0;
    background: url('../../img/pianeta1map.jpg') repeat-x center/auto 100%;
    will-change: transform;
    animation: rotatePlanetTransform 50s linear infinite;
}

.planet-1::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 70% 50%, transparent 30%, rgba(0, 0, 0, 0.85) 100%);
    pointer-events: none;
}

.planet-2 {
    width: 60px;
    height: 60px;
    box-shadow:
        0 0 20px rgba(79, 195, 247, 0.3),
        0 0 40px rgba(79, 195, 247, 0.2),
        0 0 60px rgba(79, 195, 247, 0.15);
    bottom: 10%;
    right: 5%;
}

.planet-2::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 100%;
    left: 0;
    top: 0;
    background: url('../../img/pianeta2map.jpg') repeat-x center/auto 100%;
    will-change: transform;
    animation: rotatePlanetTransform 70s linear infinite;
}

.planet-2::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 70% 50%, transparent 30%, rgba(0, 0, 0, 0.85) 100%);
    pointer-events: none;
}

.planet-3 {
    width: 90px;
    height: 90px;
    box-shadow:
        0 0 20px rgba(255, 140, 50, 0.3),
        0 0 40px rgba(255, 120, 30, 0.2),
        0 0 60px rgba(220, 100, 20, 0.15);
    bottom: 20%;
    left: 2%;
}

.planet-3::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 100%;
    left: 0;
    top: 0;
    background: url('../../img/pianeta3map.jpg') repeat-x center/auto 100%;
    will-change: transform;
    animation: rotatePlanetTransform 80s linear infinite;
}

.planet-3::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 70% 50%, transparent 30%, rgba(0, 0, 0, 0.85) 100%);
    pointer-events: none;
}

.content-container {
    background-color: rgba(0,0,0,.5);
    border-radius: 12px;
    box-shadow: 0 1rem 3rem rgba(0,0,0,.9);
    /*overflow: hidden;*/
    margin-top: 0;
    position: relative;
    border: 1px solid rgba(255,255,255,.15);
    z-index: 1;
}


/* Header Styles */
/*header.navbar {*/
/*    background-color: transparent !important;*/
/*    color: white;*/
/*    padding-top: 30px;*/
/*    padding-bottom: 0;*/
/*    margin-bottom: 0;*/
/*}*/

.navbar-brand {
    /*font-weight: 600;*/
    /*font-size: 1.2rem;*/
    /*color: white !important;*/
    display: flex;
    /*align-items: flex-end;*/
    position: relative;
    /*top: 33px;*/
    z-index: 2;
}

/* Glow effect behind logo */
.navbar-brand::before {
    content: '';
    position: absolute;
    top: calc(50% + 50px);
    left: calc(50% + 40px);
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(100, 150, 255, 0.25) 0%, rgba(70, 130, 255, 0.15) 40%, transparent 70%);
    border-radius: 50%;
    animation: logoGlow 6s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

.navbar-brand i {
    color: white;
}

/* Main Navigation Menu */
header nav .navbar-nav .nav-link,
header nav.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    font-size: 0.95rem;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-radius: 4px;
}
header nav .navbar-nav .nav-link:hover,
header nav.navbar-nav .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}
header nav .navbar-nav .nav-link.active,
header nav.navbar-nav .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
    font-weight: 500;
}
header nav .navbar-nav .nav-link i.fa-external-link-alt,
header nav.navbar-nav .nav-link i.fa-external-link-alt {
    opacity: 0.7;
}
.navbar-toggler {
    padding: 5px 8px !important;
    border-color: #fff;
}
.navbar-toggler-icon {
    width: 20px;
    height: 20px;
}


/* Auth Modal */
.auth-modal #google-signin-button {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
}

.auth-modal #google-signin-button > div {
    margin: 0 auto;
}

.auth-modal #facebook-login-btn {
    background-color: #1877f2 !important;
    border-color: #1877f2 !important;
    color: white !important;
    font-weight: 500;
}

.auth-modal #facebook-login-btn:hover {
    background-color: #166fe5 !important;
    border-color: #166fe5 !important;
}

.auth-modal #facebook-login-btn:active {
    background-color: #1564d6 !important;
    border-color: #1564d6 !important;
}

/* Preferences Modal */
.preferences-modal .form-check {
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.preferences-modal .form-check:hover {
    background-color: #f8f9fa;
    border-color: #0d6efd;
}

.preferences-modal .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.25rem;
}

.preferences-modal .form-check-label {
    cursor: pointer;
    margin-left: 0.5rem;
}

/* User Dropdown Menu */
#user-menu-container .dropdown {
    position: relative;
}

#user-menu-container .dropdown-menu {
    /*position: absolute !important;*/
    /*top: 100% !important;*/
    /*right: 0 !important;*/
    /*left: auto !important;*/
    /*min-width: 280px;*/
    /*margin-top: 0.5rem;*/
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    /*border: 1px solid rgba(0, 0, 0, 0.1);*/
    /*background-color: #fff;*/
    z-index: 1050;
}

#user-menu-container .dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

#user-menu-container .dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

#user-menu-container .dropdown-item i {
    width: 20px;
    text-align: center;
}

#user-menu-container .dropdown-header {
    /*color: #333;*/
    /*font-weight: 400;*/
    /*padding: 0.75rem 1rem;*/
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 4px 4px 0 0;
    /*white-space: normal;*/
}

#user-menu-container .dropdown-header .fw-bold {
    font-size: 0.95rem;
    color: #212529;
    margin-bottom: 0.25rem;
}

#user-menu-container .dropdown-header img,
#user-menu-container .dropdown-header i {
    flex-shrink: 0;
}

#user-menu-container .dropdown-item-text {
    padding: 0.25rem 1rem;
}

/* User Menu & Language Selector */
header .navbar {
    /*display: flex !important;*/
    /*flex-direction: row !important;*/
    /*align-items: center !important;*/
    /*gap: 1rem !important;*/
    /*flex-wrap: nowrap !important;*/

    top: 24px;
    position: relative;
}

header .navbar-nav > .nav-item {
    flex-shrink: 0;
}

#user-menu-container {
    position: relative;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    min-width: fit-content;
}

#user-menu-container .btn {
    white-space: nowrap;
}

#user-menu-container .btn-link {
    display: inline-flex;
    align-items: center;
}

#user-menu-container img,
#user-menu-container i.fa-user-circle {
    vertical-align: middle;
}

#language-selector {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
    position: relative;
    z-index: 99;
}

#language-selector option {
    background-color: #2c3e50;
    color: white;
}

#language-selector:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.1);
}

/* Sidebar Styles */
.sidebar .sidebar-content {
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    /*position: sticky;*/
    top: 20px;
}

.sidebar-heading {
    font-weight: 200;
    color: #fff;
    border-bottom: none;
}

.sidebar-header {
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Sidebar Search */
#sector-search {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

#sector-search::placeholder {
    font-size: 0.75rem;
}

#sector-search:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.15rem rgba(0, 123, 255, 0.15);
}

#clear-sector-search {
    border-left: 0;
    padding: 0.25rem 0.5rem;
}

#clear-sector-search:hover {
    background-color: #f8f9fa;
}

.sidebar .nav {
    padding: 0;
    list-style: none;
}

.sidebar .nav-item {
    margin: 0;
}

.sector-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 0.9rem;
    gap: 10px;
    margin-bottom: 1px;
    color: #fff;
}


.sector-item:hover,
.sector-item.active {
    background-color: rgba(243, 246, 255, .2);
    color: #60b6ff;
    border-left-color: #60b6ff;
}

.sector-item.active .badge {
    background-color: rgba(255, 255, 255, 0.3) !important;
}
.sector-item:hover .sector-name,
.sector-item.active .sector-name {
    color: #60b6ff;
}
/*.sector-item .sector-name {*/
/*    flex: 1;*/
/*    overflow: hidden;*/
/*    text-overflow: ellipsis;*/
/*    white-space: nowrap;*/
/*    color: #fff;*/
/*}*/
.sector-item .sector-name {
    flex: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    color: #fff;
    display: block;
}

.sector-item .badge {
    flex-shrink: 0;
    min-width: 50px;
    text-align: center;
}

.sector-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chevron-toggle {
    cursor: pointer;
    font-size: 0.8rem;
    transition: transform 0.2s ease;
    width: 24px;
    height: 24px;
    background-color: #000;
    text-align: center;
    line-height: 24px;
    margin-inline: 10px;
    border-radius: 50px;
}

.chevron-toggle.rotated {
    transform: rotate(90deg);
}

.sector-children {
    display: none;
    background-color: rgba(0, 0, 0, 0.02);
}

.sector-children.show {
    display: block;
}

/* Main Content Styles */

#sector-title {
    font-weight: 200;
    color: #fff;
}

/* View Tabs */
#view-tabs .nav-link {
    color: #6c757d;
    font-weight: 500;
    transition: all 0.2s ease;
}

#view-tabs .nav-link:hover {
    color: #007bff;
}

#view-tabs .nav-link.active {
    background-color: #007bff;
    color: white;
}

/** COLORI BACKGROUND **/
.bg-gradient-primary {
    background-image: linear-gradient(120deg,#1a68d1,#6ca2ff);
}
.bg-gradient-info {
    background-image: linear-gradient(-45deg,#57c8f1,#0778a1);
}
.bg-gradient-danger {
    background-image: linear-gradient(-45deg,#ff3131,#a20000);
}
.bg-gradient-secondary {
    background-image: linear-gradient(120deg,#ba54f5,#759BFF);
}
.bg-gradient-success {
    background-image: linear-gradient(120deg,#0097b2,#7ed957);
}
.bg-gradient-warning {
    background-image: linear-gradient(120deg,#f0823e,#ffde59);
}
.bg-gradient-dark {
    background: -o-linear-gradient(-230deg, #444d65, #171e28, #171e28, #171e28, #444d65) !important;
    background: linear-gradient(-230deg, #444d65, #171e28, #171e28, #171e28, #444d65) !important;
    background-position: center;
}
.bg-default {
    background-color: #c7cbd6 !important;
}
.bg-primary {
    background-color: #4c82f7 !important;
}
.bg-success {
    background-color: #17c653 !important;
}
.bg-warning {
    background-color: #ffc107 !important;
}
.bg-info {
    background-color: #57c8f1 !important;
}
.bg-danger {
    background-color: #e36159 !important;
}
.bg-azzurro {
    background-color: #f3f6ff;
}
.bg-soft-info {
    background-color: rgba(0,201,255,.1) !important;
}
.bg-soft-primary {
    background-color: rgba(55,125,255,.1) !important;
}
.bg-soft-secondary {
    background-color: rgba(161,128,218,.175) !important;
}
.bg-soft-warning {
    background-color: rgba(255,193,7,.175) !important;
}
.bg-soft-success {
    background-color: rgba(23,198,83,.175) !important;
}
.bg-soft-danger {
    background-color: rgba(217,83,79,.175) !important;
}
.bg-soft-dark {
    background-color: rgba(5,5,10,.5);
    border: 1px solid rgba(255,255,255,.1) !important;
}
.bg-soft-light {
    background-color: rgba(255,255,255,.5);
}
.bg-secondary {
    background-color: #727cf5 !important;
}
.badge-soft-light {
    background-color: rgba(239,242,246,.175) !important;
    color: #eff2f6 !important;
}
.badge-soft-info {
    background-color: rgba(0,201,219,.1) !important;
    color: #1f9bcf !important;
}
.text-secondary {
    color: #727cf5 !important;
}
.text-seozoom {
    color: #0092a9 !important;
}
.text-dark {
    color: #212529 !important;
}
.text-success {
    color: #17c653 !important;
}
.text-danger {
    color: #e36159 !important;
}
.text-info {
    color: #57c8f1 !important;
}
.text-azzurro {
    color: #74c0fc !important;
}
.form-control:focus {
    box-shadow: none;
}
.bg-opacity-20 {
    --bs-bg-opacity: 0.2;
}
.box-circle {
    width: 70px;
    height: 70px;
    line-height: 45px;
    font-size: 2rem;
    text-align: center;
}

/** ALTRO ***/
/* Chrome, Edge, Safari */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #333; /* nero profondo per la traccia */
}

::-webkit-scrollbar-thumb {
    background: #000; /* pollice nero */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #222;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #000 #333; /* thumb | track */
}

fieldset {
    padding: .5rem .5rem 1rem;
    border: 1px solid #aaa;
    border-radius: 4px;
}
legend {
    width: auto;
    max-width: none;
    padding: 0 10px;
    font-size: inherit;
    float: none;
}
.f-80 {
    font-size: .8rem;
    line-height: 1.5;
}
.f-85 {
    font-size: .85rem;
    line-height: 1.5;
}
.f-100 {
    font-size: 1rem;
    line-height: 1.5;
}
.f-110 {
    font-size: 1.1rem;
    line-height: 1.5;
}
.border-secondary {
    border-color: #727cf5 !important;
}
.pagination .page-item a {
    background-color: #000;
    color: #fff;
    border-color: rgba(255,255,255,.15);
}
.pagination .page-item a:hover {
    opacity: 0.8;
}
.pagination .page-item.active a {
    background-color: #0092a9;
    color: #fff;
    border-color: #0092a9;
}
.pagination .page-item.disabled .page-link {
    background-color: #000;
    border-color: rgba(255,255,255,.15);
    color: #fff;
}
#whitepaper-content .whitepaper-info {
    color: #fff;
}
#volatility-legend span {
    color: #fff !important;
}
#analisys-cta,
#ranking-register-cta {
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: #fff;
}
#social-serp-chart .apexcharts-legend-text {
    color: #fff !important;
}
#traffic-chart .apexcharts-text,
#social-serp-chart .apexcharts-text {
    fill: #ADB5BD !important;
}
#social-serp-chart .apexcharts-gridlines-horizontal .apexcharts-gridline {
    stroke:rgba(255,255,255,0.1) !important;
}
#social-serp-chart .apexcharts-grid-borders .apexcharts-gridline:first-child {
    stroke: rgba(255,255,255,.15) !important;
}

/* Card Styles */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
    border-radius: 20px;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 200;
}
.card-header h5 {
    color: #0092a9;
    font-weight: 400 !important;
    padding-top: 0.5rem;
}


#social-serp-pie-chart .apexcharts-pie-area {
    stroke: #000;
}

/* SERP Features Compact Layout */
.serp-features-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 16px;
    padding: 16px;
    background-color: transparent;
}

.serp-feature-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 4px;
    border: 1px solid;
}

.serp-feature-item:hover {
    background-color: rgba(255,255,255,.15);
    /*padding-left: 8px;*/
    /*padding-right: 8px;*/
}
.serp-feature-item .feature-variation.text-muted {
    color: rgba(255,255,255,.5) !important;
}

.feature-icon-label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.feature-icon-label i {
    width: 20px;
    font-size: 16px;
    /*color: #6c757d;*/
    color: #0092a9;
}

.feature-label {
    font-size: 14px;
    /*color: #495057;*/
    color: #fff;
    /*white-space: nowrap;*/
    /*overflow: hidden;*/
    /*text-overflow: ellipsis;*/
}

.feature-values {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.feature-percentage {
    font-weight: 600;
    font-size: 14px;
    /*color: #212529;*/
    color: #fff;
    min-width: 60px;
    text-align: right;
}

.feature-variation {
    font-size: 13px;
    font-weight: 500;
    min-width: 45px;
    text-align: right;
}

/* Legacy Feature Cards (keeping for compatibility) */
.feature-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.feature-card .card-body {
    padding: 1.5rem 1rem;
}

.feature-card .card-title {
    font-size: 0.9rem;
    font-weight: 200;
    margin-bottom: 0.75rem;
    color: #495057;
}

.feature-card .display-6 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Loading State */
#loading-state {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Footer Styles */
.footer {
    background-color: transparent;
    border: none;
}

/* Responsive Adjustments */

@media screen and (max-width: 1280px) {
    .page-wrapper {
        width: 100%;
    }
}
@media screen and (max-width: 1199px) {
    .navbar-collapse {
        padding-bottom: 40px;
    }
    .nav-link {
        padding: 5px;
    }
}
@media screen and (max-width: 1024px) {
    .serp-features-compact {
        grid-template-columns: repeat(1, 1fr);
    }
}
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .page-wrapper {
        max-width: 100%;
        overflow: hidden;
    }

    .sidebar {
        position: static;
        margin-bottom: 20px;
    }

    .feature-card .display-6 {
        font-size: 1.5rem;
    }

    .serp-features-compact {
        grid-template-columns: 1fr;
        gap: 4px 0;
        padding: 12px;
    }

    .feature-label {
        font-size: 13px;
    }

    .feature-percentage {
        font-size: 13px;
        min-width: 50px;
    }

    .feature-variation {
        font-size: 12px;
        min-width: 40px;
    }
}
@media screen and (max-width: 767px) {
    .sidebar {
        max-height: none;
    }
    .navbar-brand {
        bottom: -16px;
    }
}
@media screen and (max-width: 470px) {
    #view-tabs li {
        width: 100%;
        margin: 0 0 5px !important;
    }
    #volatility-view .card-header {
        display: block !important;
    }
    #volatility-view .card-header h5 {
        margin-bottom: 15px !important;
    }
    #articles-content h5,
    #domains-content h5 {
        font-size: 1rem;
    }
    #news-articles-list table tbody tr td:nth-child(2) {
        width: 260px !important;
        display: block;
    }
    #news-content-tabs {
        display: flex;
        gap: 15px;
    }
    #social-content-tabs li {
        margin-bottom: 10px;
        width: 50%;
    }
    #news-domain-ranking-body tr td:nth-child(2) {
        width: 300px !important;
        display: block;
    }
}
@media screen and (max-width: 438px) {
    .navbar-brand .logo {
        width: 130px !important;
    }
}


/* Scrollbar Styles */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Chart Container */
#main-volatility-chart {
    min-height: 350px;
}
#features-detail-chart .apexcharts-text,
#main-volatility-chart .apexcharts-text {
    fill: #ADB5BD !important;
}
#main-volatility-chart .apexcharts-line-series .apexcharts-gridline,
#features-detail-chart .apexcharts-gridlines-horizontal .apexcharts-gridline {
    stroke: rgba(255,255,255,.15) !important;
}
#main-volatility-chart .apexcharts-gridline {
    stroke: rgba(255,255,255,.36) !important;
}
#main-volatility-chart .apexcharts-annotation-rect {
    opacity: .3 !important;
    stroke-width: 0 !important;
}
#main-volatility-chart .apexcharts-yaxis-annotations line {
    stroke: #fff !important;
}
#features-detail-chart .apexcharts-grid-borders .apexcharts-gridline:first-child {
    stroke: rgba(255,255,255,.15) !important;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.view-content {
    animation: fadeIn 0.3s ease;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.5em;
}

.bg-orange {
    background-color: #FF9800 !important;
    color: white !important;
}

.text-orange {
    color: #FF9800 !important;
}

/* Tooltips */
[title] {
    cursor: help;
}

/* SweetAlert2 Custom Styles */
.swal2-popup {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Country Selector */
#country-selector {
    min-width: 150px;
}

/* Language Selector */
#language-selector {
    min-width: 120px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.25rem;
}

#language-selector:focus {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

#language-selector option {
    background-color: #f8f9fa;
    color: #212529;
    border-radius: 0 !important;
}

#language-selector option:hover,
#language-selector option:checked {
    background-color: #e9ecef;
}

/* Ranking Table */

#ranking-table-container .table > :not(caption) > * > * {
    background-color: transparent !important;
}

#news-articles-list .table thead th,
#news-domain-ranking-table .table thead th,
#ai-overview-table-container .table thead th,
#wl-table-container .table thead th,
#ranking-table-container .table thead th {
    background-color: transparent !important;
    border-bottom: 2px solid #fff !important;
    font-weight: 500;
    color: rgba(255,255,255,.5) !important;
}

#ranking-table-container .table tbody tr:hover {
    background-color: rgba(255,255,255,.15);
}
#ranking-table-container .table tbody tr td {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #fff;
}
#news-domain-ranking-table .table tbody tr td .fa-external-link-alt,
#ai-overview-table-container .table tbody tr td .fa-external-link-alt,
#ranking-table-container .table tbody tr td .fa-external-link-alt {
    color: #fff !important;
}

#news-articles-list .table tbody tr td .fa-external-link-alt {
    color: #74c0fc !important;
}

#ranking-table-container .table tbody tr td:first-child {
    font-weight: 600;
    color: #6c757d;
}

#ranking-table-container .fa-medal {
    vertical-align: middle;
}

/* Ranking Progress Bar */
#ranking-table-container .progress {
    background-color: #e9ecef;
    border-radius: 10px;
}

#ranking-table-container .progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Winners & Losers Table */
/*#wl-tabs {*/
/*    border-bottom: 1px solid #dee2e6;*/
/*}*/

#wl-tabs .nav-link {
    color: #6c757d;
    font-weight: 500;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 0.75rem 1.5rem;
}

#wl-tabs .nav-link:hover {
    border-bottom-color: #dee2e6;
    background-color: transparent;
}

#wl-tabs .nav-link.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background-color: transparent;
}

#wl-table-container .table {
    margin-bottom: 0;
}

#youtube-content .table > :not(caption) > * > *,
#facebook-content .table > :not(caption) > * > *,
#instagram-content .table > :not(caption) > * > *,
#tiktok-content .table > :not(caption) > * > *,
#linkedin-content .table > :not(caption) > * > *,
#pinterest-content .table > :not(caption) > * > *,
#x-content .table > :not(caption) > * > *,
#reddit-content .table > :not(caption) > * > *,
#news-articles-list .table > :not(caption) > * > *,
#news-domain-ranking-table .table > :not(caption) > * > *,
#ai-overview-table-container .table > :not(caption) > * > *,
#wl-table-container .table > :not(caption) > * > * {
    background-color: transparent !important;
}

#youtube-content .table thead th,
#facebook-content .table thead th,
#instagram-content .table thead th,
#tiktok-content .table thead th,
#linkedin-content .table thead th,
#pinterest-content .table thead th,
#x-content .table thead th,
#reddit-content .table thead th,
#news-articles-list .table thead th,
#news-domain-ranking-table .table thead th,
#ai-overview-table-container .table thead th,
#wl-table-container .table thead th {
    /*background-color: #f8f9fa;*/
    /*border-bottom: 2px solid rgba(255,255,255,0.1);*/
    /*font-weight: 600;*/
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    /*color: #495057;*/
    padding: 1rem;

    background-color: transparent !important;
    border-bottom: 2px solid #fff !important;
    font-weight: 500;
    color: rgba(255,255,255,.5) !important;
}
#youtube-content .table tbody td,
#facebook-content .table tbody td,
#instagram-content .table tbody td,
#tiktok-content .table tbody td,
#linkedin-content .table tbody td,
#pinterest-content .table tbody td,
#x-content .table tbody td,
#reddit-content .table tbody td,
#news-articles-list .table tbody td,
#news-articles-list .table tbody td .text-dark,
#news-domain-ranking-table .table tbody td,
#ai-overview-table-container .table tbody td {
    color: #fff;
}
#youtube-content .table tbody td .text-muted,
#facebook-content .table tbody td .text-muted,
#instagram-content .table tbody td .text-muted,
#tiktok-content .table tbody td .text-muted,
#linkedin-content .table tbody td .text-muted,
#pinterest-content .table tbody td .text-muted,
#x-content .table tbody td .text-muted,
#reddit-content .table tbody td .text-muted,
#news-articles-list .table tbody td .text-muted,
#news-domain-ranking-table .table tbody td .text-muted,
#ai-overview-table-container .table tbody td .text-muted {
    color: rgba(255,255,255,0.5) !important;
}
#youtube-content .table tbody td,
#facebook-content .table tbody td,
#instagram-content .table tbody td,
#tiktok-content .table tbody td,
#linkedin-content .table tbody td,
#pinterest-content .table tbody td,
#x-content .table tbody td,
#reddit-content .table tbody td,
#news-articles-list .table tbody td,
#news-domain-ranking-table .table tbody td,
#ai-overview-table-container .table tbody td,
#wl-table-container .table tbody td {
    vertical-align: middle;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
#youtube-content .table tbody tr td .fa-external-link-alt,
#facebook-content .table tbody tr td .fa-external-link-alt,
#instagram-content .table tbody tr td .fa-external-link-alt,
#tiktok-content .table tbody tr td .fa-external-link-alt,
#linkedin-content .table tbody tr td .fa-external-link-alt,
#pinterest-content .table tbody tr td .fa-external-link-alt,
#x-content .table tbody tr td .fa-external-link-alt,
#reddit-content .table tbody tr td .fa-external-link-alt,
#wl-table-container .table tbody tr td .fa-external-link-alt {
    color: #fff !important;
}
#youtube-content .table tbody tr td:first-child,
#facebook-content .table tbody tr td:first-child,
#instagram-content .table tbody tr td:first-child,
#tiktok-content .table tbody tr td:first-child,
#linkedin-content .table tbody tr td:first-child,
#pinterest-content .table tbody tr td:first-child,
#x-content .table tbody tr td:first-child,
#reddit-content .table tbody tr td:first-child,
#news-articles-list .table tbody tr td:first-child,
#news-domain-ranking-table .table tbody tr td:first-child,
#ai-overview-table-container .table tbody tr td:first-child,
#wl-table-container .table tbody tr td:first-child {
    font-weight: 600;
    color: #6c757d !important;
}
#youtube-content .table tbody tr:last-child td,
#facebook-content .table tbody tr:last-child td,
#instagram-content .table tbody tr:last-child td,
#tiktok-content .table tbody tr:last-child td,
#linkedin-content .table tbody tr:last-child td,
#pinterest-content .table tbody tr:last-child td,
#x-content .table tbody tr:last-child td,
#reddit-content .table tbody tr:last-child td,
#news-articles-list .table tbody tr:last-child td,
#news-domain-ranking-table .table tbody tr:last-child td,
#ai-overview-table-container .table tbody tr:last-child td,
#wl-table-container .table tbody tr:last-child td {
    border-bottom: none;
}
#youtube-content .table tbody tr:hover,
#facebook-content .table tbody tr:hover,
#instagram-content .table tbody tr:hover,
#tiktok-content .table tbody tr:hover,
#linkedin-content .table tbody tr:hover,
#pinterest-content .table tbody tr:hover,
#x-content .table tbody tr:hover,
#reddit-content .table tbody tr:hover,
#news-articles-list .table tbody tr:hover,
#news-domain-ranking-table .table tbody tr:hover,
#ai-overview-table-container .table tbody tr.wl-table-row:hover,
#wl-table-container .table tbody tr.wl-table-row:hover {
    background-color: rgba(255,255,255,.1);
    transition: background-color 0.2s ease;
}
#winners-view .table tbody td .text-muted,
#news-articles-list .table tbody td .text-dark {
    color: #fff !important;
}
#news-articles-list .table tbody td .bg-light.text-dark {
    color: #212529 !important;
}



#wl-table-container [data-bs-toggle="popover"] {
    border-bottom: 1px dotted currentColor;
    cursor: help;
}
#news-register-cta,
#ai-overview-register-cta,
#wl-register-cta {
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: #fff;
}
#social-content-tabs {
    border-color: rgba(255,255,255,.15);
}
#social-content-tabs .nav-link,
#news-category-details .card-header-tabs .nav-link {
    background-color: transparent !important;
    border: none;
    color: #fff;
}
#social-content-tabs .nav-link.active,
#news-category-details .card-header-tabs .nav-link.active {
    border: none;
    border-bottom: 1px solid #0d6efd;
    color: #0d6efd;
}
#social-content-tab-content div[class="text-center py-4 mt-4"] {
    background: linear-gradient(-230deg, #444d65, #171e28, #171e28, #171e28, #444d65) !important;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: #fff;
}
#social-content-tab-content div[class="text-center py-4 mt-4"] .text-muted {
    color: rgba(255,255,255,0.5) !important;
}

/* Popover custom styles */
.popover {
    font-size: 0.875rem;
}

.popover-header {
    font-weight: 600;
    background-color: #f8f9fa;
}

.popover-body {
    font-size: 0.9rem;
    line-height: 1.8;
}

.popover-body strong {
    display: inline-block;
    min-width: 80px;
    color: #495057;
}

.popover-body .text-success {
    color: #28a745 !important;
    font-weight: 600;
}

.popover-body .text-danger {
    color: #dc3545 !important;
    font-weight: 600;
}

.popover-body .text-muted {
    color: #6c757d !important;
}

.popover-body small {
    font-size: 0.7em;
}

/* Winners/Losers Search - Hidden rows */
#wl-table-body tr.d-none {
    display: none !important;
}

/* Winners/Losers Search Box */
#wl-search-input:focus {
    box-shadow: none;
    border-color: #dee2e6;
}

#wl-search-input:focus + #wl-search-clear {
    border-color: #dee2e6;
}

.search-box .input-group-text {
    border-right: 0;
}

.search-box .form-control {
    border-left: 0;
}

.search-box .form-control:focus {
    border-color: #dee2e6;
}

/* UFO and Abduction Animation */
.ufo {
    position: fixed;
    width: 50px;
    height: 25px;
    background: linear-gradient(180deg, #4a5568 0%, #2d3748 50%, #1a202c 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow:
        0 0 20px rgba(100, 200, 255, 0.6),
        inset 0 -10px 20px rgba(0, 0, 0, 0.5),
        inset 0 5px 10px rgba(255, 255, 255, 0.3);
    z-index: 0;
    pointer-events: none;
    transform-origin: center center;
}

.ufo::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 25px;
    height: 12px;
    background: radial-gradient(circle, rgba(100, 200, 255, 0.8), transparent 70%);
    border-radius: 50%;
    animation: ufoPulse 1s ease-in-out infinite;
}

.ufo::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 10%;
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 0, 0, 0.8) 20%,
        rgba(0, 255, 0, 0.8) 40%,
        rgba(0, 100, 255, 0.8) 60%,
        rgba(255, 255, 0, 0.8) 80%,
        transparent
    );
    border-radius: 50%;
    animation: ufoLights 0.5s linear infinite;
}

@keyframes ufoPulse {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes ufoLights {
    0% { background-position: 0 0; }
    100% { background-position: 100px 0; }
}

.ufo-beam {
    position: fixed;
    width: 60px;
    height: 100px;
    z-index: 0;
    pointer-events: none;
    transform-origin: center top;
    opacity: 0;
    transition: opacity 0.5s ease;
    background: linear-gradient(to bottom,
        rgba(100, 200, 255, 0.5) 0%,
        rgba(100, 200, 255, 0.35) 30%,
        rgba(100, 200, 255, 0.2) 60%,
        rgba(100, 200, 255, 0.05) 90%,
        transparent 100%
    );
    clip-path: polygon(
        50% 0%,
        0% 100%,
        10% 102%,
        20% 103%,
        30% 104%,
        40% 104.5%,
        50% 105%,
        60% 104.5%,
        70% 104%,
        80% 103%,
        90% 102%,
        100% 100%
    );
    border-radius: 0 0 50% 50%;
}

.ufo-beam.active {
    opacity: 1;
    animation: beamPulse 2s ease-in-out infinite;
}

@keyframes beamPulse {
    0%, 100% {
        opacity: 0.6;
        filter: brightness(1);
    }
    50% {
        opacity: 0.9;
        filter: brightness(1.3);
    }
}

.abducted-person {
    position: fixed;
    font-size: 20px;
    z-index: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(-50%);
    opacity: 1;
}

/* Print Styles */
@media print {
    .sidebar,
    .navbar,
    .footer,
    #view-tabs,
    .btn-toolbar {
        display: none !important;
    }

    main {
        margin: 0 !important;
        padding: 0 !important;
    }

    .card {
        box-shadow: none !important;
        page-break-inside: avoid;
    }
}

/* Space Animations */

/* Twinkling stars */
@keyframes twinkle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Logo glow effect */
@keyframes logoGlow {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* Planet transform rotation - uses GPU acceleration for smooth scrolling */
@keyframes rotatePlanetTransform {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* Shooting star / Comet */
@keyframes shootingStar {
    0% {
        transform: translateX(-100px) translateY(-100px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(1000px) translateY(500px);
        opacity: 0;
    }
}

/* Comet element */
header.navbar::before {
    content: '';
    position: fixed;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    box-shadow:
        0 0 10px 2px rgba(255, 255, 255, 0.8),
        -80px 0 15px 2px rgba(255, 255, 255, 0.4),
        -150px 0 10px 1px rgba(255, 255, 255, 0.2),
        -220px 0 8px 1px rgba(255, 255, 255, 0.1);
    top: 5%;
    left: -150px;
    animation: shootingStar 8s ease-in-out infinite;
    animation-delay: 2s;
    z-index: 10;
    pointer-events: none;
}

header.navbar::after {
    content: '';
    position: fixed;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow:
        0 0 8px 2px rgba(255, 255, 255, 0.8),
        -60px 0 12px 2px rgba(255, 255, 255, 0.4),
        -110px 0 8px 1px rgba(255, 255, 255, 0.2);
    top: 12%;
    left: -100px;
    animation: shootingStar 10s ease-in-out infinite;
    animation-delay: 6s;
    z-index: 10;
    pointer-events: none;
}

/* Observatory Light Beam Container */
.observatory-wrapper {
    position: relative;
    display: inline-block;
}

/* Observatory Light Beam */
.observatory-beam {
    position: absolute;
    width: 300px;
    height: 120px;
    left: 50%;
    top: calc(30% - 70px);
    transform-origin: 0% 50%;
    pointer-events: none;
    z-index: -1;
}

.observatory-beam::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        rgba(255, 255, 200, 0.3) 0%,
        rgba(255, 255, 150, 0.15) 40%,
        rgba(255, 255, 100, 0.05) 70%,
        transparent 100%);
    clip-path: polygon(0% 50%, 100% 0%, 100% 100%);
    filter: blur(8px);
    animation: observatoryBeamSweep 6s ease-in-out infinite;
    transform-origin: 0% 50%;
}

.observatory-beam::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 80%;
    top: 10%;
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 200, 0.2) 30%,
        rgba(255, 255, 150, 0.08) 60%,
        transparent 100%);
    clip-path: polygon(0% 50%, 100% 0%, 100% 100%);
    filter: blur(4px);
    animation: observatoryBeamSweep 6s ease-in-out infinite;
    transform-origin: 0% 50%;
}

/* Light Beam Sweep Animation */
@keyframes observatoryBeamSweep {
    0%, 100% {
        transform: rotate(-35deg);
        opacity: 0.6;
    }
    50% {
        transform: rotate(-5deg);
        opacity: 0.9;
    }
}

/* ============================================================================
   Studi di Settore - Sidebar Active Item
   ============================================================================ */

/* Override Bootstrap's default active state for list-group items in studi-di-settore */
#whitepaper-list.list-group-flush > .list-group-item,
#boxListSection.list-group-flush > .list-group-item {
    background-color: transparent;
    color: #fff;
    border-color: rgba(255,255,255,.15);
}
#whitepaper-list.list-group-flush > .list-group-item:focus,
#boxListSection.list-group-flush > .list-group-item:focus {
    box-shadow: none;
}
#whitepaper-list.list-group-flush > .list-group-item .text-muted,
#boxListSection.list-group-flush > .list-group-item .text-muted {
    color: rgba(255,255,255,.5) !important;
}
#whitepaper-list.list-group-flush > .list-group-item:last-child {
    border: none;
}
.list-group-item-action.active {
    background-color: rgba(74, 144, 226, .16) !important;
    border-color: #4a90e2 !important;
    color: white !important;
}

/* Ensure icons remain visible on active items */
.list-group-item-action.active i {
    color: white !important;
    opacity: 1 !important;
}

/* Hover state for non-active items */
.list-group-item-action:hover:not(.active) {
    background-color: #f8f9fa;
}

/* Focus state */
.list-group-item-action:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}
#apexchartsojondvvy .apexcharts-text tspan,
#ai-overview-chart .apexcharts-text tspan {
    fill: #ADB5BD !important;
}
#ai-overview-chart .apexcharts-text {
    fill: #fff !important;
}
#apexchartsojondvvy .apexcharts-gridline,
#ai-overview-chart .apexcharts-gridline {
    stroke: rgba(255,255,255,.15) !important;
    stroke-width: 1 !important;
}
#ai-overview-chart .apexcharts-grid-row {
    fill: rgba(0,0,0,0) !important;
}

#social-serp-pie-chart .apexcharts-legend-text {
    color: #fff !important;
}
#social-serp-pie-chart .apexcharts-legend-marker {
    border: 1px solid #fff !important;
}
