/* ===================================
   STRUMENTI GRATUITI - STILI AVANZATI
   =================================== */

/* --- CERCHIO CICLOMETRICO --- */
.cerchio-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.cerchio-canvas-wrapper {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

#cerchioCanvas {
    background: white;
    border-radius: 15px;
    cursor: crosshair;
    touch-action: none;
}

.cerchio-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.cerchio-info {
    background: rgba(255,255,255,0.95);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.numero-selezionato {
    font-size: 3rem;
    font-weight: 800;
    color: #667eea;
    margin: 0;
    line-height: 1;
}

.distanze-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.distanze-list li {
    padding: 0.5rem;
    background: #f8f9fa;
    margin: 0.5rem 0;
    border-radius: 8px;
    font-weight: 600;
}

.export-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* --- CALCOLATORE VINCITE --- */
.calcolatore-vincite {
    max-width: 1000px;
    margin: 0 auto;
}

.numeri-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.5rem;
    margin: 1rem 0;
}

.numero-btn {
    aspect-ratio: 1;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.numero-btn:hover {
    transform: scale(1.1);
    border-color: #F59E0B;
}

.numero-btn.selected {
    background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
    color: white;
    border-color: #F59E0B;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.ruote-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.ruota-checkbox {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ruota-checkbox:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.ruota-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    cursor: pointer;
}

.risultati-vincite {
    margin-top: 2rem;
}

.vincite-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.vincite-table th {
    background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 700;
}

.vincite-table td {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.vincite-table tr:last-child td {
    border-bottom: none;
}

.vincita-lordo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #059669;
}

.vincita-netto {
    font-size: 1.2rem;
    color: #10B981;
}

/* --- OROSCOPO LOTTO --- */
.oroscopo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.segno-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.segno-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.segno-card:hover::before {
    transform: scaleX(1);
}

.segno-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.3);
}

.segno-card.fuoco::before {
    background: linear-gradient(90deg, #EF4444 0%, #F59E0B 100%);
}

.segno-card.terra::before {
    background: linear-gradient(90deg, #10B981 0%, #34D399 100%);
}

.segno-card.aria::before {
    background: linear-gradient(90deg, #3B82F6 0%, #60A5FA 100%);
}

.segno-card.acqua::before {
    background: linear-gradient(90deg, #8B5CF6 0%, #A78BFA 100%);
}

.segno-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.segno-nome {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1E3A8A;
    margin-bottom: 0.5rem;
}

.segno-periodo {
    color: #6B7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.numeri-fortunati {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.numero-fortunato {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.ruota-fortunata {
    background: #FEF3C7;
    padding: 0.75rem;
    border-radius: 10px;
    margin: 1rem 0;
}

.fortuna-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.fortuna-fill {
    height: 100%;
    background: linear-gradient(90deg, #10B981 0%, #34D399 100%);
    transition: width 1s ease;
    border-radius: 10px;
}

/* --- SMORFIA NAPOLETANA --- */
.smorfia-container {
    max-width: 1200px;
    margin: 0 auto;
}

.smorfia-search {
    margin: 2rem 0;
}

.search-input {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.2rem;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.categorie-filter {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.categoria-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.categoria-btn:hover,
.categoria-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
}

.smorfia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.smorfia-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.smorfia-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.smorfia-numero {
    font-size: 2.5rem;
    font-weight: 800;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.smorfia-significato {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1E3A8A;
}

.smorfia-categoria {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: #FEF3C7;
    color: #92400E;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* --- SISTEMI RIDOTTI --- */
.sistemi-container {
    max-width: 1000px;
    margin: 0 auto;
}

.sistema-input-group {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.garanzia-select {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.garanzia-option {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.garanzia-option:hover,
.garanzia-option.selected {
    border-color: #667eea;
    background: #EEF2FF;
    transform: translateY(-2px);
}

.colonne-ridotte {
    margin: 2rem 0;
}

.colonna-sistema {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    margin: 0.5rem 0;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.statistiche-riduzione {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-box {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-numero {
    font-size: 2.5rem;
    font-weight: 800;
    color: #667eea;
}

.stat-label {
    color: #6B7280;
    margin-top: 0.5rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .cerchio-canvas-wrapper {
        padding: 1rem;
    }
    
    .numeri-input-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    }
    
    .oroscopo-grid {
        grid-template-columns: 1fr;
    }
    
    .smorfia-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Animazioni */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-in {
    animation: slideIn 0.5s ease forwards;
}

/* Loading States */
.loading {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- MIGLIORIE GRATIS.PHP GIANNI --- */
.tool-help-box,
.enhanced-tool,
.lead-form-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,.06);
    margin: 1.5rem auto;
    max-width: 1100px;
}

.tool-help-box h3 { margin-top: 0; color: #1E3A8A; }
.tool-small-help { color: #4b5563; margin-top: .25rem; }

.tool-mode-bar {
    display: flex;
    gap: .75rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.mode-btn {
    border: 2px solid #dbeafe;
    background: #fff;
    border-radius: 999px;
    padding: .75rem 1rem;
    font-weight: 800;
    cursor: pointer;
}
.mode-btn.active {
    background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%);
    color: white;
    border-color: #1E3A8A;
}

.target-select {
    display: flex;
    gap: .5rem;
    align-items: center;
    font-weight: 700;
    color: #1f2937;
}
.target-select select {
    border: 2px solid #dbeafe;
    border-radius: 999px;
    padding: .65rem .85rem;
    font-weight: 700;
    background: white;
}

.cerchio-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 1.25rem;
    align-items: start;
}
.cerchio-panel { display: grid; gap: 1rem; }
.mini-note {
    background: #fff7ed;
    border-left: 5px solid #f97316;
    border-radius: 12px;
    padding: 1rem;
    color: #7c2d12;
}

#cerchioCanvas { width: 100%; height: auto; display: block; }

.oroscopo-testo-giorno {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    color: #4B5563;
    font-size: .9rem;
    line-height: 1.55;
}
.oroscopo-testo-giorno p { margin: .35rem 0; }
.oroscopo-testo-giorno small { color: #6B7280; }
.smorfia-match { display:block; margin-top:.5rem; color:#6B7280; }

.lead-form-card { max-width: 720px; }
.metodi-form { display: grid; gap: 1rem; }
.metodi-form label { color: #1f2937; font-weight: 800; }
.metodi-form .search-input { width: 100%; margin-top: .4rem; }
.privacy-check { display: flex; gap: .75rem; align-items: flex-start; font-weight: 600 !important; }
.privacy-check input { width: 20px; height: 20px; margin-top: .2rem; }
.form-alert { padding: 1rem; border-radius: 12px; margin-bottom: 1rem; font-weight: 800; }
.form-alert.ok { background: #dcfce7; color: #166534; }
.form-alert.ko { background: #fee2e2; color: #991b1b; }
.form-note { color: #f8fafc; opacity: .92; text-align: center; margin-top: 1rem; }
.hp-field { position:absolute; left:-9999px; opacity:0; height:0; overflow:hidden; }

@media (max-width: 900px) {
    .cerchio-layout { grid-template-columns: 1fr; }
    .cerchio-container { padding: .5rem; }
    .cerchio-canvas-wrapper { padding: .5rem; border-radius: 14px; }
    .cerchio-info, .mini-note { font-size: .95rem; }
}

@media (max-width: 520px) {
    .section-title { font-size: 1.8rem !important; }
    .tool-mode-bar { align-items: stretch; }
    .mode-btn, .target-select, .target-select select { width: 100%; justify-content: center; }
    .export-buttons .btn { flex: 1 1 100%; }
    .numeri-input-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .35rem; }
    .numero-btn { font-size: 1rem; min-height: 44px; }
    .vincite-table { display: block; overflow-x: auto; white-space: nowrap; }
}


/* --- Watermark ed esportazione strumenti --- */
.branded-tool, .export-box, .enhanced-tool { position: relative; }
.tool-watermark {
    position: absolute;
    inset: auto 0 50% 0;
    transform: translateY(50%) rotate(-18deg);
    text-align: center;
    font-size: clamp(1.8rem, 7vw, 5rem);
    font-weight: 900;
    color: rgba(30, 58, 138, .055);
    pointer-events: none;
    z-index: 0;
    white-space: nowrap;
}
.export-box > *:not(.tool-watermark), .enhanced-tool > *:not(.tool-watermark) { position: relative; z-index: 1; }
.tool-export-row { justify-content: center; margin-top: 1.5rem; display:flex; gap:.75rem; flex-wrap:wrap; }
.ls-export-watermark {
    position:absolute; left:50%; top:50%; transform:translate(-50%,-50%) rotate(-22deg);
    font-size:52px; font-weight:900; color:rgba(30,58,138,.08); pointer-events:none; z-index:9999; white-space:nowrap;
}
.exit-offer, .conversion-banner {background:linear-gradient(135deg,#fff7ed,#fef3c7); border:1px solid #fed7aa; border-radius:18px; padding:1.25rem; margin:1.5rem 0; box-shadow:0 10px 25px rgba(245,158,11,.12)}
.exit-offer strong{color:#9a3412}.product-kicker{font-weight:800;color:#1e3a8a;text-transform:uppercase;font-size:.85rem;letter-spacing:.04em}.direct-pdf-box{background:#eff6ff;border:1px solid #bfdbfe;border-radius:16px;padding:1rem;margin-top:1rem}.locked-teaser{filter:blur(.2px);opacity:.86}.private-steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem;margin:2rem 0}.private-step{background:white;border-radius:16px;padding:1.2rem;box-shadow:0 8px 22px rgba(0,0,0,.08)}
@media print { .tool-watermark::after { content:'www.giannidamore.it'; position:fixed; left:50%; top:50%; transform:translate(-50%,-50%) rotate(-22deg); font-size:48px; color:rgba(30,58,138,.08); font-weight:900; } .export-buttons,.whatsapp-float,.cookie-banner,.header,.footer{display:none!important} }

/* === REVISIONE v4 export oroscopo: dati sempre visibili in PNG/PDF === */
.export-rendering .segno-card,
.export-rendering .animate-slide-in{
    animation:none!important;
    opacity:1!important;
    transform:none!important;
}
.export-rendering .segno-card:hover{transform:none!important;}
.export-rendering .export-buttons{display:none!important;}
.export-rendering .oroscopo-grid{grid-template-columns:repeat(2,minmax(250px,1fr));gap:1rem;}
.export-rendering .segno-card{padding:1.2rem;break-inside:avoid;page-break-inside:avoid;}
.export-rendering .oroscopo-testo-giorno{display:block!important;overflow:visible!important;}
@media(max-width:640px){
  .oroscopo-grid{grid-template-columns:1fr;gap:1rem;}
  .segno-card{padding:1.2rem;}
}
