/* Ricapitalizzazione Plugin Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.ricapitalizzazione-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 30px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.ricapitalizzazione-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    pointer-events: none;
}

/* Header */
.ricap-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.ricap-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.ricap-title {
    font-size: 3rem;
    color: #ffffff;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
}

.ricap-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Tabella */
.ricap-table-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
}

.ricap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

.ricap-table thead th {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    border: none;
    position: relative;
}

.ricap-table thead th:first-child {
    border-top-left-radius: 10px;
    text-align: center;
}

.ricap-table thead th:last-child {
    border-top-right-radius: 10px;
}

.ricap-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.ricap-table tbody tr:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ricap-table tbody tr:last-child {
    border-bottom: none;
}

.ricap-table tbody tr.no-ricap {
    background: rgba(231, 76, 60, 0.05);
}

.ricap-table tbody tr.no-ricap:hover {
    background: rgba(231, 76, 60, 0.1);
}

.ricap-table td {
    padding: 18px 15px;
    border: none;
    vertical-align: middle;
}

.pos-cell {
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #2c3e50;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 50px;
    width: 50px;
    height: 50px;
    line-height: 14px;
    display: table-cell;
    vertical-align: middle;
}

.team-cell {
    font-weight: 600;
    color: #2c3e50;
}

.team-name {
    position: relative;
    padding-left: 25px;
}

.team-name::before {
    content: "⚽";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-size: 1.2rem;
}

.currency-cell {
    font-weight: 600;
    color: #27ae60;
    text-align: right;
    font-family: 'Courier New', monospace;
}

.percent-cell {
    text-align: center;
    font-weight: 700;
    color: #8e44ad;
    font-size: 1.1rem;
}

.ricap-cell {
    font-weight: 700;
    text-align: right;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
}

.ricap-cell.positive {
    color: #27ae60;
    position: relative;
}

.ricap-cell.positive::before {
    content: "💰";
    position: absolute;
    left: 10px;
    font-size: 1.2rem;
}

.ricap-cell.negative {
    color: #e74c3c;
    position: relative;
}

.ricap-cell.negative::before {
    content: "❌";
    position: absolute;
    left: 10px;
    font-size: 1.2rem;
}

/* Sezioni Results e Notes */
.results-section,
.notes-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
}

.section-icon {
    font-size: 2rem;
    margin-right: 15px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    font-weight: 700;
    letter-spacing: 1px;
}

.results-content,
.notes-content {
    display: grid;
    gap: 15px;
}

.result-item,
.note-item {
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 1.05rem;
    line-height: 1.6;
    position: relative;
    padding-left: 50px;
}

.result-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-left: 4px solid #6c757d;
}

.result-item.positive-result {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-left-color: #28a745;
    color: #155724;
}

.result-item.positive-result::before {
    content: "✅";
    position: absolute;
    left: 15px;
    font-size: 1.3rem;
}

.result-item.negative-result {
    background: linear-gradient(135deg, #f8d7da, #f1b0b7);
    border-left-color: #dc3545;
    color: #721c24;
}

.result-item.negative-result::before {
    content: "⛔";
    position: absolute;
    left: 15px;
    font-size: 1.3rem;
}

.result-item:first-child {
    background: linear-gradient(135deg, #fff3cd, #fce4a3);
    border-left-color: #ffc107;
    color: #856404;
}

.result-item:first-child::before {
    content: "👑";
    position: absolute;
    left: 15px;
    font-size: 1.3rem;
}

.note-item {
    background: linear-gradient(135deg, #cce5ff, #b3d9ff);
    border-left: 4px solid #007bff;
    color: #004085;
}

.note-item::before {
    content: "ℹ️";
    position: absolute;
    left: 15px;
    font-size: 1.3rem;
}

.note-item.important {
    background: linear-gradient(135deg, #ffe6e6, #ffcccc);
    border-left-color: #dc3545;
    color: #721c24;
}

.note-item.important::before {
    content: "⚠️";
}

.note-item.highlight {
    background: linear-gradient(135deg, #fff3cd, #fce4a3);
    border-left-color: #ffc107;
    color: #856404;
}

.note-item.highlight::before {
    content: "🏆";
}

/* Errore */
.ricap-error {
    background: linear-gradient(135deg, #f8d7da, #f1b0b7);
    color: #721c24;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    border: 2px solid #dc3545;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .ricapitalizzazione-container {
        margin: 10px;
        padding: 20px;
    }
    
    .ricap-title {
        font-size: 2.5rem;
    }
    
    .ricap-table-container {
        padding: 20px;
        overflow-x: auto;
    }
}

@media (max-width: 768px) {
    .ricapitalizzazione-container {
        margin: 5px;
        padding: 15px;
        border-radius: 15px;
    }
    
    .ricap-title {
        font-size: 2rem;
    }
    
    .ricap-subtitle {
        font-size: 1rem;
    }
    
    .ricap-table {
        font-size: 0.85rem;
    }
    
    .ricap-table td,
    .ricap-table th {
        padding: 12px 8px;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .result-item,
    .note-item {
        font-size: 0.95rem;
        padding: 12px 15px;
        padding-left: 45px;
    }
}

@media (max-width: 480px) {
    .ricap-icon {
        font-size: 3rem;
    }
    
    .ricap-title {
        font-size: 1.8rem;
    }
    
    .ricap-table {
        font-size: 0.8rem;
    }
    
    .pos-cell {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .team-name::before {
        font-size: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .section-icon {
        margin-right: 0;
        margin-bottom: 5px;
    }
}

/* Animazioni */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ricap-table-container,
.results-section,
.notes-section {
    animation: slideInUp 0.6s ease-out;
}

.results-section {
    animation-delay: 0.2s;
}

.notes-section {
    animation-delay: 0.4s;
}

/* Scrollbar personalizzata */
.ricap-table-container::-webkit-scrollbar {
    height: 8px;
}

.ricap-table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.ricap-table-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

.ricap-table-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}

/* Print styles */
@media print {
    .ricapitalizzazione-container {
        background: white;
        box-shadow: none;
        border-radius: 0;
    }
    
    .ricap-title,
    .section-header h2 {
        color: black !important;
    }
    
    .results-section,
    .notes-section,
    .ricap-table-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}