:root {
    --eu-blue: #003399;
    --eu-gold: #FFCC00;
    --eu-silver: #F0F0F0;
    --eu-dark-blue: #002266;
    --eu-light-blue: #4cc9f0;
    --text-dark: #333333;
    --text-light: #ffffff;
    --success: #4CAF50;
    --error: #F44336;
   --bg-gradient: radial-gradient(circle at center, #9a9aaa 0%, #2a2a3a 100%);
}

/*--bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: var(--bg-gradient);
    background-attachment: fixed; /* 👈 AGGIUNGI */
    background-size: cover;       /* 👈 AGGIUNGI */
    color: var(--text-light);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header e Logo */
header {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(76, 201, 240, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* === NUOVO LOGO ANIMATO - INTEGRATO CON IL TUO TEMA === */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Logo Emblem - ADATTATO AI TUOI COLORI */
.logo-emblem {
    position: relative;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 51, 153, 0.2);
    border-radius: 50%;
    border: 1.5px solid rgba(255, 204, 0, 0.4);
    box-shadow: 
        0 0 8px rgba(76, 201, 240, 0.3),
        inset 0 0 10px rgba(0, 51, 153, 0.1);
}

.eu-stars-circle {
    position: absolute;
    width: 90px;
    height: 90px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: rotate-stars 30s linear infinite;
}

.star-item {
    position: absolute;
    top: 50%;
    left: 50%;
    color: rgba(255, 204, 0, 0.6);
    font-size: 8px;
    text-shadow: 0 0 3px rgba(255, 204, 0, 0.3);
    animation: counter-rotate 30s linear infinite;
} /* 👈 QUESTA ERA MANCANTE! */

.central-pe {
    position: relative;
    font-family: 'Times New Roman', serif;
    font-size: 22px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    z-index: 3;
}

/* Animazioni */
@keyframes rotate-stars {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes counter-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text h1 {
    font-size: 2.5rem;
    background: linear-gradient(90deg, var(--eu-light-blue), var(--eu-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 15px rgba(76, 201, 240, 0.5);
}

.logo-text p {
    color: var(--eu-light-blue);
    font-size: 1.1rem;
}

.wallet-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

#connectWalletBtn {
    background: rgba(76, 201, 240, 0.2);
    color: var(--eu-light-blue);
    border: 1px solid rgba(76, 201, 240, 0.3);
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

#connectWalletBtn:hover {
    background: rgba(76, 201, 240, 0.3);
    transform: translateY(-2px);
}

.wallet-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.wallet-address {
    font-size: 0.9rem;
    color: var(--eu-light-blue);
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 10px;
    border-radius: 5px;
}

.token-balance {
    font-size: 1rem;
    color: var(--eu-gold);
    font-weight: 600;
}

/* Sezioni principali */
.content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

@media (max-width: 900px) {
    .content {
        grid-template-columns: 1fr;
    }
}

.card {
    background: rgba(20, 30, 48, 0.8);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(76, 201, 240, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border-color: rgba(76, 201, 240, 0.3);
}

.card h2 {
    color: var(--eu-light-blue);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(76, 201, 240, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Sezione acquisto token */
.buy-tokens {
    grid-column: 1 / -1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.buy-tokens p {
    margin: 10px 0 20px;
    color: var(--eu-light-blue);
}

/* Sezione proposta */
textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border-radius: 8px;
    background: rgba(10, 15, 24, 0.5);
    border: 1px solid rgba(76, 201, 240, 0.2);
    color: var(--text-light);
    margin-bottom: 15px;
    resize: vertical;
}

select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background: rgba(10, 15, 24, 0.5);
    border: 1px solid rgba(76, 201, 240, 0.2);
    color: var(--text-light);
    margin-bottom: 15px;
}

.disclaimer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

button {
    background: rgba(76, 201, 240, 0.2);
    color: var(--eu-light-blue);
    border: 1px solid rgba(76, 201, 240, 0.3);
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

button:hover {
    background: rgba(76, 201, 240, 0.3);
}

#mintNFTBtn {
    background: rgba(79, 200, 128, 0.2);
    color: #4fc880;
    border-color: rgba(79, 200, 128, 0.3);
}

#mintNFTBtn:hover {
    background: rgba(79, 200, 128, 0.3);
}

/* === CARD PROPOSTA "CALDA" === */
.proposal-card-hot {
  width: 320px;
  background: #2a2a2a;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  margin: 15px;
  transition: transform 0.3s ease;
}

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

/* Testo proposta */
.proposal-content {
  padding: 20px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  min-height: 120px;
}

.proposal-text {
  max-height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 10px 0;
  font-size: 14px;
}

.proposal-stats {
  display: flex;
  gap: 15px;
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.8;
}

/* Design bruciato adattato */
.burned-texture-hot {
  height: 180px;
  background: radial-gradient(circle at 20% 30%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
             radial-gradient(circle at 80% 70%, rgba(255, 69, 0, 0.1) 0%, transparent 50%),
             linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
  border-left: 4px solid #444;
  border-right: 4px solid #444;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Sigillo compatto */
.wax-seal-hot {
  position: absolute;
  top: 20px;
  right: 20px;
  transform: scale(0.7);
}

/* Pulsanti di voto */
.vote-actions {
  padding: 15px;
  display: flex;
  gap: 10px;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
}

.vote-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.vote-for {
  background: linear-gradient(135deg, #4CAF50, #2E7D32);
  color: white;
}

.vote-against {
  background: linear-gradient(135deg, #f44336, #c62828);
  color: white;
}

.vote-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    color: #a3a3c2;
    border-top: 1px solid rgba(76, 201, 240, 0.1);
}
/* ==================== INIZIO NUOVI STILI FILTRI E GRID ==================== */
/* Aggiunto il [data] per integrazione filtri proposals */
.filters-section {
    background: rgba(20, 30, 48, 0.8);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(76, 201, 240, 0.15);
    margin-bottom: 25px;
}

.filters-header {
    color: var(--eu-light-blue);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(76, 201, 240, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--eu-light-blue);
    font-size: 0.9rem;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid rgba(76, 201, 240, 0.2);
    border-radius: 10px;
    background: rgba(10, 15, 24, 0.5);
    color: white;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: var(--eu-light-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.1);
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--eu-light-blue);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid rgba(76, 201, 240, 0.2);
    background: rgba(10, 15, 24, 0.5);
    color: #ccc;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--eu-light-blue);
    color: #0a1929;
    border-color: var(--eu-light-blue);
}

#sortSelect {
    padding: 0.75rem;
    border: 2px solid rgba(76, 201, 240, 0.2);
    border-radius: 10px;
    background: rgba(10, 15, 24, 0.5);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

#sortSelect:focus {
    border-color: var(--eu-light-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.1);
}

/* Grid Proposte - Sostituisce le sezioni separate */
.proposals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.proposal-card {
    background: rgba(20, 30, 48, 0.8);
    border: 1px solid rgba(76, 201, 240, 0.15);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.proposal-card:hover {
    transform: translateY(-5px);
    border-color: var(--eu-light-blue);
    box-shadow: 0 10px 30px rgba(76, 201, 240, 0.2);
}

/* Badge Stato laterale */
.proposal-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 100%;
}

.proposal-card[data-status="active"]::before { background: var(--eu-light-blue); }
.proposal-card[data-status="approved"]::before { background: var(--success); }
.proposal-card[data-status="rejected"]::before { background: var(--error); }

/* Messaggio nessuna proposta */
.no-proposals {
    text-align: center;
    padding: 3rem;
    color: var(--eu-light-blue);
    grid-column: 1 / -1;
}

/* Responsive Filters */
@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .proposals-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .filter-btn {
        flex: 1;
        min-width: 80px;
        text-align: center;
    }
}
/* ==================== FINE NUOVI STILI FILTRI E GRID ==================== */


/* AI Chat */


/* ==================== INIZIO STILE NFT ==================== */
/* Import font (già presenti nel tuo HTML) */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Dancing+Script:wght@700&display=swap');

/* Animazioni KEYFRAMES - DA AGGIUNGERE */
@keyframes nft-hotGlow {
    0% { box-shadow: 0 0 10px rgba(255, 69, 0, 0.6), 0 0 20px rgba(255, 69, 0, 0.4), 0 0 30px rgba(255, 69, 0, 0.2); }
    100% { box-shadow: 0 0 15px rgba(255, 69, 0, 0.8), 0 0 25px rgba(255, 69, 0, 0.6), 0 0 35px rgba(255, 69, 0, 0.3); }
}

@keyframes nft-smokeRise {
    0% { opacity: 0.8; transform: translateY(0) scale(1); }
    50% { opacity: 0.4; transform: translateY(-10px) scale(1.2); }
    100% { opacity: 0; transform: translateY(-20px) scale(1.5); }
}

@keyframes nft-steamFloat {
    0% { opacity: 0.6; transform: translateY(0) translateX(0) scale(0.8); }
    50% { opacity: 0.3; transform: translateY(-8px) translateX(2px) scale(1); }
    100% { opacity: 0; transform: translateY(-15px) translateX(4px) scale(1.3); }
}

@keyframes nft-ping {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.5); opacity: 0.4; }
    100% { transform: scale(2); opacity: 0; }
}

@keyframes nft-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.3; }
}

/* Stili NFT - DA AGGIUNGERE */
.nft-burned-texture {
    width: 100%;
    height: 380px; /* Altezza fissa per il rettangolo */
    background: radial-gradient(circle at 20% 30%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
               radial-gradient(circle at 80% 70%, rgba(255, 69, 0, 0.1) 0%, transparent 50%),
               linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    border-radius: 12px;
    border: 4px solid #444;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 20px;
    margin-bottom: 15px; /* Spaziatura per i pulsanti sotto */
}

.nft-burned-border {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    border: 2px solid rgba(165, 42, 42, 0.3);
}

.nft-burned-border-inner {
    position: absolute;
    inset: 4px;
    border-radius: 10px;
    border: 1px solid rgba(165, 42, 42, 0.2);
}

.nft-logo-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 48px; /* Dimensione ridotta per armonizzare */
    color: #e0e0e0;
    font-weight: bold;
    letter-spacing: 4px;
    line-height: 0.9;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 2;
}

.nft-wax-seal {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 30;
    transform: scale(0.7); /* Timbro più piccolo */
}

.nft-ribbon {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.nft-ribbon-knot {
    width: 8px;
    height: 12px;
    background: linear-gradient(to bottom, #facc15, #ca8a04);
    border-radius: 2px;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.nft-ribbon-side {
    position: absolute;
    width: 12px;
    height: 8px;
    background: linear-gradient(to right, #eab308, #ca8a04);
    border-radius: 50%;
}

.nft-ribbon-left {
    left: -12px;
    top: 0;
    transform: rotate(-12deg);
}

.nft-ribbon-right {
    right: -12px;
    top: 0;
    transform: rotate(12deg);
}

.nft-ribbon-tail {
    position: absolute;
    width: 4px;
    height: 16px;
    background: linear-gradient(to bottom, #ca8a04, #854d0e);
    border-radius: 2px;
}

.nft-ribbon-tail-left {
    left: -4px;
    top: 8px;
    transform: rotate(-15deg);
}

.nft-ribbon-tail-right {
    right: -4px;
    top: 8px;
    transform: rotate(15deg);
}

.nft-wax-base {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #dc2626;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    transform: rotate(8deg);
    position: relative;
    z-index: 20;
    border: 1px solid #991b1b;
    animation: nft-hotGlow 2s ease-in-out infinite alternate;
}

.nft-wax-impression {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: #b91c1c;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8);
    border: 1px solid #7f1d1d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nft-wax-text {
    font-family: 'Dancing Script', cursive;
    font-size: 12px;
    color: #fca5a5;
    font-weight: bold;
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    transform: scaleY(0.9);
}

.nft-heat-glow {
    position: absolute;
    top: 4px;
    left: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fb923c;
    opacity: 0.5;
    filter: blur(4px);
    animation: nft-pulse 2s infinite;
}

.nft-heat-glow-2 {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #eab308;
    opacity: 0.4;
    filter: blur(3px);
    animation: nft-pulse 2s infinite 0.5s;
}

.nft-smoke {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
}

.nft-smoke-particle {
    width: 4px;
    height: 12px;
    background: #9ca3af;
    opacity: 0.6;
    border-radius: 50%;
    filter: blur(2px);
    animation: nft-smokeRise 3s ease-out infinite;
}

.nft-steam {
    position: absolute;
    top: -12px;
    left: 33%;
    transform: translateX(-50%);
}

.nft-steam-particle {
    width: 2px;
    height: 8px;
    background: #d1d5db;
    opacity: 0.4;
    border-radius: 50%;
    filter: blur(1px);
    animation: nft-steamFloat 2.5s ease-out infinite 0.8s;
}

.nft-steam-2 {
    position: absolute;
    top: -8px;
    right: 33%;
    transform: translateX(50%);
}

.nft-steam-particle-2 {
    width: 2px;
    height: 8px;
    background: #6b7280;
    opacity: 0.5;
    border-radius: 50%;
    filter: blur(1px);
    animation: nft-steamFloat 2.5s ease-out infinite 1.2s;
}

.nft-sparkle {
    position: absolute;
    top: -4px;
    left: 8px;
    width: 2px;
    height: 2px;
    background: #fb923c;
    border-radius: 50%;
    opacity: 0.8;
    animation: nft-ping 1s infinite;
}

.nft-sparkle-2 {
    position: absolute;
    top: 0;
    right: 12px;
    width: 2px;
    height: 2px;
    background: #eab308;
    border-radius: 50%;
    opacity: 0.6;
    animation: nft-pulse 1s infinite 0.3s;
}

.nft-wax-shadow {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #000;
    opacity: 0.3;
    filter: blur(8px);
    z-index: -10;
}

.nft-burn-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 32px;
    background: linear-gradient(to top, #374151, transparent);
    opacity: 0.5;
}

/* Modifica alla proposal-card per contenere il nuovo design */
.proposal-card {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Contenuto della proposta sopra lo sfondo NFT */
.proposal-content {
    position: relative;
    z-index: 10;
    padding: 15px;
    color: #e0e0e0;
    font-size: 13px; /* Caratteri più piccoli per armonizzare */
}

.proposal-content h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #ffffff;
}

.proposal-text {
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 8px 0;
    line-height: 1.4;
}

.proposal-stats {
    display: flex;
    gap: 15px;
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.9;
}

.proposal-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-top: 10px;
    opacity: 0.8;
}

/* Pulsanti di voto POSIZIONATI SOTTO l'immagine */
.vote-buttons {
    margin-top: 0;
    padding: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 0 0 15px 15px;
}
/* ==================== FINE STILE NFT ==================== */
/* ==================== CORREZIONI NFT ==================== */
/* Nascondi la categoria "Generale" */
.proposal-category {
    display: none !important;
}

/* Assicura che i voti siano visibili sopra lo sfondo */
.proposal-stats {
    position: relative;
    z-index: 20;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 15px;
    margin-top: 10px;
}

/* Rendiamo i pollici più evidenti */
.votes-for, .votes-against {
    font-weight: bold;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateY(-5px); /* 👈 ALZA I POLlici */
}

.votes-for { 
    color: #4CAF50;
    margin-top: -5px; /* 👈 EXTRA SPINTA IN ALTO */
}

.votes-against { 
    color: #F44336; 
    margin-top: -5px; /* 👈 EXTRA SPINTA IN ALTO */
}
/* === NUOVO LAYOUT VOTI A COLONNA === */
.vote-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vote-icon {
    font-size: 16px;
    margin-bottom: -8px;
}

.vote-count {
    font-size: 11px;
    font-weight: bold;
    transform: translateY(8px);
}
.vote-count.votes-for { color: #4CAF50 !important; }
.vote-count.votes-against { color: #F44336 !important; }
/* === AVVICINAMENTO VOTI AL CENTRO === */
.vote-item.votes-for {
    transform: translateX(25px) !important;
}

.vote-item.votes-against {
    transform: translateX(-25px) !important;
}
/* ==================== FINE CORREZIONI ==================== */
/* ==================== INIZIO STILE HERO TOKEN ==================== */
.token-hero {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 1rem;
}

.token-hero-logo {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.token-logo-text {
    font-family: 'Orbitron', monospace;
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--eu-silver) 0%, #ffffff 25%, #c0c0c0 50%, #ffffff 75%, var(--eu-silver) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    animation: token-shine 3s ease-in-out infinite;
}

.token-logo-fire {
    position: relative;
    width: 200px;
    height: 120px;
}

.token-flame {
    position: absolute;
    bottom: 0;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: token-flicker 1.5s ease-in-out infinite alternate;
}

.token-flame-1 {
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 80px;
    background: linear-gradient(to top, #ff4500 0%, #ff6b00 30%, #ff8c00 60%, #ffa500 100%);
    animation-delay: 0s;
}

.token-flame-2 {
    left: 35%;
    transform: translateX(-50%);
    width: 40px;
    height: 60px;
    background: linear-gradient(to top, #ff6b00 0%, #ff8c00 40%, #ffa500 80%, var(--eu-gold) 100%);
    animation-delay: 0.3s;
}

.token-flame-3 {
    left: 65%;
    transform: translateX(-50%);
    width: 35px;
    height: 50px;
    background: linear-gradient(to top, #ff8c00 0%, #ffa500 50%, var(--eu-gold) 100%);
    animation-delay: 0.6s;
}

.token-flame-core {
    position: absolute;
    left: 50%;
    bottom: 5px;
    transform: translateX(-50%);
    width: 30px;
    height: 40px;
    background: linear-gradient(to top, var(--eu-gold) 0%, #ffffff 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: token-coreFlicker 1s ease-in-out infinite alternate;
}

.token-ember {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #ff6b00;
    border-radius: 50%;
    animation: token-float 3s linear infinite;
}

.token-ember-1 {
    left: 20%;
    bottom: 60px;
    animation-delay: 0s;
}

.token-ember-2 {
    left: 80%;
    bottom: 40px;
    animation-delay: 1s;
}

.token-ember-3 {
    left: 60%;
    bottom: 70px;
    animation-delay: 2s;
}

.token-hero-message {
    flex: 1;
}

.token-hero-message h2 {
    color: var(--eu-light-blue);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    border: none;
    padding: 0;
    justify-content: flex-start;
}

.token-hero-message .slogan {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--eu-gold);
    margin-bottom: 0.5rem;
    font-style: italic;
}

.token-hero-message .description {
    color: var(--eu-silver);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 1.5rem 0;
}

.token-hero-message button {
    width: auto;
    margin-top: 1rem;
    padding: 15px 30px;
    font-size: 1.1rem;
}

/* Animazioni Keyframes per l'Hero Token */
@keyframes token-shine {
    0%, 100% { background-position: 0% 50%; filter: brightness(1); }
    50% { background-position: 100% 50%; filter: brightness(1.2); }
}

@keyframes token-flicker {
    0% { transform: translateX(-50%) scale(1) rotate(-1deg); filter: brightness(1); }
    100% { transform: translateX(-50%) scale(1.05) rotate(1deg); filter: brightness(1.1); }
}

@keyframes token-coreFlicker {
    0% { transform: translateX(-50%) scale(1); opacity: 0.8; }
    100% { transform: translateX(-50%) scale(1.1); opacity: 1; }
}

@keyframes token-float {
    0% { transform: translateY(0px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* Responsive Design per l'Hero Token */
@media (max-width: 900px) {
    .token-hero {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .token-hero-message h2 {
        justify-content: center;
    }

    .token-logo-text {
        font-size: 3rem;
    }

    .token-logo-fire {
        width: 150px;
        height: 100px;
    }

    .token-flame-1 { width: 50px; height: 70px; }
    .token-flame-2 { width: 35px; height: 50px; }
    .token-flame-3 { width: 30px; height: 40px; }
}

@media (max-width: 480px) {
    .token-hero-message h2 {
        font-size: 2rem;
    }

    .token-hero-message .slogan {
        font-size: 1.2rem;
    }

    .token-logo-text {
        font-size: 2.5rem;
    }
}
/* ==================== FINE STILE HERO TOKEN ==================== */


/* ==================== INIZIO STILE HERO TOKEN BILATERALE ==================== */
.token-hero {
    display: flex;
    align-items: stretch; /* Fa sì che le colonne abbiano la stessa altezza */
    gap: 2rem;
    padding: 1rem;
}

.token-hero-column {
    flex: 1; /* Ogni colonna occupa lo stesso spazio */
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Colonna NFT Preview */
.preview-nft {
    display: flex;
    justify-content: center;
    align-items: center;
}

.preview-nft-burned-texture {
    width: 100%;
    max-width: 280px; /* Dimensione compattta per il preview */
    height: 320px;
    background: radial-gradient(circle at 20% 30%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
               radial-gradient(circle at 80% 70%, rgba(255, 69, 0, 0.1) 0%, transparent 50%),
               linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    border-radius: 12px;
    border: 4px solid #444;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.preview-nft-logo-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 64px;
    color: #e0e0e0;
    font-weight: bold;
    letter-spacing: 4px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 2;
}

/* Timbro - Copia esatta dello stile originale */
.preview-nft-wax-seal {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 30;
}
.preview-nft-wax-base {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #dc2626;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    transform: rotate(8deg);
    position: relative;
    z-index: 20;
    border: 1px solid #991b1b;
    animation: nft-hotGlow 2s ease-in-out infinite alternate;
}
.preview-nft-wax-impression {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: #b91c1c;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8);
    border: 1px solid #7f1d1d;
    display: flex;
    align-items: center;
    justify-content: center;
}
.preview-nft-wax-text {
    font-family: 'Dancing Script', cursive;
    font-size: 12px;
    color: #fca5a5;
    font-weight: bold;
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    transform: scaleY(0.9);
}

/* Messaggi per la colonna NFT */
.nft-hero-message {
    text-align: center;
}
.nft-hero-message h2 {
    color: var(--eu-light-blue);
    font-size: 2rem;
    margin-bottom: 1rem;
    border: none;
    padding: 0;
}
.nft-hero-message .slogan {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--eu-gold);
    margin-bottom: 0.5rem;
    font-style: italic;
}
.nft-hero-message .description {
    color: var(--eu-silver);
    font-size: 1rem;
    line-height: 1.5;
}

/* Colonna Token (Pre-esistente, leggermente adattata) */
.token-promo {
    justify-content: center;
}
.token-hero-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.token-hero-message {
    text-align: center;
}

/* Responsive Design */
@media (max-width: 900px) {
    .token-hero {
        flex-direction: column;
    }
}
/* ==================== FINE STILE HERO TOKEN BILATERALE ==================== */

/* ==================== FIX VISIBILITÀ VOTI IN CARD STRETTA ==================== */
/* FISSA L'ALTEZZA DEL TESTO DELLA PROPOSTA */
/* ==================== HEADER CONTAINER ==================== */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: nowrap; /* 👈 CAMBIA: wrap → nowrap */
    padding: 20px 0;
}

.logo-container {
    flex: 0 0 auto;
    min-width: 0; /* 👈 AGGIUNGI */
    overflow: hidden; /* 👈 AGGIUNGI */
}

/* ==================== NAVBAR ==================== */
.main-nav {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 0 2rem;
    padding-left: 2rem;
    min-width: 0;
}

.nav-link {
    color: var(--eu-light-blue);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(76, 201, 240, 0.1);
    transform: translateY(-2px);
}

.nav-button {
    background: rgba(76, 201, 240, 0.2);
    color: var(--eu-light-blue);
    border: 1px solid rgba(76, 201, 240, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-button:hover {
    background: rgba(76, 201, 240, 0.3);
}

/* ==================== ASTER CHAT CONTAINER ==================== */
.aster-chat-container {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.aster-chat-container .nav-button {
    min-width: 140px;
    padding: 0.5rem 0.8rem;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
}

.aster-chat-container .nav-button span {
    text-align: center;
    white-space: nowrap;
}

.aster-chat-container .nav-button .fa-comment-dots {
    font-size: 0.9em;
    color: var(--eu-light-blue);
}

/* ==================== ASTER ICON CONTAINER ==================== */
.aster-icon-container {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: -5px;
}

.aster-icon-large {
    width: 72px;
    height: 72px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.aster-icon-large:hover {
    transform: scale(1.05);
}

/* Pulsazione testo chat */
.chat-pulse span {
    animation: gentlePulse 2s infinite;
}

@keyframes gentlePulse {
    0%, 100% { 
        opacity: 1;
        text-shadow: 0 0 5px rgba(76, 201, 240, 0);
    }
    50% { 
        opacity: 0.8;
        text-shadow: 0 0 12px rgba(76, 201, 240, 0.9);
    }
}

/* ==================== WALLET SECTION ==================== */
.wallet-section {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
    .main-nav {
        gap: 1rem;
        margin: 0 1rem;
        padding-left: 1rem;
    }
    
    .aster-chat-container .nav-button {
        min-width: 120px;
        padding: 0.5rem 0.6rem;
    }
    
    .aster-icon-large {
        width: 68px;
        height: 68px;
        margin-left: -12px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav {
        order: 2;
        width: 100%;
        justify-content: center;
        margin: 1rem 0 0 0;
        padding-left: 0;
        flex-wrap: wrap;
    }
    
    .wallet-section {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .aster-chat-container .nav-button span {
        display: none;
    }
    
    .aster-chat-container .nav-button .fa-comment-dots {
        display: none;
    }
    
    .aster-icon-large {
        width: 56px;
        height: 56px;
        margin-left: -8px;
    }
    
    .aster-chat-container .nav-button {
        min-width: 40px;
        padding: 0.5rem;
    }
}

/* ==================== HOW IT WORKS SECTION ==================== */
.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.step {
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px;
    background: rgba(20, 30, 48, 0.6);
    border: 1px solid rgba(76, 201, 240, 0.2);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--eu-light-blue);
    color: var(--eu-dark-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 1rem auto;
}

.step h3 {
    color: var(--eu-light-blue);
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--eu-silver);
    font-size: 0.9rem;
}
/* ==================== END HOW IT WORKS ==================== */
/* style.css */

/* Stile base per tutti i popup di conferma */
/* =================================================================
   NUOVO SISTEMA POPUP DI CONFERMA (RESTAILING SICURO)
   ================================================================= */

/* NUOVO SISTEMA POPUP DI CONFERMA (RESTAILING SICURO)
   ================================================================= */

/* Contenitore principale (Sostituisce il vecchio .confirmation-popup bianco) */
.confirmation-popup {
    /* RESET POSIZIONAMENTO PER CENTRATURA FLEX */
    position: relative !important; 
    top: auto !important;
    left: auto !important;
    transform: none !important; 
    
    /* RESTO DELLO STILE */
    background: #0a1128;
    border: 1px solid var(--eu-gold);
    border-radius: 15px;
    padding: 25px;
    width: 90%;
    max-width: 480px;
    max-height: 80vh;
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0,0,0,0.9);
    margin: auto; /* Centratura magica extra */
}

/* QUESTO È IL SEGRETO: rende solo la parte centrale scorrevole */
.popup-scroll-content {
    flex: 1; /* 👈 MODIFICATO: Sostituisce flex-grow: 1 per maggiore controllo */
    overflow-y: auto !important; /* 👈 MODIFICATO: !important aggiunto */
    min-height: 0; /* Permette al contenuto di rimpicciolirsi e attivare lo scroll */
    margin: 15px 0;
    padding-right: 10px;
    text-align: left;
    /* 👈 MODIFICATO AGGIUNTO: Gestione testo lungo */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Personalizziamo la scrollbar per farla sembrare Luxury */
.popup-scroll-content::-webkit-scrollbar {
    width: 5px;
}
.popup-scroll-content::-webkit-scrollbar-thumb {
    background: var(--eu-gold);
    border-radius: 10px;
}

.popup-icon { 
    font-size: 2.5rem; 
    color: var(--eu-gold); 
    margin-bottom: 5px; 
}

.confirmation-popup h3 { 
    margin: 0; 
    color: white; 
    font-size: 1.4rem; 
}

.popup-actions-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    flex-shrink: 0; /* Impedisce ai tasti di sparire o schiacciarsi */
}

.btn-close-final {
    background: var(--eu-gold) !important;
    color: #0a1128 !important;
    font-weight: bold;
    padding: 12px !important;
    border-radius: 8px !important;
    border: none !important;
    cursor: pointer;
}

/* Box Dettagli Transazione (Hash e Signature) */
.transaction-details {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.transaction-details p {
    font-size: 0.7rem;
    color: var(--eu-gold);
    margin-bottom: 4px;
    text-transform: uppercase;
    font-weight: bold;
}

.transaction-hash, .signature {
    display: block;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #cbd5e0 !important;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* Box Avviso Arte (Tua feature speciale) */
.art-preview-notice {
    background: rgba(212, 175, 55, 0.1);
    border-left: 4px solid var(--eu-gold);
    padding: 15px;
    margin: 1.5rem 0;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.art-preview-notice i {
    color: var(--eu-gold);
    font-size: 1.2rem;
    margin-top: 3px;
}

.art-preview-notice p {
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
    color: #f0f0f0;
}
/* ==================== TOKEN BUTTONS SELECTION ==================== */
/* Aggiungi in fondo al file, prima delle utility se presenti */
.token-btn.selected {
    background-color: var(--eu-blue);
    color: white;
    border: 2px solid var(--eu-gold);
    transform: scale(1.05);
}
/* 👇 INSERISCI QUI TUTTO IL CODICE OPINION POLL */
/* ==================== STILE OPINION POLL ==================== */
/* CARD PRINCIPALE CON CLASSI UNICHE */
/* ==================== NUOVO LAYOUT 3 SEZIONI SEPARATE ==================== */
/* ==================== LAYOUT 3 SEZIONI - VERSIONE DEFINITIVA ==================== */
.opinion-poll-card {
    display: flex;
    flex-direction: column;
    height: 450px;
    background: #2a2a3a;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(76, 201, 240, 0.3);
    /* 👇 FORZA il layout a 3 sezioni */
    position: relative;
}

/* HEADER - FISSO IN ALTO */
.opinion-poll-header {
    flex: 0 0 auto;
    padding: 20px;
    border-bottom: 2px solid #4cc9f0;
    background: #2a2a3a;
    /* 👇 IMPEDISCI che scrolli */
    position: relative;
    z-index: 100;
}

/* CONTENUTO - SCROLLABILE */
.opinion-poll-scrollable {
    flex: 1;
    overflow-y: auto;
    background: #1a1a2e;
    /* 👇 PERMETTI solo a questo di scrollare */
    position: relative;
    z-index: 1;
}

/* FOOTER - FISSO IN BASSO */
.opinion-poll-footer {
    flex: 0 0 auto;
    padding: 15px 20px;
    border-top: 1px solid rgba(76, 201, 240, 0.3);
    background: #2a2a3a;
    display: flex;
    justify-content: space-between;
    /* 👇 IMPEDISCI che scrolli */
    position: relative;
    z-index: 100;
}

/* STILE OPZIONI (mantenuto) */
.poll-option {
    display: flex;
    align-items: flex-start;
    background: rgba(76, 201, 240, 0.1);
    border: 1px solid rgba(76, 201, 240, 0.3);
    color: #4cc9f0;
    padding: 14px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 0.95em;
}

.poll-option:hover {
    background: rgba(76, 201, 240, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 201, 240, 0.2);
}

.option-badge {
    background: linear-gradient(135deg, #4cc9f0, #003399);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: bold;
    margin-right: 15px;
    min-width: 45px;
    text-align: center;
    font-size: 0.9em;
    flex-shrink: 0;
}
/* ==================== EFFETTO HOVER FUCSIA ELEGANTE ==================== */
.opinion-poll-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(76, 201, 240, 0.3);
}

.opinion-poll-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 10px 30px rgba(255, 0, 255, 0.2),
        0 5px 15px rgba(76, 201, 240, 0.1);
    border-color: rgba(255, 0, 255, 0.5);
}

/* Effetto più soft sui bottoni delle opzioni */
.poll-option:hover {
    background: rgba(255, 0, 255, 0.1);
    border-color: rgba(255, 0, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 0, 255, 0.15);
}
/* ===== SOLO LA SCRITTA SCADUTO ===== */
.poll-status.status-expired {
    color: #6c757d !important;
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.poll-status.status-active {
    color: #198754 !important;
    background: #d1e7dd !important;
    border: 1px solid #badbcc !important;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Se vuoi un effetto più accentuato, aggiungi anche: */
.token-btn {
    transition: all 0.3s ease;
    cursor: pointer;
}

.token-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
/* ==================== OPINION POLL SCADUTE ==================== */

/* 👇 LAYOUT BASE */
.expired-opinion-poll {
    border-color: rgba(128, 128, 128, 0.3) !important;
    background: #2a2a3a !important;
    transition: all 0.3s ease !important;
}

/* 👇 HEADER */
.expired-poll-header {
    border-bottom-color: #6c757d !important;
    background: #2a2a3a !important;
}

.expired-poll-header h3 {
    color: #adb5bd !important;
}

/* 👇 DOMANDA */
.expired-poll-question h3 {
    color: #adb5bd !important;
}

/* 👇 OPZIONI - SOLO VISUALIZZAZIONE */
.expired-poll-options {
    pointer-events: none !important;
}

.expired-poll-option-result {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}

.expired-option-badge {
    background: linear-gradient(135deg, #6c757d, #495057) !important;
    color: white !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    font-weight: bold !important;
    margin-right: 15px !important;
    margin-bottom: 8px !important;
    min-width: 45px !important;
    text-align: center !important;
    font-size: 0.9em !important;
    flex-shrink: 0 !important;
    transition: all 0.3s ease !important;
}

.expired-option-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.expired-vote-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.expired-vote-fill {
    height: 100%;
    background: linear-gradient(90deg, #6c757d, #495057);
    border-radius: 3px;
    transition: all 0.5s ease !important;
}

.expired-vote-count {
    font-size: 0.8rem;
    color: #adb5bd;
    min-width: 60px;
    text-align: right;
}

/* 👇 FOOTER */
.expired-poll-footer {
    border-top-color: rgba(128, 128, 128, 0.3) !important;
    background: #2a2a3a !important;
    color: #adb5bd !important;
}

/* ==================== EFFETTI HOVER ORO ==================== */

.expired-opinion-poll:hover {
    transform: translateY(-5px) !important;
    border-color: rgba(255, 193, 7, 0.6) !important;
    box-shadow: 
        0 10px 30px rgba(255, 193, 7, 0.2),
        0 5px 15px rgba(255, 193, 7, 0.1) !important;
}

.expired-opinion-poll:hover .expired-poll-header {
    border-bottom-color: rgba(255, 193, 7, 0.4) !important;
    background: linear-gradient(135deg, #2a2a3a, #3a3a4a) !important;
}

.expired-opinion-poll:hover .expired-option-badge {
    background: linear-gradient(135deg, #ffc107, #e0a800) !important;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3) !important;
}

.expired-opinion-poll:hover .expired-vote-fill {
    background: linear-gradient(90deg, #ffc107, #e0a800) !important;
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.3) !important;
}

.expired-opinion-poll:hover .expired-poll-footer {
    border-top-color: rgba(255, 193, 7, 0.3) !important;
    background: linear-gradient(135deg, #2a2a3a, #3a3a4a) !important;
}

.expired-opinion-poll:hover .metadata-btn {
    background: linear-gradient(135deg, #ffc107, #e0a800) !important;
    color: #2a2a3a !important;
    font-weight: bold !important;
}

/* 👇 TOTALE VOTI */
.expired-total-votes-simple {
    text-align: center;
    font-size: 0.9rem;
    color: #4cc9f0;
    margin-top: 0.5rem;
}
/* CONTENITORE PRINCIPALE CERTIFICATO scaduto */
.certificate {
    width: 400px;
    height: 500px;
    position: relative;
    background: linear-gradient(135deg, #fef5e7 0%, #fdebd0 100%);
    border: 2px solid #d4af37;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* HEADER CON LOGO PE */
.header-logo {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    font-family: Georgia, serif;
    font-size: 48px;
    font-weight: bold;
    color: #2c3e50;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* TIMBRO CERALACCA */
.seal-container {
    position: absolute;
    top: 30px;
    right: 36px;
    width: 64px;
    height: 64px;
}

/* BASE TIMBRO ARGENTO */
.seal-base {
    position: absolute;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8f8f8 0%, #e0e0e0 25%, #ffffff 50%, #d0d0d0 100%);
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.8),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.3);
}

/* IMPRESSIONE CENTRALE ORO */
.seal-center {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffeb3b 0%, #ffd700 25%, #fff9c4 50%, #fbc02d 100%);
    box-shadow: 
        inset 0 2px 3px rgba(255, 255, 255, 0.6),
        inset 0 -2px 3px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.seal-text {
    font-family: 'Dancing Script', cursive;
    font-size: 10px;
    font-weight: bold;
    color: #8b7500;
    text-align: center;
    line-height: 1;
}

/* RIFLESSO SOLARE SUL TIMBRO DORATO */
.star {
    position: absolute;
    top: 6px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #ffffff 0%, #fff9c4 30%, transparent 70%);
    border-radius: 50%;
    animation: diamondSparkle 3s infinite;
    z-index: 10;
}

.star::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 12px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #ffffff 50%, transparent 100%);
    animation: sparkleBeam1 3s infinite;
}

.star::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 1px;
    height: 12px;
    background: linear-gradient(0deg, transparent 0%, #ffffff 50%, transparent 100%);
    animation: sparkleBeam2 3s infinite;
}

@keyframes diamondSparkle {
    0%, 100% { 
        opacity: 0.2;
        transform: scale(0.5);
        box-shadow: 0 0 2px rgba(255, 255, 255, 0.3);
    }
    50% { 
        opacity: 1;
        transform: scale(1.2);
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 12px rgba(255, 249, 196, 0.6);
    }
}

@keyframes sparkleBeam1 {
    0%, 100% { 
        opacity: 0;
        transform: rotate(0deg) scaleX(0.3);
    }
    50% { 
        opacity: 0.8;
        transform: rotate(45deg) scaleX(1);
    }
}

@keyframes sparkleBeam2 {
    0%, 100% { 
        opacity: 0;
        transform: rotate(0deg) scaleY(0.3);
    }
    50% { 
        opacity: 0.8;
        transform: rotate(45deg) scaleY(1);
    }
}

/* INFORMAZIONI PROPOSTA */
.proposal-info {
    display: none !important;
}

/* SEZIONE TESTO PROPOSTA */
.proposal-section {
    position: absolute;
    top: 190px;
    left: 20px;
    width: 360px;
    min-height: 120px;
    max-height: 160px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #bdc3c7;
    border-radius: 8px;
    padding: 10px;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-y: scroll !important; /* 👈 FORZA SCROLLBAR SEMPRE */
}
.proposal-label {
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
}

.proposal-text {
    white-space: normal !important;
    line-height: 1.4;
    color: #2c3e50 !important;
    font-weight: 500 !important;
    min-height: 200px !important;
}
/* SEZIONE INFERIORE: PE:ER */
.peer-section {
    position: absolute;
    top: 350px;
    left: 20px;
}

.peer-title {
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 4px;
}

.peer-burned {
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: bold !important;
    color: #6c757d !important;
    margin-bottom: 4px;
}

.peer-value {
    font-family: Arial, sans-serif;
    font-size: 11px;
    color: #2c3e50;
}

/* VOTI */
.votes-section {
    position: absolute;
    top: 350px;
    left: 200px;
    display: flex !important;
    flex-direction: row !important;
    gap: 40px !important;
}

.vote-for, .vote-against {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px !important;
    background: transparent !important;
    padding: 0 !important;
} /* 👈 CHIUDI QUI! */

/* 👇 NUMERI COMPLETAMENTE SEPARATI */
.vote-count {
    background: transparent !important;
    color: #2c3e50 !important;
    font-size: 14px !important;
    font-weight: bold !important;
}

/* STATO PROPOSTA */
.status {
    position: absolute;
    top: 450px;
    left: 50%;
    transform: translateX(-50%);
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #3498db;
    text-align: center;
}

/* ID PROPOSTA */
.proposal-id {
    position: absolute;
    top: 480px;
    left: 50%;
    transform: translateX(-50%);
    font-family: Arial, sans-serif;
    font-size: 10px;
    color: #95a5a6;
    text-align: center;
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .certificate {
        transform: scale(0.9);
    }
}
/* 👇 TIPO PROPOSTA (sotto PE) */
.proposal-type {
    position: absolute;
    top: 30px !important;
    left: auto !important;
    right: 120px !important;
    transform: none !important;
    font-size: 11px !important;
    font-family: Arial, sans-serif;
    font-weight: bold;
    color: #2c3e50;
}

/* 👇 NUOVO FOOTER CON GRID */
/* ✅ SOLO QUESTO - Footer uniforme per regular cards */
/* 👇 FOOTER PER REGULAR CARDS CERTIFICATE */
.certificate-footer-expired {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    border-radius: 6px;
    font-family: Arial, sans-serif;
    font-size: 10px !important;
    font-weight: bold !important;
    color: #2c3e50 !important;
    z-index: 1000;
}

.footer-category, .footer-id, .footer-date {
    color: #2c3e50 !important;
    font-weight: bold !important;
}



/* 👇 TOOLTIP "METADATA" */
.metadata-actions {
    margin-top: 10px;
    text-align: center;
}

.metadata-btn {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.metadata-btn:hover {
    background: linear-gradient(135deg, #495057, #343a40);
    transform: translateY(-2px);
}

/* 👇 EFFETTO HOVER ORO */
.nft-certificate-card {
    transition: all 0.3s ease;
}

.nft-certificate-card:hover .certificate {
    transform: translateY(-5px);
    box-shadow: 
        0 10px 30px rgba(212, 175, 55, 0.3),
        0 5px 15px rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.8);
}

/* 👇 AGGIUNGI QUI IL NUOVO CSS PER LA PRESENTAZIONE EUROPEO AI */
/* ==================== PRESENTAZIONE INIZIALE EUROPEO AI ==================== */

/*.welcome-overlay {
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    background: rgba(20, 30, 48, 0.98);
    color: white;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border-radius: 18px;
}

.welcome-content {
    background: rgba(10, 15, 24, 0.95);
    color: var(--text-light);
    padding: 25px;
    border-radius: 12px;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(76, 201, 240, 0.3);
}

.welcome-content h3 {
    color: var(--eu-light-blue);
    margin-bottom: 10px;
    font-size: 1.4em;
}

.welcome-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
}

.welcome-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.feature-card {
    display: flex;
    align-items: flex-start;
    text-align: left;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--eu-light-blue);
    transition: background 0.3s;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

.feature-icon {
    font-size: 1.3em;
    margin-right: 10px;
    margin-top: 2px;
    color: var(--eu-light-blue);
}

.feature-card strong {
    color: var(--eu-light-blue);
    display: block;
    margin-bottom: 4px;
    font-size: 0.9em;
}

.feature-card small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8em;
}

.welcome-cta {
    background: var(--eu-light-blue);
    color: rgba(20, 30, 48, 0.95);
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 0.9em;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.3s;
    font-weight: 600;
}

.welcome-cta:hover {
    background: #4cc9f0;
    transform: translateY(-2px);
}

.welcome-timer {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75em;
}*/

/* Typing Indicator */
/*.typing-indicator {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    align-self: flex-start;
    max-width: 80%;
}

.typing-dots {
    display: inline-flex;
    margin-left: 8px;
}

.typing-dots span {
    animation: typing 1.5s infinite;
    opacity: 0.3;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}*/

/* ==================== FINE PRESENTAZIONE EUROPEO AI ==================== */
/* 👇 TEMPORANEO: Stile per testo scrollabile */
/* 👇 SCROLL INTERNO PER TUTTO IL CONTENUTO */

/* 👇 FOOTER FISSO - MAI SCROLL */
.proposal-footer-fixed {
    position: relative;
    z-index: 15;
    padding: 0 15px 15px;
    background: rgba(0, 0, 0, 0.8);
}/* 👇 CONTENUTO CON SCROLL INTERNO */
/* 👇 CONTENUTO CON SCROLL INTERNO */
.proposal-content-scrollable {
    position: relative;
    z-index: 10;
    padding: 15px;
    color: #e0e0e0;
    font-size: 13px;
    height: 150px; /* 👈 ALTEZZA PER SCROLL */
    overflow-y: auto; /* 👈 SCROLL INTERNO */
    width: 100%;
}

/* 👇 NASCONDI SELECT INIZIALMENTE */
.chat-mode-toggle {
    display: none;
}

.chat-mode-toggle.visible {
    display: block !important;
    background: #1a1a2e !important;
    padding: 8px !important;
    border-radius: 8px !important;
    border: 2px solid #4cc9f0 !important;
    margin: 10px 0 !important;
}

.chat-mode-toggle.visible select {
    width: 100% !important;
    padding: 8px !important;
    background: #2d2d2d !important;
    color: white !important;
    border: 1px solid #4cc9f0 !important;
    border-radius: 4px !important;
    font-size: 14px !important;
}

/* 👇 STILE PER PULSANTI FEATURE COME BUTTON */
.feature-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-left: 3px solid var(--eu-light-blue);
    border-radius: 8px;
    padding: 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    color: inherit;
    font-family: inherit;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.feature-card:focus {
    outline: 2px solid var(--eu-light-blue);
    outline-offset: 2px;
}
/* ==================== CORREZIONE CARD ROTTE ==================== */
.proposal-content-scrollable {
    position: relative !important;
    z-index: 10 !important;
    padding: 15px !important;
    color: #e0e0e0 !important;
    font-size: 13px !important;
    height: 150px !important;
    overflow-y: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.proposal-footer-fixed {
    position: relative !important;
    z-index: 15 !important;
    padding: 0 15px 15px !important;
    background: rgba(0, 0, 0, 0.8) !important;
}

.vote-buttons {
    position: relative !important;
    z-index: 20 !important;
    margin-top: 0 !important;
    padding: 15px !important;
    display: flex !important;
    gap: 10px !important;
    justify-content: center !important;
    background: rgba(0, 0, 0, 0.9) !important;
    border-radius: 0 0 15px 15px !important;
}
/* ==================== FINE CORREZIONE ==================== */

/* TOOLTIP METADATA - PER TUTTE LE CARD */
.proposal-metadata-tooltip {
    margin-left: 10px;
}

.metadata-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.5);
    color: #4caf50;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.metadata-btn:hover {
    background: #4caf50;
    color: white;
    transform: scale(1.1);
}
/* 👇 AGGIUNGI QUI IL CSS PER IL POPUP METADATA */
.metadata-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.metadata-popup {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-left: 4px solid #4caf50;
}

.metadata-content {
    margin: 1.5rem 0;
}

.metadata-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.metadata-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.no-metadata {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
}

.close-metadata-btn {
    background: #4caf50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    transition: background 0.2s ease;
}

.close-metadata-btn:hover {
    background: #45a049;
}
/* === INIZIO NUOVI STILI card attive LAYOUT COMPATTO === */

/* CONTAINER OVERLAY */
/* CORREZIONE TIMBRO - PRIORITÀ MASSIMA */
/* 1. ALZA IL TIMBRO SOPRA TUTTO */
.nft-wax-seal {
    z-index: 9999 !important; /* MASSIMA PRIORITÀ */
    transform: scale(0.7);
}


/* 3. ASSICURA CHE IL CONTAINER NFT SIA VISIBILE */
.nft-burned-texture {
    position: relative;
    overflow: visible !important; /* PERMETTI AL TIMBRO DI USCIRE */
}

/* 4. LOGO PE SOPRA TUTTO */
.nft-logo-text {
    z-index: 9998 !important;
    position: relative;
}

/* CONTAINER OVERLAY - SCESO PER TIMBRO */
/* 2. ABBASSA L'OVERLAY PER SCOPERCHIARE TIMBRO */
.proposal-content-overlay {
    position: absolute;
    top: 130px !important; /* SCENDI ANCORA DI PIÙ */
    left: 15px;
    right: 15px;
    bottom: 15px;
    z-index: 20;
}

/* TESTO SCROLLABILE */
.proposal-content-scrollable {
    height: 180px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    color: #e0e0e0;
    font-size: 13px;
}

.proposal-content-scrollable h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #ffffff;
}

/* FOOTER COMPATTO - IN FONDO */
.proposal-footer-compact {
    position: absolute;
    bottom: 5px;
    left: 10px !important; 
    right: 10px !important;
    height: 45px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.footer-top-row, .footer-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

/* TOOLTIP CON TESTO "metadata" - COMFORTEVOLE */
.metadata-btn-compact {
    padding: 6px 10px !important;   /* Ancora più spazio */
    font-size: 10px !important;     /* Dimensione normale */
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    color: #e0e0e0;
    white-space: nowrap;
    max-width: 65px;
    min-width: 55px;
}

/* PULSANTI COMPATTI */
.vote-buttons-compact {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.vote-buttons-compact .vote-btn {
    flex: 1;
    padding: 8px;
    font-size: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.vote-buttons-compact .vote-for {
    background: #4CAF50;
    color: white;
}

.vote-buttons-compact .vote-against {
    background: #F44336;
    color: white;
}
/* FORZA VISIBILITÀ TIMBRO */
.nft-wax-seal {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    top: 20px !important;
    right: 20px !important;
  
}
/* === INIZIO NUOVI STILI HEADER E CATEGORIE === */

/* HEADER CON TRE ELEMENTI card attive */
.proposal-header {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 25;
}

/* BADGE TIPO PROPOSTA */
.proposal-type-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 5px;
}

/* CATEGORIA CON ICONA */
.proposal-category {
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    margin-bottom: 8px;
    display: inline-block;
}

/* === FINE NUOVI STILI HEADER E CATEGORIE card attive === */

/* === FINE NUOVI STILI card attive === */
/* === CORREZIONE POSIZIONAMENTO HEADER === */
.proposal-header {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 25;
    pointer-events: none;
}

.proposal-type-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: auto;
}

/* Logo PE centrale */
.nft-logo-text {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    top: 35px !important;
    font-size: 56px !important;
    z-index: 25 !important;
    margin: 0 !important;
}
/* DUAL-FACE BASICS */
.nft-certificate-card {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    height: 500px; /* 👈 ALTEZZA ORIGINALE */
    width: 350px;
    margin: 15px;
	    /* 👇 AGGIUNGI QUESTA RIGA */
    transform-origin: center; /* 👈 🔥 FORZA IL PERNO AL CENTRO! */
}

.certificate-front-face,
.certificate-art-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    top: 0;
    left: 0;
}

.certificate-art-face {
    display: none;
    height: 500px;
    width: 400px; /* 👈 LARGHEZZA DIRETTA 400px */
    background: #2a2a3a;
    border-radius: 12px;
    overflow: hidden;
    transform: rotateY(180deg);
    
    /* 👇 CENTRA ORIZZONTALMENTE */
    left: 50%;
    margin-left: -200px; /* 👈 400px / 2 = -200px (centra perfettamente) */
}
.nft-certificate-card.show-art .certificate-art-face {
    display: block;
}

.nft-certificate-card.show-art {
    transform: rotateY(180deg);
}

.certificate-artwork {
    width: 100%;
    height: 100%;
    object-fit: cover;     /* 👈 Taglia gli eccessi */
    object-position: center; /* 👈 Centra l'immagine */
    display: block;
    
    /* 👇 FORZA LA COPERTURA TOTALE */
    min-width: 100%;
    min-height: 100%;
    max-width: none;       /* 👈 Rimuovi limiti massimi */
    max-height: none;
	    image-rendering: -webkit-optimize-contrast;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}

/* Loading States */
.art-loading {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
}

.nft-certificate-card.show-art .art-loading {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Flip Indicator */
.flip-indicator {
    position: absolute;
    top: 10px;
    left: 20px;
    background: rgba(0,0,0,0.7);
    padding: 5px 10px;
    border-radius: 15px;
    color: white;
    font-size: 11px;
    z-index: 100;
    cursor: pointer;
}
/* 👇 COPIA E INCOLLA - NON TOGLIERE NULLA */
.expired-card-container {
    position: relative;
    display: inline-block;
    margin: 15px;
}

.expired-card-container .flip-indicator {
    position: absolute;
    top: 10px;
    left: 20px;
    background: rgba(0,0,0,0.7);
    padding: 5px 10px;
    border-radius: 15px;
    color: white;
    font-size: 11px;
    z-index: 1000;
    cursor: pointer;
}


/* ==================== INIZIO TUO CSS ORIGINALE ==================== */
/* COPIA QUI TUTTO IL TUO style-original.css */
/* ... tutto il tuo codice originale ... */

/* ==================== FINE TUO CSS ORIGINALE ==================== */

/* ==================== MIGLIORIE NAVBAR & FILTRI ==================== */

/* 1. MIGLIORAMENTI HEADER/NAVBAR */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}



.nav-link, .nav-button {
    min-height: 44px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-button:hover {
    transform: translateY(-2px);
}

/* 2. MIGLIORAMENTI FILTERS SECTION */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid rgba(76, 201, 240, 0.2);
    border-radius: 10px;
    background: rgba(10, 15, 24, 0.5);
    color: white;
    transition: all 0.3s ease;
    font-size: 16px;
    min-height: 44px;
}

.search-box input:focus {
    border-color: var(--eu-light-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.1);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid rgba(76, 201, 240, 0.2);
    background: rgba(10, 15, 24, 0.5);
    color: #ccc;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-height: 44px;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--eu-light-blue);
    color: #0a1929;
    border-color: var(--eu-light-blue);
}

/* 3. MIGLIORAMENTI EUROPAEO AI */
.chat-footer button {
    border-radius: 8px !important;
    background: var(--eu-light-blue) !important;
    color: white !important;
    padding: 10px 15px !important;
    min-height: 44px;
    border: none;
    cursor: pointer;
}

#closeChatBtn {
    border-radius: 50% !important;
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

/* 4. ACCESSIBILITÀ */
button:focus,
.btn:focus {
    outline: 2px solid var(--eu-light-blue);
    outline-offset: 2px;
}

/* 5. RESPONSIVE */
@media (max-width: 900px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    .main-nav {
        margin: 1rem 0;
        justify-content: center;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .filter-buttons {
        justify-content: center;
    }
    
    .filter-btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
}
header {
    background: rgba(25, 25, 45, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(76, 201, 240, 0.2) !important;
}

/* === NUOVO LOGO - FORZATO === */

.logo-emblem {
    display: none !important;
}

.logo-text h1 {
    font-size: 2.8rem !important;
    font-weight: 800 !important;
    font-family: 'Montserrat', sans-serif !important;
    display: flex;
    align-items: center;
    gap: 0;
}

.logo-euro, .logo-ople {
    color: var(--eu-light-blue) !important;
    font-weight: 600;
}

/* 👇 FORZA MASSIMA IL COLORE PE */
.logo-text h1 .logo-pe.heartbeat {
    color: #FF8C00 !important;
    font-weight: 900 !important;
    background: none !important;
    -webkit-text-fill-color: #FF8C00 !important;
    text-fill-color: #FF8C00 !important;
}

/* ANIMAZIONE SOLO SCALE */
@keyframes size-pulse {
    0%, 100% { 
        transform: scale(1);
    }
    50% { 
        transform: scale(1.08);
    }
}

.heartbeat {
    animation: size-pulse 2s ease-in-out infinite;
    display: inline-block;
    color: #FF8C00 !important; /* 👈 FORZA ANCHE QUI */
}

@media (max-width: 768px) {
    .logo-text h1 {
        font-size: 2.2rem !important;
        flex-wrap: wrap;
        justify-content: center;
    }
}
/* === FIX SCROLL CARD SCADUTE REGULAR === */

/* Forza scroll visibile nelle certificate card */
.certificate .proposal-section {
    overflow-y: auto !important;
    max-height: 140px !important;
}

/* Scrollbar sempre visibile e stylizzata */
.certificate .proposal-section::-webkit-scrollbar {
    width: 8px !important;
}

.certificate .proposal-section::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1) !important;
    border-radius: 4px !important;
}

.certificate .proposal-section::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 4px !important;
}

.certificate .proposal-section::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5) !important;
}

/* Assicura che il contenuto sia abbastanza lungo per scroll */
.certificate .proposal-text {
    min-height: 150px !important;
    white-space: normal !important;
}
/* 👇 QUESTA REGOLA IN FONDO SOVRASCRIVE SOLO LE SCADUTE */
.certificate .proposal-text,
.nft-certificate-card .proposal-text {
    max-height: none !important;
    overflow: visible !important;
    text-overflow: unset !important;
    min-height: 200px !important;
}/* ==================== FIX POPUP MINT URGENTE ==================== */
/* ==================== FIX POPUP MINT COMPLETO ==================== */

/* 👇 POPUP CONTAINER - COPERTURA COMPLETA */
#mintPopup.popup-container {
    z-index: 10000;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

/* 👇 CONTENUTO PRINCIPALE - DIMENSIONI E SCROLL */
#mintPopup .popup-content {
    max-height: 85vh;
    overflow-y: auto;
    width: 90%;
    max-width: 500px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 25px;
    border: 2px solid rgba(76, 201, 240, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

/* 👇 AREA MESSAGGIO E PREVIEW - SCROLLABILE */
#mintPopup .popup-message {
    flex: 1;
    /*overflow-y: auto;*/
    padding: 15px 0;
}

/* 👇 PREVIEW PROPOSTA - SCROLL INTERNO */
#mintPopup .proposal-preview {
   /* max-height: 200px;*/
    /*overflow-y: auto;*/
    background: rgba(76, 201, 240, 0.05);
    border: 1px solid rgba(76, 201, 240, 0.2);
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
}

/* 👇 TESTO PROPOSTA NEL PREVIEW */
#mintPopup .preview-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.9em;
    line-height: 1.4;
   /* max-height: 150px;*/
    /*overflow-y: auto;*/
    color: #e0e0e0;
}

/* 👇 CATEGORIA NEL PREVIEW */
#mintPopup .preview-category {
    font-size: 0.8em;
    color: #4cc9f0;
    font-weight: bold;
    margin-top: 8px;
}

/* 👇 FOOTER CON BOTTONI - FISSO IN FONDO */
#mintPopup .popup-actions {
    position: sticky;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 15px 0 0 0;
    margin-top: 20px;
    border-top: 1px solid rgba(76, 201, 240, 0.2);
}

/* 👇 SCROLLBAR PERSONALIZZATA */
#mintPopup .popup-content::-webkit-scrollbar {
    width: 8px;
}

#mintPopup .popup-content::-webkit-scrollbar-track {
    background: rgba(76, 201, 240, 0.1);
    border-radius: 10px;
}

#mintPopup .popup-content::-webkit-scrollbar-thumb {
    background: rgba(76, 201, 240, 0.3);
    border-radius: 10px;
}

#mintPopup .popup-content::-webkit-scrollbar-thumb:hover {
    background: rgba(76, 201, 240, 0.5);
}

/* 👇 STILE PER L'ANTEPRIMA NELLA CHAT AI */
.proposal-preview-chat {
    background: rgba(76, 201, 240, 0.1);
    border: 1px solid rgba(76, 201, 240, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    /*max-height: 200px;*/
   /* overflow-y: auto;*/
}

.preview-content {
    font-size: 0.9em;
    line-height: 1.4;
    color: #e0e0e0;
    margin-bottom: 10px;
    white-space: pre-wrap;
   /* max-height: 150px;*/
   /* overflow-y: auto;*/
}

.preview-category {
    font-size: 0.8em;
    color: #4cc9f0;
    font-weight: bold;
}
/* =================================================================
   WHITEPAPER PREMIUM - FIX LARGHEZZA & CONFLITTI
   ================================================================= */

/* Overlay scuro con effetto sfocato */
.popup-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 8, 20, 0.95);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

/* FIX CRUCIALE: Usiamo il doppio selettore per vincere sui popup piccoli */
.whitepaper-content.popup-content {
    width: 90% !important;
    max-width: 1300px !important; /* Vince sul max-width: 500px degli altri popup */
    height: 85vh !important;
    background: var(--eu-dark-blue);
    border: 1px solid var(--eu-gold);
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    text-align: left !important; /* Reset dell'allineamento centrato degli altri popup */
}

/* --- HEADER REYOUT & COLORS --- */
.whitepaper-header {
    background: linear-gradient(to right, #0a1128, #16213e);
    padding: 25px 40px;
    border-bottom: 2px solid var(--eu-gold);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title-group {
    display: flex;
    flex-direction: column; /* Titolo sopra, versione sotto */
    gap: 5px;
}

.wp-main-title {
    color: #ffffff !important;
    margin: 0 !important;
    font-size: 1.8rem !important;
    letter-spacing: 2px;
    font-weight: 800;
}

.wp-version {
    color: var(--eu-gold); /* Oro per risaltare sul blu */
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 400;
    opacity: 0.8;
}

/* TASTO PDF - ADDIO VIOLA, BENVENUTO ORO/BIANCO */
.btn-download-gold {
    background: transparent;
    border: 1px solid var(--eu-gold);
    color: var(--eu-gold) !important;
    padding: 8px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-download-gold:hover {
    background: var(--eu-gold);
    color: #0a1128 !important;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

/* Pulsante chiusura più visibile */
.close-popup-wp {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2.5rem;
    cursor: pointer;
    margin-left: 30px;
    line-height: 1;
    transition: color 0.3s;
}

.close-popup-wp:hover {
    color: var(--eu-gold);
}

.whitepaper-body {
    display: flex !important;
    flex-direction: row !important;
    flex: 1 !important;
    overflow: hidden !important;
    width: 100% !important;
}

/* Menu laterale */
.whitepaper-nav {
    width: 250px;
    min-width: 250px;
    background: rgba(0, 0, 0, 0.2);
    padding: 40px 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    overflow-y: auto;
}

.whitepaper-nav a {
    display: block;
    padding: 12px 0;
    color: var(--eu-silver);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.whitepaper-nav a:hover {
    color: var(--eu-gold);
    padding-left: 10px;
}

/* Sezione testo ampia */
.whitepaper-text {
    flex: 1 !important;
    min-width: 0 !important;
    display: block !important; 
    padding: 60px 80px !important;
    overflow-y: auto;
    scroll-behavior: smooth;
    background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0) 100%);
    color: #f0f0f0;
    line-height: 1.8;
}

/* Gestione contenuti interni */
.whitepaper-text h3 {
    color: var(--eu-gold);
    font-size: 2.2rem;
    margin-bottom: 30px;
}

.whitepaper-text section, 
.whitepaper-text p {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    margin-bottom: 25px;
    font-size: 1.1rem;
    text-align: left !important;
}

/* Scrollbar Dorata */
.whitepaper-text::-webkit-scrollbar { width: 6px; }
.whitepaper-text::-webkit-scrollbar-track { background: transparent; }
.whitepaper-text::-webkit-scrollbar-thumb { background: var(--eu-gold); border-radius: 10px; }

/* Footer */
.whitepaper-footer {
    padding: 20px 40px;
    background: #050a18;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
/* ============================================================
   STILI CHAT AI (Nuovo layout con Aster - Classi doppie per compatibilità)
   ============================================================ */

/* ============================================================
   CONTENITORE PRINCIPALE (FULLSCREEN-ISH)
   ============================================================ */
#chatContainer {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 95vw !important;
    max-width: 1300px !important;
    height: 85vh !important;
    z-index: 10000;
    background: #05050a;
    border-radius: 24px;
    box-shadow: 0 0 100px rgba(0,0,0,0.9), 0 0 30px rgba(76, 201, 240, 0.2);
    overflow: hidden;
    display: flex !important; /* FORZA IL FLEX PER LA SIDEBAR */
    border: 1px solid rgba(76, 201, 240, 0.15);
}

#chatContainer.hidden {
    display: none !important;
}

.aster-layout-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}

/* ============================================================
   SIDEBAR SINISTRA: CHAT & COMANDI
   ============================================================ */
.aster-sidebar-chat {
    width: 380px !important;
    flex: 0 0 380px !important;
    display: flex !important;
    flex-direction: column;
    background: #0d1117;
    position: relative;
    z-index: 10001 !important; /* Deve essere più alto del workspace */
    border-right: 1px solid rgba(76, 201, 240, 0.2);
}

/* Header della Sidebar - DOPPIA CLASSE PER COMPATIBILITÀ */
.aster-ui-header, .chat-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.aster-ui-header h3, .chat-header h3 {
    font-size: 1rem;
    color: #4cc9f0;
    margin: 0;
}

/* Area Messaggi Ridimensionata - DOPPIA CLASSE */
#chatMessages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Footer & Input nella Sidebar - DOPPIA CLASSE PER COMPATIBILITÀ */
.aster-ui-footer, .chat-footer {
    padding: 20px;
    background: rgba(0,0,0,0.4);
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* Container input - DOPPIA CLASSE PER COMPATIBILITÀ */
/* Container dell'input - più spazio per il textarea */
.input-container-glow, .chat-input-container {
    display: flex !important;
    gap: 12px !important;
    padding: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-height: 70px !important;
}

/* Textarea più largo */
/* 👇 CHIAVE: flex-basis 250px invece di 0% */
#userQuestion {
    flex: 3 1 250px !important; /* flex-grow: 3, flex-shrink: 1, flex-basis: 250px */
    min-width: 250px !important;
    min-height: 50px !important;
    width: auto !important; /* Sovrascrive width: 0px */
    
    /* Stili visivi */
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid #4cc9f0 !important;
    border-radius: 8px !important;
    color: white !important;
    padding: 12px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
}

/* ============================================================
   TASTI E SELEZIONI - DOPPIA CLASSE PER COMPATIBILITÀ
   ============================================================ */
/* Bottone invio chat (blu, piccolo) */
/* 👇 Bottone dimensioni fisse */
.aster-send-btn, .chat-send-btn {
    flex: 1 0 60px !important; /* flex-grow: 1, flex-shrink: 0, flex-basis: 60px */
    width: 60px !important;
    height: 50px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    
    /* Stili */
    background: #4cc9f0 !important;
    color: black !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Bottone Genera Proposta (fuxia, grande) */
.btn-generate-fast {
    background: #f72585;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    margin-top: 10px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.aster-send-btn:hover, .chat-send-btn:hover, .btn-generate-fast:hover {
    background: #4361ee;
    transform: scale(1.05);
}

/* Selettore tipo proposta */
.chat-mode-toggle {
    display: block !important;
    margin-bottom: 10px !important;
}

#proposalTypeSelect {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(76, 201, 240, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
}

#proposalTypeSelect option {
    background: #0d1117;
    color: white;
}

/* ============================================================
   AREA DESTRA: LA STANZA DI ASTER (IL WORKSPACE)
   ============================================================ */
.aster-main-workspace {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #1a120b;
}

.library-background-layer {
    position: absolute;
    inset: 0;
    background-image: url('../assets/img/stanza-biblioteca.png'); /* La tua stanza */
    background-size: cover;
    background-position: center;
    transition: filter 0.5s ease, transform 0.5s ease;
    z-index: 1;
}

/* Effetto quando appare la proposta */
.library-background-layer.blurred {
    filter: blur(10px) brightness(0.4);
    transform: scale(1.05);
}

.character-centering {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

#aster-image-large {
    max-width: 85%;
    max-height: 75vh;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 30px rgba(76, 201, 240, 0.5));
    transition: all 0.4s ease;
}

.aster-status-bubble {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 30px;
    border-radius: 40px;
    font-weight: 500;
    font-size: 1.1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(76, 201, 240, 0.5);
    animation: float 4s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(76, 201, 240, 0.5);
}

/* ============================================================
   OVERLAY PROPOSTA GENERATA (IL FOGLIO)
   ============================================================ */
/* CORREZIONE CANVAS (Deve sparire del tutto se non serve) */
.proposal-canvas.hidden {
    display: none !important;
}

.proposal-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20000; /* Sopra ad Aster */
    background: rgba(0,0,0,0.7); /* Scurisce lo sfondo per far leggere il foglio */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.proposal-paper {
    background: white;
    width: 100%;
    max-width: 800px;
    height: 90%;
    border-radius: 4px; /* Taglio netto tipo carta */
    padding: 60px;
    color: #1a1a1a;
    box-shadow: 0 30px 70px rgba(0,0,0,0.8);
    overflow-y: auto;
    position: relative;
}

/* Contenuto del corpo della proposta */
#proposal-body-text {
    white-space: pre-wrap;
    line-height: 1.6;
    color: #333;
    padding: 20px 0;
}

/* ============================================================
   MESSAGGI DELLA CHAT - DOPPIA CLASSE PER COMPATIBILITÀ
   ============================================================ */
.ai-message {
    align-self: flex-start;
    max-width: 90%;
    background: rgba(76, 201, 240, 0.1);
    border-left: 3px solid #4cc9f0;
    padding: 12px;
    border-radius: 0 10px 10px 0;
    color: #e0e0e0;
    font-size: 0.9rem;
}

.user-message {
    align-self: flex-end;
    background: rgba(247, 37, 133, 0.1);
    padding: 10px;
    border-radius: 10px 10px 0 10px;
    color: #fff;
    font-size: 0.9rem;
}

/* Typing indicator - per showTypingIndicator() */
.typing-indicator {
    background: rgba(76, 201, 240, 0.1);
    border-left: 3px solid #4cc9f0;
    padding: 12px;
    border-radius: 0 10px 10px 0;
    color: #e0e0e0;
    font-size: 0.9rem;
    align-self: flex-start;
    max-width: 90%;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.typing-dots {
    display: inline-flex;
    gap: 3px;
}

.typing-dots span {
    animation: typing 1.5s infinite;
    opacity: 0.3;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ============================================================
   ANIMAZIONI
   ============================================================ */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes typing {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

/* Per l'effetto sfocatura quando Aster ha la pergamena */
.library-background-layer.blurred {
    filter: blur(8px);
    transition: filter 0.3s ease;
}

/* ============================================================
   SCROLLBARS
   ============================================================ */
/* Scrollbar per l'input */
#userQuestion::-webkit-scrollbar {
    width: 4px;
}
#userQuestion::-webkit-scrollbar-track {
    background: transparent;
}
#userQuestion::-webkit-scrollbar-thumb {
    background: rgba(76, 201, 240, 0.3);
    border-radius: 2px;
}

/* Scrollbar per l'area messaggi */
#chatMessages::-webkit-scrollbar {
    width: 6px;
}
#chatMessages::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}
#chatMessages::-webkit-scrollbar-thumb {
    background: rgba(76, 201, 240, 0.4);
    border-radius: 3px;
}
/* ============================================================
   WELCOME SCREEN - Stili per compatibilità
   ============================================================ */
/* ============================================================
   CHAT LAYOUT - Popup principale di Aster
   ============================================================ */
.aster-layout-wrapper {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    background: #1a1a2e;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    display: flex;
    overflow: hidden;
}

.aster-layout-wrapper.hidden {
    display: none !important;
}

/* Sidebar sinistra (chat) */
.aster-sidebar-chat {
    width: 350px;
    background: #16213e;
    border-right: 1px solid rgba(76, 201, 240, 0.2);
    display: flex;
    flex-direction: column;
}
/* ==================== AREA RISPOSTE CHAT APPENA AGGIUNTI==================== */
.chat-response-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.5s ease;
    background: rgba(10, 10, 20, 0.8);
    backdrop-filter: blur(10px);
}

.response-container {
    max-width: 80%;
    max-height: 80%;
    min-width: 300px;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(76, 201, 240, 0.3);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    position: relative;
}

.response-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4cc9f0, #3a0ca3, #4cc9f0);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

.response-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(76, 201, 240, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.response-aster {
    color: #4cc9f0;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.response-aster i {
    margin-right: 8px;
    color: #ffaa00;
}

.response-text {
    color: white;
    font-size: 1.1rem;
    line-height: 1.8;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    word-wrap: break-word;
}

/* Tipi di risposta */
.response-text.thinking {
    opacity: 0.8;
    font-style: italic;
}

.response-text.responding {
    border-left: 3px solid #4cc9f0;
    padding-left: 20px;
}

/* Animazioni */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: scale(0.95);
    }
    to { 
        opacity: 1; 
        transform: scale(1);
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Responsive */
@media (max-width: 768px) {
    .response-container {
        max-width: 90%;
        padding: 20px;
    }
    
    .response-text {
        font-size: 0.95rem;
    }
}
/* Area destra (stanza Aster) */
.aster-main-workspace {
    flex: 1;
    background: #0f3460;
    position: relative;
    overflow: hidden;
}

/* Header chat */
.aster-ui-header {
    padding: 15px;
    border-bottom: 1px solid rgba(76, 201, 240, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aster-ui-header h3 {
    color: #4cc9f0;
    margin: 0;
    font-size: 1.1rem;
}

.aster-close-x {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.aster-close-x:hover {
    opacity: 1;
}

/* Area messaggi */
.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

/* Footer chat */
.aster-ui-footer {
    padding: 15px;
    border-top: 1px solid rgba(76, 201, 240, 0.2);
}

/* Container input */
.chat-input-container {
    display: flex;
    gap: 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 25px;
    padding: 5px;
}

#userQuestion {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    padding: 10px 15px;
    resize: none;
}

#userQuestion:focus {
    outline: none;
}

.aster-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #4cc9f0;
    border: none;
    color: #1a1a2e;
    cursor: pointer;
    transition: all 0.3s;
}

.aster-send-btn:hover {
    background: #f72585;
    transform: scale(1.05);
}
/*CSS DI PROVA CSS per popup pre mint con disclaimer*/
/* ======================================================== */
/* FIX PER TESTO PROPOSTA FINALE - SCOPE RISTRETTISSIMO     */
/* INFLUENZA SOLO finalProposalTextDisplay, nulla altro     */
/* ======================================================== */

section#create .final-proposal-display .display-text #finalProposalTextDisplay {
    /* 🔥 PROPRIETÀ CRITICHE - solo quelle necessarie */
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow-y: auto;
    max-height: 400px;
}

/* Mobile - stesso scope super ristretto */
@media (max-width: 768px) {
    section#create .final-proposal-display .display-text #finalProposalTextDisplay {
        max-height: 300px;
    }
}
/* Per aster-proposal.png a dimensione piena e cristallo */
#aster-image-large.proposal-fullsize {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1 !important;
}

#aster-room-layer.proposal-fullsize {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    z-index: 1 !important;
}
/* Animazione esagono */
@keyframes hexagon-float {
    0%, 100% { 
        transform: translateX(-50%) translateY(0) scale(1);
        box-shadow: 
            inset 0 0 25px rgba(255, 255, 255, 0.4),
            0 0 35px rgba(0, 245, 255, 0.5),
            0 0 70px rgba(0, 245, 255, 0.25);
    }
    50% { 
        transform: translateX(-50%) translateY(-8px) scale(1.02);
        box-shadow: 
            inset 0 0 30px rgba(255, 255, 255, 0.5),
            0 0 45px rgba(0, 245, 255, 0.7),
            0 0 90px rgba(0, 245, 255, 0.35);
    }
}
/* =========================================== */
/* MODAL OVERLAY - ASTER INTELLIGENCE DASHBOARD */
/* =========================================== */

.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.85) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 999999 !important;
    padding: 20px !important;
    opacity: 0;
    animation: modalFadeIn 0.3s ease forwards;
}

@keyframes modalFadeIn {
    to { opacity: 1; }
}

.modal-content {
    background: white !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    max-width: 900px !important;
    width: 95% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    transform: translateY(30px) scale(0.95);
    animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalSlideUp {
    to {
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #1e1b4b 0%, #4f46e5 100%) !important;
    color: white !important;
    padding: 24px 32px !important;
    border-radius: 20px 20px 0 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
}

.modal-header h3 {
    margin: 0 !important;
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px !important;
}

.modal-body {
    padding: 32px !important;
}

/* =========================================== */
/* ASTER INTELLIGENCE DASHBOARD - STILI COMPLETI */
/* =========================================== */

.ai-intelligence-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1e293b;
}

/* HEADER */
.dashboard-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.frontier-badge, .innovative-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.frontier-badge {
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.innovative-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.dashboard-header h3 {
    color: #1e1b4b;
    margin: 10px 0 5px 0;
    font-size: 1.8rem;
}

.category-label {
    color: #64748b;
    font-size: 0.95rem;
}

/* CITAZIONE CULTURALE */
.cultural-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 25px;
    border-radius: 16px;
    border-left: 6px solid #d97706;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.cultural-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d97706, #f59e0b, #fbbf24);
}

.quote-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.7;
}

.cultural-section blockquote {
    margin: 0;
    padding: 0;
}

.cultural-section blockquote p {
    font-size: 1.3rem;
    font-style: italic;
    color: #78350f;
    line-height: 1.6;
    margin-bottom: 10px;
    font-weight: 500;
}

.cultural-section blockquote footer {
    text-align: right;
    color: #92400e;
    font-weight: 700;
    font-size: 1rem;
}

/* SCORE BREAKDOWN */
.scores-section {
    background: white;
    padding: 25px;
    border-radius: 16px;
    border: 2px solid #e2e8f0;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.scores-section h4 {
    color: #1e1b4b;
    margin-top: 0;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
}

.overall-score-card {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px dashed #e2e8f0;
}

.overall-circle {
    width: 90px;
    height: 90px;
    border: 5px solid;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: white;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.overall-number {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
}

.overall-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
}

.overall-details h5 {
    margin: 0 0 8px 0;
    color: #1e293b;
    font-size: 1.2rem;
}

.overall-details p {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
}

/* Score Bars */
.score-bars-container {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.score-bar-item {
    margin-bottom: 5px;
}

.score-bar-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.score-label {
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.score-value {
    font-weight: 800;
    font-size: 1.2rem;
}

.score-grade {
    font-size: 0.85rem;
    background: #f1f5f9;
    padding: 3px 10px;
    border-radius: 12px;
    margin-left: 8px;
    font-weight: 600;
}

.score-bar-track {
    height: 14px;
    background: #f1f5f9;
    border-radius: 7px;
    overflow: hidden;
    position: relative;
}

.score-bar-fill {
    height: 100%;
    border-radius: 7px;
    transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.score-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        transparent 100%);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* SEMANTIC POSITIONING */
.semantic-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 28px;
    border-radius: 16px;
    border: 2px solid #bae6fd;
    margin-bottom: 30px;
}

.semantic-section h4 {
    color: #0369a1;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
}

.section-description {
    color: #0c4a6e;
    margin-bottom: 25px;
    font-size: 1rem;
}

.semantic-meter {
    margin: 25px 0;
}

.meter-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #475569;
}

.meter-labels span:first-child { color: #16a34a; }
.meter-labels span:nth-child(2) { color: #d97706; }
.meter-labels span:last-child { color: #dc2626; }

.meter-bar-large {
    height: 40px;
    background: #f1f5f9;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    border: 3px solid #cbd5e1;
    margin: 10px 0;
}

.meter-zone {
    position: absolute;
    top: 0;
    bottom: 0;
}

.meter-zone.mainstream {
    left: 0;
    width: 33%;
    background: rgba(34, 197, 94, 0.3);
}

.meter-zone.innovative {
    left: 33%;
    width: 34%;
    background: rgba(251, 191, 36, 0.3);
}

.meter-zone.frontier {
    left: 67%;
    width: 33%;
    background: rgba(239, 68, 68, 0.3);
}

.satellite-pointer {
    position: absolute;
    top: -30px;
    transform: translateX(-50%);
    transition: left 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    z-index: 10;
}

.satellite {
    font-size: 2.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.pointer-value {
    background: #1e1b4b;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.9rem;
    margin-top: 5px;
    display: inline-block;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.meter-values {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.semantic-insight {
    margin-top: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border-left: 4px solid #0284c7;
}

.semantic-stats {
    display: flex;
    gap: 25px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.stat {
    padding: 12px 18px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    min-width: 150px;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 5px;
    font-weight: 600;
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e293b;
}

.stat.highlight {
    border-color: #7c3aed;
    background: #f5f3ff;
}

.frontier-yes {
    color: #7c3aed !important;
}

.frontier-no {
    color: #475569 !important;
}

/* CONVICTION ANALYSIS */
.conviction-section {
    background: white;
    padding: 25px;
    border-radius: 16px;
    border: 2px solid #e2e8f0;
    margin-bottom: 30px;
}

.conviction-section h4 {
    color: #1e1b4b;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
}

.conviction-metrics {
    display: flex;
    gap: 25px;
    margin: 20px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.metric {
    flex: 1;
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

.metric-label {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 600;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: #1e293b;
}

.metric.highlight {
    border-color: #4f46e5;
    background: #f5f3ff;
}

.metric-value.ratio {
    color: #4f46e5;
}

.conviction-insight {
    padding: 20px;
    background: #f1f5f9;
    border-radius: 12px;
    border-left: 4px solid #4f46e5;
}

/* LEGAL LINK SECTION */
.legal-link-section {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    padding: 25px;
    border-radius: 16px;
    border: 2px solid #ddd6fe;
    margin-bottom: 30px;
}

.legal-link-section h4 {
    color: #5b21b6;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
}

.link-card {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 25px;
    background: white;
    border-radius: 12px;
    border: 2px solid #c4b5fd;
}

.link-icon {
    font-size: 3rem;
    color: #7c3aed;
}

.link-content h5 {
    margin: 0 0 10px 0;
    color: #5b21b6;
    font-size: 1.2rem;
}

.link-content p {
    margin: 0 0 20px 0;
    color: #57534e;
    line-height: 1.5;
}

.btn-view-legal {
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.btn-view-legal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(124, 58, 237, 0.3);
}

/* SUMMARY SECTION */
.summary-section {
    background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 100%);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 25px;
    color: white;
}

.summary-section h4 {
    color: #c7d2fe;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
}

.summary-card {
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border-left: 4px solid #818cf8;
}

.summary-card p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.signature {
    text-align: right;
    font-style: italic;
    color: #c7d2fe;
    font-weight: 600;
    font-size: 1rem;
}

/* FOOTER */
.dashboard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 25px;
    border-top: 2px solid #e2e8f0;
    margin-top: 20px;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.footer-info small {
    color: #64748b;
    font-size: 0.85rem;
}

.btn-close {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.btn-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.3);
}
/* Utilities */
.hidden {
    display: none !important;
}

.success {
    color: var(--success);
    background: rgba(79, 200, 128, 0.1);
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid rgba(79, 200, 128, 0.2);
}

.error {
    color: var(--error);
    background: rgba(244, 67, 54, 0.1);
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid rgba(244, 67, 54, 0.2);
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(76, 201, 240, 0.3);
    border-radius: 50%;
    border-top-color: var(--eu-light-blue);
    animation: spin 1s ease-in-out infinite;
}

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

/* Animazioni stelle logo */
@keyframes twinkle {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .wallet-section {
        align-items: center;
    }
    
    .logo-text h1 {
        font-size: 2rem;
    }
    
   /* #chatContainer {
        width: 90% !important;
        right: 5% !important;
        bottom: 10px !important;
        height: 70vh !important;
        max-height: 70vh !important;
    }
    
    .chat-header, .chat-footer {
        padding: 10px;
    }
    
    .chat-messages {
        padding: 10px;
    }*/
}

/* === NUOVO STILE POPUP AGGIORNATO === */
.popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.popup-container:not(.hidden) {
    opacity: 1;
    pointer-events: all;
}

.popup-content {
    background: var(--bg-gradient);
    border-radius: 24px;
    padding: 30px;
    text-align: center;
    border: 1px solid rgba(76, 201, 240, 0.4);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    max-width: 90%;
    width: 380px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.popup-container:not(.hidden) .popup-content {
    transform: translateY(0);
}

/* Logo nel popup (ridimensionato) */
.popup-logo {
    margin-bottom: 20px;
}

.popup-logo .logo-text {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #e8e8e8 0%, #ffffff 25%, #c0c0c0 50%, #ffffff 75%, #e8e8e8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255,255,255,0.3);
    animation: shine 3s ease-in-out infinite;
    font-family: 'Orbitron', sans-serif;
}

.popup-logo .fire-container {
    width: 150px;
    height: 90px;
    margin: 0 auto;
    position: relative;
}

/* ==================== ANIMAZIONE FIAMME ==================== */
.flame {
    position: absolute;
    bottom: 0;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flicker 1.5s ease-in-out infinite alternate;
}

.flame-1 {
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 70px;
    background: linear-gradient(to top, #ff4500 0%, #ff6b00 30%, #ff8c00 60%, #ffa500 100%);
    animation-delay: 0s;
}

.flame-2 {
    left: 35%;
    transform: translateX(-50%);
    width: 35px;
    height: 50px;
    background: linear-gradient(to top, #ff6b00 0%, #ff8c00 40%, #ffa500 80%, #ffff00 100%);
    animation-delay: 0.3s;
}

.flame-3 {
    left: 65%;
    transform: translateX(-50%);
    width: 30px;
    height: 40px;
    background: linear-gradient(to top, #ff8c00 0%, #ffa500 50%, #ffff00 100%);
    animation-delay: 0.6s;
}

.flame-core {
    position: absolute;
    left: 50%;
    bottom: 5px;
    transform: translateX(-50%);
    width: 25px;
    height: 35px;
    background: linear-gradient(to top, #ffff00 0%, #ffffff 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: coreFlicker 1s ease-in-out infinite alternate;
}

.ember {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #ff6b00;
    border-radius: 50%;
    animation: float 3s linear infinite;
}

.ember-1 {
    left: 20%;
    bottom: 60px;
    animation-delay: 0s;
}

.ember-2 {
    left: 80%;
    bottom: 40px;
    animation-delay: 1s;
}

.ember-3 {
    left: 60%;
    bottom: 70px;
    animation-delay: 2s;
}

/* ==================== KEYFRAMES ==================== */
@keyframes shine {
    0%, 100% { background-position: 0% 50%; filter: brightness(1); }
    50% { background-position: 100% 50%; filter: brightness(1.2); }
}

@keyframes sparkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

@keyframes flicker {
    0% { transform: translateX(-50%) scale(1) rotate(-1deg); filter: brightness(1); }
    100% { transform: translateX(-50%) scale(1.05) rotate(1deg); filter: brightness(1.1); }
}

@keyframes coreFlicker {
    0% { transform: translateX(-50%) scale(1); opacity: 0.8; }
    100% { transform: translateX(-50%) scale(1.1); opacity: 1; }
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}
.token-selection-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 15px 0;
}

.token-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e53e3e;
    background: transparent;
    color: #e53e3e;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.token-btn:hover {
    background: #e53e3e;
    color: white;
    transform: scale(1.05);
}

.token-btn.selected {
    background: #e53e3e;
    color: white;
    border-color: #c53030;
}
/* ==================== NUOVI STILI PARTE SINISTRA ==================== */

/* Chat history */
.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 15px 20px;
    border-top: 1px solid rgba(76, 201, 240, 0.1);
    border-bottom: 1px solid rgba(76, 201, 240, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.history-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.history-header i {
    color: #4cc9f0;
}

/* Messaggi utente */
.user-message {
    background: rgba(76, 201, 240, 0.1);
    border: 1px solid rgba(76, 201, 240, 0.2);
    border-radius: 12px 12px 12px 4px;
    padding: 12px 15px;
    margin-bottom: 10px;
    color: white;
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
    animation: slideInLeft 0.3s ease;
}

.user-message::before {
    content: 'Tu';
    position: absolute;
    top: -8px;
    left: 8px;
    background: #4cc9f0;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.user-message:hover::before {
    opacity: 1;
}

/* Input area */
.chat-input-area {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
}

.input-hint {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
}

.hint-mode {
    color: #4cc9f0;
    font-weight: 600;
}

/* Selettore migliorato */
.chat-mode-toggle select {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #4cc9f0;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s;
}

.chat-mode-toggle select:hover {
    background: rgba(76, 201, 240, 0.1);
    border-color: #3a0ca3;
}

.chat-mode-toggle select option {
    background: #1a1a2e;
    color: white;
    padding: 10px;
}

/* Animazioni */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==================== UTILITY AGGIUNTIVE ==================== */
.thinking-glow {
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(76, 201, 240, 0.5)); }
    50% { filter: drop-shadow(0 0 25px rgba(76, 201, 240, 0.9)); }
}
/* ==================== AREA RISPOSTE CHAT (SOVRAPPOSTA) ==================== */
/* ==================== AREA RISPOSTE CHAT ==================== */
/* ==================== AREA RISPOSTE CHAT ==================== */
/* ==================== AREA RISPOSTE CHAT ==================== */
/* ==================== AREA RISPOSTE CHAT ==================== */
.chat-response-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    z-index: 200;
    pointer-events: none;
    padding-left: 0;
}

.response-container {
    width: 40%;
    max-width: 450px;
    max-height: 70%;
    background: rgba(20, 20, 30, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(76, 201, 240, 0.4);
    border-radius: 16px;
    padding: 20px 25px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    pointer-events: auto;
    border-left: 4px solid #4cc9f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-left: 20px;
    transform: translateX(-30px);  /* Da -60px a -30px (2 caratteri a destra) */
}
/* Mantieni tutto il resto invariato */
.response-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(76, 201, 240, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;  /* Non si restringe */
}

.response-aster {
    color: #4cc9f0;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.response-aster i {
    margin-right: 5px;
    color: #ffaa00;
}

.response-text {
    color: white;
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;  /* SOLO QUI lo scroll */
    padding-right: 8px;
    max-height: 350px;
    flex: 1;  /* Occupa lo spazio rimanente */
}

/* Scrollbar personalizzata per il testo */
.response-text::-webkit-scrollbar {
    width: 5px;
}

.response-text::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

.response-text::-webkit-scrollbar-thumb {
    background: #4cc9f0;
    border-radius: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .response-container {
        width: 85%;
        max-height: 60%;
    }
}
/* ==================== LAYOUT DEFINITIVO CHAT RESPONDING ==================== */

/* Sfondo nero per il workspace quando in responding */
.aster-main-workspace.responding-mode {
    background: #000000 !important;
    position: relative;
    width: 100%;
    height: 100%;
}

/* Stile bolla cristallo */
.responding-mode .response-container {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4) !important;
    border-left: 4px solid #4cc9f0 !important;
    width: 350px !important;
    max-width: 350px !important;
    min-height: 450px !important;
    max-height: 550px !important;
    padding: 25px !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    position: relative !important;
    left: 15px !important;
}

/* Nascondi bolla piccola in responding */
.responding-mode #aster-status-bubble {
    display: none !important;
}

/* Pulisci effetti indesiderati */
.responding-mode #chat-response-area {
    background: transparent !important;
    backdrop-filter: none !important;
}

.responding-mode #aster-room-layer {
    background: transparent !important;
    backdrop-filter: none !important;
}

.responding-mode .library-background-layer {
    background: #000000 !important;
    background-color: #000000 !important;
}
/* ==================== SFONDO NERO PERMANENTE ==================== */

/* Sfondo nero per il workspace in TUTTI gli stati */
.aster-main-workspace {
    background: #000000 !important;
    position: relative;
    width: 100%;
    height: 100%;
}

/* Stile bolla cristallo SOLO per responding */
/*
.aster-main-workspace.chat-responding .response-container {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4) !important;
    border-left: 4px solid #4cc9f0 !important;
    width: 350px !important;
    max-width: 350px !important;
    min-height: 450px !important;
    max-height: 550px !important;
    padding: 25px !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    position: relative !important;
    left: 15px !important;
}
*/
/* Stile bolla cristallo SOLO per responding - MENO TRASPARENTE */
.aster-main-workspace.chat-responding .response-container {
    background: rgba(30, 30, 40, 0.85) !important;  /* Più scuro e meno trasparente */
    backdrop-filter: blur(8px) !important;         /* Meno blur */
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important; /* Bordo più visibile */
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6) !important; /* Ombra più scura */
    border-left: 4px solid #ff9800 !important;     /* Bordo arancione per warning */
    width: 350px !important;
    max-width: 350px !important;
    min-height: 450px !important;
    max-height: 550px !important;
    padding: 25px !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    position: relative !important;
    left: 15px !important;
}
/* Nascondi bolla piccola in responding */
.aster-main-workspace.chat-responding #aster-status-bubble {
    display: none !important;
}

/* Pulisci effetti indesiderati in responding */
.aster-main-workspace.chat-responding #chat-response-area {
    background: transparent !important;
    backdrop-filter: none !important;
}

.aster-main-workspace.chat-responding #aster-room-layer {
    background: transparent !important;
    backdrop-filter: none !important;
}

.aster-main-workspace.chat-responding .library-background-layer {
    background: #000000 !important;
    background-color: #000000 !important;
}

/* ==================== ASTER HEADER LAYOUT (POSIZIONAMENTO CORRETTO) ==================== */

/* Contenitore principale nav (questo LO TINI) */
.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* Il pulsante chat diventa il riferimento */
.aster-chat-container {
    position: relative;  /* Crea un contesto per il posizionamento assoluto */
    margin-top: 30px;
    margin-left: 20px;
    z-index: 10;
}

/* Aster si posiziona rispetto al pulsante */
.aster-icon-container {
    position: absolute;
    bottom: 20%;
    left: 320px;
    transform: none;
    z-index: 20;
    width: 200px;  /* 🔥 Aumenta la larghezza del contenitore */
    height: 200px; /* 🔥 Aumenta l'altezza del contenitore */
    display: flex;
    align-items: center;
    justify-content: center;
}
.aster-icon-large {
    width: 100%;  /* 🔥 100% del contenitore */
    height: 100%; /* 🔥 100% del contenitore */
    max-width: 180px; /* 🔥 Limite massimo se vuoi */
    max-height: 180px;
    object-fit: contain;
}

.aster-icon-large:hover {
    transform: scale(1.1);
}

.aster-chat-container .nav-button {
    min-width: 160px;
    padding: 0.7rem 1rem;
    background: rgba(76, 201, 240, 0.15);
    border: 1px solid rgba(76, 201, 240, 0.2);
    border-radius: 30px;
}

/* Pulsazione gialla */
.chat-pulse span {
    animation: yellowPulse 1.5s infinite;
    font-weight: 700;
}

@keyframes yellowPulse {
    0%, 100% { 
        color: #4cc9f0;
    }
    50% { 
        color: #FFD700;
        text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    }
}

/* Wallet section */
.wallet-section {
    margin-left: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .aster-icon-large {
        width: 70px;
        height: 70px;
    }
    
    .aster-chat-container .nav-button {
        min-width: 130px;
        padding: 0.5rem 0.8rem;
    }
}
/* Mostra il wrapper quando il popup di voto è attivo */
.aster-layout-wrapper.vote-popup-visible {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Assicura che il popup sia sopra tutto */
.aster-layout-wrapper.vote-popup-visible #chat-response-area {
    position: fixed !important;
    z-index: 999999 !important;
    pointer-events: auto !important;
}