:root {
    /* Batman Theme Colors */
    --bg-dark: #0a0a0a;
    --bg-panel: rgba(20, 20, 20, 0.7);
    --brand-primary: #ffcc00;
    /* Batman Yellow */
    --brand-secondary: #e6b800;
    /* Darker Yellow */
    --brand-gradient: linear-gradient(135deg, #ffd700, #b38f00);
    /* Yellow to Gold */
    --accent-glow: rgba(255, 204, 0, 0.2);
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
}

/*
2. Controllare le padding e font-size di `.globodigit-container p` e `h2` per schermi 320px.
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html,
body {
    /* 1. Aggiungere overflow-x: hidden a html e body */
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    position: relative;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(255, 204, 0, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(100, 100, 100, 0.05), transparent 25%);
}

/* Background Effects */
.background-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow-y: auto;
    overflow-x: hidden;
    pointer-events: none;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
    animation: float 10s infinite alternate ease-in-out;
}

.glow-1 {
    width: 400px;
    height: 400px;
    background: #bc1888;
    top: -100px;
    left: -100px;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: #fa7e1e;
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

/* Main Container */
.container {
    max-width: 900px;
    width: 95%;
    margin: 40px auto;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 20px rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.2);
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow-x: hidden;
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-container {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.logo-icon {
    font-size: 3rem;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 300;
}

/* Tabs */
.tabs-container {
    margin-bottom: 24px;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 6px;
    gap: 4px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 8px 6px;
    /* Ridotto il padding interno */
    border-radius: 12px;
    font-size: 0.82rem;
    /* Rimpicciolito il carattere globale dei pulsanti */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    /* Ridotto lo spazio tra l'icona e il testo */
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: var(--brand-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(214, 41, 118, 0.3);
}

.tab-content {
    display: none;
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.4s ease;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.tab-content.active {
    display: block;
}

.tab-description {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Search Box */
.search-section {
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 100%;
}

.search-box:focus-within {
    border-color: rgba(214, 41, 118, 0.5);
    box-shadow: 0 0 0 4px var(--accent-glow), 0 8px 32px rgba(0, 0, 0, 0.2);
}

.search-icon {
    font-size: 1.4rem;
    color: var(--text-muted);
    margin-left: 16px;
}

input[type="text"],
input[type="url"] {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    padding: 16px;
    color: var(--text-main);
    font-size: 1.1rem;
    outline: none;
}

input[type="text"]::placeholder,
input[type="url"]::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-btn {
    background: var(--brand-gradient);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(214, 41, 118, 0.4);
}

.search-btn:active {
    transform: translateY(0);
}

/* Filters */
.filters {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
}

.news-search-box {
    background: rgba(0, 0, 0, 0.45) !important;
    border: 1px solid rgba(0, 242, 254, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.news-search-box:focus-within {
    border-color: #00f2fe !important;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
    transform: scale(1.01);
}

.news-category {
    width: 100%;
}

.news-category h4 {
    font-size: 0.85rem;
    color: var(--brand-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 204, 0, 0.1);
    padding-bottom: 6px;
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 5px 0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.checkbox-container:hover {
    color: var(--text-main);
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
}

.checkbox-container input:checked~.checkmark {
    background: var(--brand-gradient);
    border-color: transparent;
}

.checkbox-container input:checked~.checkmark::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

/* Select Dropdown */
.select-container {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px 12px;
    transition: all 0.3s ease;
}

.select-container:hover {
    border-color: rgba(214, 41, 118, 0.5);
}

.select-icon {
    color: var(--text-muted);
    margin-right: 8px;
    font-size: 1.1rem;
}

.glass-select {
    background: transparent;
    color: var(--text-muted);
    border: none;
    outline: none;
    font-size: 0.9rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 20px;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%238b8b9e%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 0px top 50%;
    background-size: 10px auto;
}

.glass-select option {
    background: var(--bg-dark);
    color: var(--text-main);
}

.glass-select:focus {
    color: var(--text-main);
}

/* Notes & Textareas specific */
.glass-input {
    box-sizing: border-box;
    max-width: 100%;
}

/* Results Info */
.info-card {
    background: rgba(214, 41, 118, 0.1);
    border: 1px solid rgba(214, 41, 118, 0.2);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.info-icon {
    color: var(--brand-primary);
    font-size: 1.2rem;
    margin-top: 2px;
}

.info-card p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
}

.info-card strong {
    color: var(--text-main);
}

.highlight {
    color: var(--brand-secondary);
    font-weight: 600;
}

@media (max-width: 550px) {
    .tabs-container {
        position: sticky;
        top: 0;
        z-index: 100;
        background: var(--bg-dark);
        /* Per evitare che scorrano elementi sotto trasparenti */
        padding-top: 10px;
        padding-bottom: 10px;
        margin-bottom: 15px;
    }

    .tabs {
        flex-direction: row;
        /* Scorri in orizzontale anziché impilare in colonne per salvare spazio */
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 5px;
        /* Spazio per la scrollbar se serve */
    }

    .tab-btn {
        width: auto;
        white-space: nowrap;
        justify-content: center;
        flex: 0 0 auto;
    }

    .notes-container {
        flex-direction: column;
        gap: 15px !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .notes-sidebar,
    .notes-main,
    .glass-panel {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    #pdfExportArea {
        padding: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Force inputs inside notes to stay within container on small screens */
    #noteDate,
    #noteTitle,
    #noteContent,
    .glass-input,
    input[type="text"],
    textarea {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    #noteSavedMsg {
        width: 100%;
        text-align: center;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
        margin: 16px;
    }

    .search-box {
        flex-direction: column;
        padding: 16px;
        background: rgba(0, 0, 0, 0.2);
    }

    .search-icon {
        display: none;
    }

    input[type="text"],
    input[type="url"],
    .input-group input {
        width: 100%;
        text-align: center;
        padding: 8px 0 16px;
        font-size: 0.95rem;
    }

    .input-group {
        flex-direction: column;
        padding: 12px 16px;
    }

    .input-group i {
        margin-right: 0;
        margin-bottom: 8px;
    }

    .osint-mode-select {
        font-size: 0.90rem;
    }

    .search-btn,
    .osint-btn {
        width: 100%;
        justify-content: center;
    }

    /* Make Audio Player fit on Mobile screens */
    .audio-player-widget {
        width: 90%;
        right: 5%;
        bottom: 16px;
    }

    .player-title {
        font-size: 0.85rem;
    }

    .station-select {
        font-size: 0.85rem;
        padding-right: 12px;
    }
}

/* OSINT Tab Styles */
.osint-selector-container {
    margin-bottom: 24px;
}

.osint-mode-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 204, 0, 0.3);
    border-radius: 12px;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffcc00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    transition: all 0.3s ease;
}

.osint-mode-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.osint-mode-select option {
    background-color: var(--bg-dark);
    color: var(--text-main);
}

.osint-dynamic-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 4px 12px;
    transition: all 0.3s ease;
}

.input-group:focus-within {
    border-color: rgba(255, 204, 0, 0.5);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.input-group i {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-right: 8px;
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 0;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.osint-btn {
    margin-top: 8px;
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 1.1rem;
    background: var(--brand-gradient);
    color: #000;
}

/* TikTok Viral Radar Styles */
#trendsTab .osint-btn {
    background: linear-gradient(45deg, #111, #222);
    color: #00f2fe;
    border: 1px solid #00f2fe;
}

#trendsTab .osint-btn:hover {
    background: rgba(0, 242, 254, 0.1);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
}

.trend-chip {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.trend-chip:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.trend-chip.selected {
    background: rgba(0, 242, 254, 0.05);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.2),
        inset 0 0 10px rgba(254, 15, 92, 0.1);
}

/* Batman Chillout Player */
.audio-player-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 204, 0, 0.2);
    border-radius: 12px;
    width: 300px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    transition: all 0.3s ease;
}

.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.5);
    color: var(--brand-primary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
}

.player-header i {
    font-size: 1.2rem;
}

.player-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.player-btn:hover {
    color: var(--brand-primary);
}

.player-body {
    height: 80px;
    transition: height 0.3s ease;
    background: #000;
}

.player-body.collapsed {
    height: 0;
}


/* Custom Audio Player */
.custom-audio-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    height: 100%;
}

.audio-btn {
    background: transparent;
    border: none;
    color: var(--brand-primary);
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* AI Warning Message */
.ai-warning-msg {
    background: rgba(255, 170, 0, 0.15);
    border: 1px solid rgba(255, 170, 0, 0.3);
    color: #ffaa00;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeIn 0.3s ease;
}

.ai-warning-msg i {
    font-size: 1.1rem;
}

.audio-btn:hover {
    transform: scale(1.1);
    color: var(--brand-secondary);
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.volume-container input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
}

.volume-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--brand-primary);
    cursor: pointer;
}


/* Station Select Styling */
.player-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.station-select {
    background: transparent;
    border: none;
    color: var(--brand-primary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    outline: none;
    appearance: none;
    padding-right: 16px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffcc00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 14px;
}

.station-select option {
    background-color: var(--bg-dark);
    color: var(--text-main);
}

/* News Tab Styles */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 15px;
}

.news-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    border-color: #339af0;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(28, 126, 214, 0.15);
}

.news-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.news-source-badge {
    background: rgba(28, 126, 214, 0.2);
    color: #339af0;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid rgba(51, 154, 240, 0.3);
}

.news-date {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.news-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.4;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #339af0;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
}

.news-link:hover {
    color: #74c0fc;
    text-decoration: underline;
}

.osint-keyword {
    color: #00f2fe;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(0, 242, 254, 0.1);
    padding: 1px 4px;
    border-radius: 4px;
    display: inline-block;
}

.osint-keyword:hover {
    background: rgba(0, 242, 254, 0.25);
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.5);
    transform: scale(1.05);
}

/* Keyword semantica del pilastro: evidenziazione dorata */
.topic-keyword {
    color: #fab005 !important;
    background: rgba(250, 176, 5, 0.12) !important;
    border: 1px solid rgba(250, 176, 5, 0.25);
    font-weight: 800;
}

.topic-keyword:hover {
    background: rgba(250, 176, 5, 0.25) !important;
    box-shadow: 0 0 10px rgba(250, 176, 5, 0.45) !important;
}

@media (max-width: 550px) {
    body {
        padding-bottom: 120px;
        align-items: flex-start;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-wrap: wrap;
        gap: 8px;
    }

    .tab-btn {
        flex: 1 1 30%;
        font-size: 0.75rem;
        padding: 8px 4px;
        gap: 4px;
    }

    .checkbox-container {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* =========================================
   NOTE & CALENDAR STYLES (NEW)
   ========================================= */

#notesTab .glass-panel {
    transition: all 0.3s ease;
}

#notesTab .glass-panel:hover {
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.15);
    border-color: rgba(0, 242, 254, 0.3);
}

.ai-widget-btn {
    box-sizing: border-box;
}

.ai-widget-btn:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.ai-widget-btn i {
    transition: transform 0.3s ease;
}

.ai-widget-btn:hover i {
    transform: scale(1.2) rotate(5deg);
}

#noteContent:focus,
#noteTitle:focus,
#noteDate:focus {
    border-color: #00f2fe !important;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

/* Scrollbar personalizzata per la Textarea */
#noteContent::-webkit-scrollbar {
    width: 8px;
}

#noteContent::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

#noteContent::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 254, 0.3);
    border-radius: 4px;
}

#noteContent::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 242, 254, 0.6);
}

/* =========================================
   GLOBODIGIT COMPANY STYLES (NEW)
   ========================================= */

.globodigit-container {
    width: 100%;
    max-width: 100%;
    /* Previene l'overflow orizzontale su device stretti */
    box-sizing: border-box;
    overflow-x: hidden;
    padding: 20px 10px !important;
}

.company-description {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
    padding: 15px !important;
    overflow: hidden;
    word-break: break-word;
}

.logo-wrapper:hover #globodigitLogoPlaceholder {
    border-color: #00f2fe !important;
    box-shadow: 0 0 40px rgba(0, 242, 254, 0.3) !important;
    transform: scale(1.05);
}

.social-icon-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .container {
        padding: 12px;
        width: 100%;
        border-radius: 0;
        margin: 0;
    }

    .tab-content {
        padding: 12px;
    }

    .news-title {
        font-size: 0.95rem;
    }

    .news-desc {
        font-size: 0.8rem;
    }

    .notes-container {
        flex-direction: column;
    }

    .globodigit-container p.subtitle {
        font-size: 0.8rem !important;
        margin-bottom: 20px !important;
    }

    .globodigit-container .company-description {
        padding: 10px !important;
    }

    .globodigit-container .logo-wrapper #globodigitLogoPlaceholder {
        width: 80px !important;
        height: 80px !important;
    }

    .globodigit-container .company-description div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
}

/* ===== World Monitor Special Link & Tooltip ===== */
.wm-link-wrapper:hover .wm-tooltip {
    display: block !important;
    animation: fadeInTooltip 0.3s ease-out forwards;
}

@keyframes fadeInTooltip {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.wm-special-link:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, rgba(255, 160, 0, 0.15), rgba(255, 100, 0, 0.1)) !important;
    border-color: rgba(255, 160, 0, 0.8) !important;
    box-shadow: 0 0 15px rgba(255, 160, 0, 0.2);
}

/* Responsiveness for WM Link */
@media (max-width: 480px) {
    .wm-link-wrapper {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }

    .wm-special-link {
        width: 100%;
        justify-content: center;
        padding: 10px 14px !important;
    }

    .wm-tooltip {
        bottom: auto !important;
        top: calc(100% + 10px) !important;
        transform: translateX(-50%) !important;
    }

    .wm-tooltip div {
        bottom: auto !important;
        top: -7px !important;
        border-right: none !important;
        border-bottom: none !important;
        border-left: 1px solid rgba(255, 160, 0, 0.4) !important;
        border-top: 1px solid rgba(255, 160, 0, 0.4) !important;
    }
}

/* ===== Brochure Animations & Styles ===== */
@keyframes brochureArrowFloat {

    0%,
    100% {
        transform: translateX(0px);
    }

    50% {
        transform: translateX(5px);
    }
}

#brochureDownloadBtn:hover {
    background: rgba(255, 255, 255, 0.13) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45) !important;
}

/* ===== Responsive adjustments for Brochure button and Logo ===== */
@media (max-width: 768px) {
    #brochureDownloadBtn {
        padding: 12px 20px !important;
    }

    .globodigit-container>div:first-child {
        gap: 20px !important;
    }

    #globodigitLogoContainer+div {
        margin-left: 0 !important;
    }
}

@media (max-width: 480px) {
    #brochureDownloadBtn {
        padding: 10px 16px !important;
    }

    #brochureDownloadBtn span {
        font-size: 0.85rem !important;
    }

    .globodigit-container>div:first-child {
        flex-direction: column !important;
        gap: 15px !important;
    }

    #globodigitLogoContainer+div {
        flex-direction: column !important;
        margin-left: 0 !important;
    }

    .globodigit-container .ri-arrow-right-line {
        transform: rotate(90deg);
        animation: brochureArrowFloatMobile 2s ease-in-out infinite !important;
        margin-bottom: 10px;
    }
}

@keyframes brochureArrowFloatMobile {

    0%,
    100% {
        transform: rotate(90deg) translateX(0px);
    }

    50% {
        transform: rotate(90deg) translateX(5px);
    }
}

/* ===== Header Icon Glow Animation ===== */
@keyframes headerIconGlow {
    0% {
        filter: drop-shadow(0 0 6px rgba(0, 242, 254, 0.5)) drop-shadow(0 0 14px rgba(109, 219, 60, 0.2));
    }
    100% {
        filter: drop-shadow(0 0 10px rgba(247, 208, 32, 0.5)) drop-shadow(0 0 22px rgba(0, 242, 254, 0.3));
    }
}

/* =========================================
   WORLD MONITOR TOOLTIP
   ========================================= */

.wm-tooltip-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* La finestrella tooltip */
.wm-tooltip-box {
    display: block;
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    width: 260px;
    background: rgba(10, 14, 26, 0.97);
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 10px;
    padding: 12px 14px;
    color: #e2e8f0;
    font-size: 0.8rem;
    line-height: 1.55;
    text-align: left;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 12px rgba(255, 215, 0, 0.1);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 100;
    white-space: normal;
}

/* Freccia verso il basso */
.wm-tooltip-box::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: rgba(255, 215, 0, 0.35);
}

/* Mostra al hover */
.wm-tooltip-wrap:hover .wm-tooltip-box {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Mobile: sposta a sinistra per evitare overflow */
@media (max-width: 480px) {
    .wm-tooltip-box {
        left: 0;
        transform: translateX(0) translateY(6px);
        width: 220px;
    }
    .wm-tooltip-wrap:hover .wm-tooltip-box {
        transform: translateX(0) translateY(0);
    }
    .wm-tooltip-box::after {
        left: 30px;
    }
}

/* =========================================
   ARGOMENTI TAB — PILLAR CHIP STYLES
   ========================================= */

.pillar-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    font-size: 0.83rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    user-select: none;
}
.pillar-chip:hover { background: rgba(255,255,255,0.09); }

/* Custom checkbox inside chip */
.pillar-chip input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 17px;
    height: 17px;
    border-radius: 4px;
    border: 2px solid rgba(255,255,255,0.3);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    position: relative;
}
.pillar-chip input[type="checkbox"]:checked {
    background: #ffd700;
    border-color: #ffd700;
}
.pillar-chip input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 11px;
    font-weight: 800;
}

/* Per-pillar border accent colours */
.pillar-tech  { border-color: rgba(255, 204,   0, 0.4); }
.pillar-war   { border-color: rgba(255, 107,  53, 0.4); }
.pillar-geo   { border-color: rgba( 51, 154, 240, 0.4); }
.pillar-fin   { border-color: rgba( 64, 192,  87, 0.4); }
.pillar-bio   { border-color: rgba(250,  82,  82, 0.4); }
.pillar-crypto{ border-color: rgba(255, 143,  43, 0.4); }
.pillar-cyber { border-color: rgba( 51, 217, 178, 0.4); }

/* Highlight chip when checked */
.pillar-chip:has(input:checked) { background: rgba(255, 204, 0, 0.07); }

/* "Seleziona Pilastri" button hover */
#selectAllPilastri:hover {
    background: rgba(255,255,255,0.15) !important;
}

/* =========================================
   FAQ SECTION STYLES
   ========================================= */

/* FAQ page header — mini logo cliccabile */
.faq-page-header {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 242, 254, 0.15);
}

.faq-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
}

.faq-logo-link:hover {
    transform: scale(1.03);
    opacity: 0.9;
}

.faq-logo-link .faq-logo-icon {
    font-size: 2rem;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.faq-logo-link h2 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
    text-shadow: 0 0 12px rgba(0, 242, 254, 0.4);
}

/* Disclaimer box */
.faq-disclaimer {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-left: 4px solid #00f2fe;
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
    box-shadow: inset 0 0 20px rgba(0, 242, 254, 0.04), 0 8px 24px rgba(0, 0, 0, 0.3);
}

.faq-disclaimer h3 {
    color: #00f2fe;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-bottom: 12px;
}

.faq-disclaimer p {
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: 10px;
    font-weight: 300;
}

.faq-disclaimer p:last-child {
    margin-bottom: 0;
}

.faq-disclaimer .faq-tagline {
    color: #00f2fe;
    font-style: italic;
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
    margin-top: 14px;
    letter-spacing: 0.3px;
}

/* FAQ section heading */
.faq-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.faq-section-title i {
    color: var(--brand-primary);
    font-size: 1.2rem;
}

.faq-section-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

/* FAQ accordion list */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Single FAQ item */
.faq-item {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(0, 242, 254, 0.25);
}

.faq-item.open {
    border-color: rgba(0, 242, 254, 0.35);
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.08);
}

/* FAQ question button */
.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    text-align: left;
    transition: background 0.25s ease;
}

.faq-question:hover {
    background: rgba(0, 242, 254, 0.04);
}

.faq-item.open .faq-question {
    background: rgba(0, 242, 254, 0.06);
}

/* Number badge */
.faq-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: #00f2fe;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.faq-item.open .faq-num {
    background: rgba(0, 242, 254, 0.2);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

/* Question text */
.faq-question-text {
    flex: 1;
    color: #f0f0f0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
}

/* Chevron icon */
.faq-chevron {
    flex-shrink: 0;
    color: rgba(0, 242, 254, 0.6);
    font-size: 1.2rem;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
}

.faq-item.open .faq-chevron {
    transform: rotate(180deg);
    color: #00f2fe;
}

/* Answer panel — animated height */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
    opacity: 0;
}

.faq-item.open .faq-answer {
    max-height: 1200px;
    opacity: 1;
}

.faq-answer-inner {
    padding: 0 18px 18px 60px;
    color: #b0bec5;
    font-size: 0.9rem;
    line-height: 1.7;
    border-top: 1px solid rgba(0, 242, 254, 0.08);
    padding-top: 14px;
}

/* Footer FAQ link */
.faq-footer-link {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}

.faq-footer-link:hover {
    color: #00f2fe;
}

.faq-footer-link i {
    font-size: 1rem;
    vertical-align: middle;
}

/* Footer bar layout */
.site-footer-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
}

.site-footer-divider {
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.9rem;
}

/* Responsive FAQ */
@media (max-width: 768px) {
    .faq-answer {
        /* Su mobile assicuriamo che il pannello non venga mai troncato */
        overflow: visible;
    }
    .faq-item.open .faq-answer {
        max-height: none; /* Lascia che il contenuto determini l'altezza */
        overflow: visible;
    }
    .faq-answer-inner {
        padding: 14px 14px 18px 14px;
        font-size: 0.88rem;
        line-height: 1.65;
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

@media (max-width: 550px) {
    .faq-logo-link h2 {
        font-size: 1.25rem;
    }

    .faq-question-text {
        font-size: 0.88rem;
    }

    .faq-section-title {
        font-size: 1rem;
    }
}

/* ===== FAQ Section Label (thematic dividers) ===== */
.faq-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #ffd700;
    margin: 24px 0 10px 0;
    padding: 6px 12px;
    background: rgba(255, 215, 0, 0.06);
    border-left: 3px solid #ffd700;
    border-radius: 0 8px 8px 0;
}

.faq-section-label i {
    font-size: 0.9rem;
    color: #ffd700;
}

@media (max-width: 480px) {
    .faq-section-label {
        font-size: 0.68rem;
        padding: 5px 10px;
        letter-spacing: 1px;
    }
}
