/* ===================================
   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); }
}
