/* Fantacalcio Manager - Frontend CSS */

.fcm-shortcode-wrap {
    margin: 20px 0;
    padding: 0;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 80vh;
    font-family: 'Arial', sans-serif;
    border-radius: 15px;
    overflow: hidden;
}

.fcm-shortcode-wrap * {
    box-sizing: border-box;
}

.fcm-shortcode-wrap .container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.fcm-shortcode-wrap .header {
    background: linear-gradient(135deg, #00c851 0%, #00a843 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.fcm-shortcode-wrap .header::before {
    content: '⚽';
    position: absolute;
    font-size: 100px;
    opacity: 0.1;
    top: -20px;
    right: -20px;
    animation: fcm-rotate 20s linear infinite;
}

.fcm-shortcode-wrap .header h1 {
    font-size: 2.5em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    color: white !important;
    margin-top: 0;
}

.fcm-shortcode-wrap .header p {
    font-size: 1.2em;
    opacity: 0.9;
    margin: 0;
}

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

/* Stili per la sezione filtro squadre */
.fcm-shortcode-wrap .squadre-filter-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px 30px;
    border-bottom: 2px solid #dee2e6;
}

.fcm-shortcode-wrap .squadre-filter-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #2a5298;
    margin-bottom: 15px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fcm-shortcode-wrap .squadre-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.fcm-shortcode-wrap .squadra-link {
    display: inline-block;
    padding: 8px 16px;
    color: #2a5298;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95em;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid transparent;
    text-underline-offset: 3px;
}

.fcm-shortcode-wrap .squadra-link:hover {
    background: rgba(0, 200, 81, 0.1);
    border-color: #00c851;
    color: #00a843;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 200, 81, 0.2);
}

.fcm-shortcode-wrap .squadra-link.active {
    background: linear-gradient(135deg, #00c851 0%, #00a843 100%);
    color: white;
    text-decoration: none;
    border-color: #00a843;
    box-shadow: 0 4px 15px rgba(0, 200, 81, 0.3);
}

.fcm-shortcode-wrap .squadra-link.active:hover {
    background: linear-gradient(135deg, #00a843 0%, #007e33 100%);
    transform: translateY(-1px);
}

.fcm-shortcode-wrap .sections-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
}

.fcm-shortcode-wrap .section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.fcm-shortcode-wrap .section:hover {
    border-color: #00c851;
    transform: translateY(-5px);
}

.fcm-shortcode-wrap .section-title {
    font-size: 1.4em;
    font-weight: bold;
    color: #2a5298;
    margin-bottom: 20px;
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border-left: 5px solid #00c851;
}

.fcm-shortcode-wrap .form-group {
    margin-bottom: 20px;
}

.fcm-shortcode-wrap .form-label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #495057;
    font-size: 0.95em;
}

.fcm-shortcode-wrap .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3436;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: none;
    line-height: 1.4;
}

.fcm-shortcode-wrap .form-control:focus {
    outline: none;
    border-color: #00c851;
    box-shadow: 0 0 0 3px rgba(0, 200, 81, 0.1);
    background: #fff;
}

.fcm-shortcode-wrap .input-group {
    display: flex;
    gap: 10px;
    align-items: end;
}

.fcm-shortcode-wrap .input-group .form-control {
    flex: 1;
}

.fcm-shortcode-wrap .btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    color: white;
}

.fcm-shortcode-wrap .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.fcm-shortcode-wrap .btn-primary {
    background: linear-gradient(135deg, #00c851 0%, #00a843 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 200, 81, 0.3);
}

.fcm-shortcode-wrap .btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 200, 81, 0.4);
    color: white;
}

.fcm-shortcode-wrap .btn-secondary {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(42, 82, 152, 0.3);
}

.fcm-shortcode-wrap .btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 82, 152, 0.4);
    color: white;
}

.fcm-shortcode-wrap .btn-calculate {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    white-space: nowrap;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
}

.fcm-shortcode-wrap .btn-calculate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    color: white;
}

.fcm-shortcode-wrap .readonly-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #2a5298;
}

.fcm-shortcode-wrap .readonly-info h4 {
    color: #2a5298;
    margin-bottom: 10px;
    margin-top: 0;
}

.fcm-shortcode-wrap .info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 10px;
}

.fcm-shortcode-wrap .info-item {
    background: white;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.fcm-shortcode-wrap .info-label {
    font-size: 0.8em;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fcm-shortcode-wrap .info-value {
    font-weight: bold;
    color: #495057;
    margin-top: 4px;
}

.fcm-shortcode-wrap .result-display {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.fcm-shortcode-wrap .football-icon {
    display: inline-block;
    margin-right: 8px;
    font-size: 1.2em;
}

.fcm-shortcode-wrap .success-message {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-top: 15px;
    font-weight: bold;
    display: none;
    animation: fcm-slideIn 0.3s ease;
}

.fcm-shortcode-wrap .error-message {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-top: 15px;
    font-weight: bold;
    display: none;
    animation: fcm-slideIn 0.3s ease;
}

@keyframes fcm-slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading spinner */
.fcm-shortcode-wrap .loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: fcm-spin 1s ease-in-out infinite;
    margin-right: 8px;
}

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

/* Media queries per responsive */
@media (max-width: 768px) {
    .fcm-shortcode-wrap .squadre-links-container {
        gap: 8px;
    }
    
    .fcm-shortcode-wrap .squadra-link {
        padding: 6px 12px;
        font-size: 0.85em;
    }
    
    .fcm-shortcode-wrap .sections-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .fcm-shortcode-wrap .header h1 {
        font-size: 2em;
    }
    
    .fcm-shortcode-wrap .input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .fcm-shortcode-wrap .info-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .fcm-shortcode-wrap .section {
        padding: 20px;
    }
    
    .fcm-shortcode-wrap .btn-calculate {
        padding: 8px 12px;
        font-size: 12px;
        margin-top: 10px;
    }
    
    .fcm-shortcode-wrap .form-control {
        font-size: 16px; /* Previene zoom su iOS */
    }
    
    .fcm-shortcode-wrap .squadre-filter-section {
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .fcm-shortcode-wrap .header {
        padding: 20px;
    }
    
    .fcm-shortcode-wrap .header h1 {
        font-size: 1.5em;
    }
    
    .fcm-shortcode-wrap .header p {
        font-size: 1em;
    }
    
    .fcm-shortcode-wrap .section-title {
        font-size: 1.2em;
        padding: 12px;
    }
    
    .fcm-shortcode-wrap .btn {
        padding: 10px 15px;
        font-size: 0.9em;
    }
    
    .fcm-shortcode-wrap .squadre-filter-title {
        font-size: 1.1em;
        margin-bottom: 12px;
    }
    
    .fcm-shortcode-wrap .squadre-links-container {
        gap: 6px;
    }
    
    .fcm-shortcode-wrap .squadra-link {
        padding: 5px 10px;
        font-size: 0.8em;
    }
}

/* Animazioni aggiuntive */
.fcm-shortcode-wrap .section {
    animation: fcm-fadeInUp 0.6s ease;
}

.fcm-shortcode-wrap .section:nth-child(1) {
    animation-delay: 0.1s;
}

.fcm-shortcode-wrap .section:nth-child(2) {
    animation-delay: 0.2s;
}

.fcm-shortcode-wrap .squadre-filter-section {
    animation: fcm-fadeInDown 0.6s ease;
}

@keyframes fcm-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fcm-fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stili per gli stati di validazione */
.fcm-shortcode-wrap .form-control.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.fcm-shortcode-wrap .form-control.success {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* Stili per la selezione personalizzata */
.fcm-shortcode-wrap select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    padding-right: 40px;
    appearance: none;
    font-size: 14px;
    font-weight: 600;
    color: #2d3436;
    min-height: 45px;
}

.fcm-shortcode-wrap select.form-control option {
    font-size: 14px;
    font-weight: 600;
    color: #2d3436;
    background: #fff;
    padding: 8px 12px;
}

/* Stili per focus accessibili */
.fcm-shortcode-wrap .form-control:focus,
.fcm-shortcode-wrap .btn:focus {
    outline: 2px solid #00c851;
    outline-offset: 2px;
}