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

@keyframes barSlide {
    0% { left: -40%; }
    100% { left: 100%; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDetails {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes floatBackground {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(-20px, 15px) scale(1.05);
    }
    50% {
        transform: translate(15px, -20px) scale(0.95);
    }
    75% {
        transform: translate(-15px, -15px) scale(1.02);
    }
}

@keyframes modern-dot-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}

@keyframes pulseBackground {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
}

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

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* === BASE & BODY === */
body {
    background-color: #0d1117;
    color: #e5e7eb;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    margin: 0;
    padding-top: constant(safe-area-inset-top); /* legacy iOS 11 */
    padding-top: env(safe-area-inset-top);      /* iOS 12+ */
    padding-bottom: 80px; /* Spazio per la taskbar in basso */
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
    z-index: -999;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.3) 0%, transparent 40%);
    filter: blur(40px);
    animation: pulseBackground 15s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}

/* === CARD (Modern Glass Design) === */
.card {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow:
        0 4px 10px rgba(0,0,0,0.25),
        inset 0 1px 1px rgba(255,255,255,0.08);
    transform: translateY(0);
    transition: 
        transform .25s ease,
        box-shadow .25s ease,
        background .25s ease;
    margin-bottom: 16px;
}

.card:hover {
    transform: translateY(-5px) scale(1.01);
    background: rgba(255, 255, 255, 0.10);
    box-shadow:
        0 8px 26px rgba(0,0,0,0.35),
        inset 0 1px 2px rgba(255,255,255,0.10);
}

.card h2,
.card h3 {
    font-weight: 700;
    letter-spacing: 0.4px;
    background: linear-gradient(90deg,#60a5fa,#a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card > *:not(:last-child) {
    margin-bottom: 14px;
}

/* === SPLASH SCREEN === */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.splash-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.splash-logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: logo-bounce 2s ease-in-out infinite;
}

.splash-logo-text {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);
    animation: text-shimmer 3s ease-in-out infinite;
}

@keyframes logo-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes text-shimmer {
    0% { text-shadow: 0 4px 8px rgba(0, 0, 0, 0.35); }
    50% { text-shadow: 0 4px 20px rgba(59, 130, 246, 0.7); }
    100% { text-shadow: 0 4px 8px rgba(0, 0, 0, 0.35); }
}

.splash-subtitle {
    font-size: 1.1rem;
    color: #cbd5e1;
    max-width: 300px;
    line-height: 1.4;
}

.splash-version {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-top: 10px;
}

.bar-loader {
    width: 120px;
    height: 4px;
    background: rgba(59, 130, 246, 0.3);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    display: inline-block;
    margin-right: 10px;
}

.bar-loader::before {
    content: '';
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: #3b82f6;
    animation: barSlide 1.5s ease-in-out infinite;
    border-radius: 2px;
}

/* === HEADER === */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #0d1117 !important;
    backdrop-filter: none !important;
    z-index: 998;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 20px 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1) !important;
    will-change: transform, padding;
    border-radius: 0 !important;
    border-bottom-left-radius: 20px !important;
    border-bottom-right-radius: 20px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

.main-header.scrolled {
    padding: 4px 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: none !important;
    background: #0d1117 !important;
    transform: translateZ(0);
}

.header-content {
    position: relative;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.main-header.scrolled .header-content {
    min-height: 45px;
    padding: 0;
}

.header-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.logo {
    height: 50px;
    width: 50px;
    border-radius: 12px;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
}

.logo:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.main-header.scrolled .header-title-container {
    gap: 10px;
}

.main-header.scrolled .logo {
    height: 35px;
    width: 35px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header-content h1 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    font-size: 2.7rem;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.3px;
    line-height: 1.1;
    text-transform: none;
    font-style: normal;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "kern" 1;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: font-size, margin;
}

.main-header.scrolled .header-content h1 {
    font-size: 1.3rem !important;
    letter-spacing: -0.2px;
    margin-bottom: 0;
}

.header-content p {
    color: #9ca3af;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 1;
    transform: translateY(0);
    height: auto;
    margin-top: 0.5rem;
}

.main-header.scrolled .header-content p {
    opacity: 0;
    transform: translateY(-10px);
    height: 0;
    margin: 0;
}

.version-label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    background: rgba(31, 41, 55, 0.8);
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
    z-index: 10;
}

.main-header.scrolled .version-label {
    opacity: 1;
    visibility: visible;
}

.theme-toggle-container {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.theme-toggle {
    background: rgba(55, 65, 81, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.theme-toggle:hover {
    background: rgba(75, 85, 99, 0.8);
    transform: scale(1.1);
}

.theme-toggle::before {
  content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.theme-toggle:active::before {
    width: 100px;
    height: 100px;
}

.theme-icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

/* === MAIN CONTENT & SECTION GROUPS === */
.main-content {
    padding-top: 120px;
    transition: padding-top 0.3s ease;
    padding-bottom: 80px; /* Spazio per la taskbar in basso */
}

.main-header.scrolled ~ .main-content {
    padding-top: 70px !important;
}

.principali-section,
.tools-section {
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

.section-group-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    padding: 0.5rem 0;
    text-align: center;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-bottom: none;
    width: 100%;
    display: block;
}

/* === NAVIGAZIONE RAPIDA (MAIN MENU) === */
.menu-navigation-section {
    margin-top: 40px;
    animation: fadeInUp 0.8s ease-out;
}

#main-menu {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(12px);
}

#main-menu h2 {
    font-size: 1.4rem !important;
    margin-bottom: 14px !important;
}

.modern-navigation {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 8px 4px;
    position: relative;
    animation: slideInUp 0.6s ease-out;
}

.modern-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(55, 65, 81, 0.3), rgba(31, 41, 55, 0.4));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px 12px;
    text-decoration: none;
    color: #e5e7eb;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-align: center;
    min-width: 90px;
    flex: 1;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.modern-nav-item:nth-child(1) { animation-delay: 0.1s; }
.modern-nav-item:nth-child(2) { animation-delay: 0.15s; }
.modern-nav-item:nth-child(3) { animation-delay: 0.2s; }
.modern-nav-item:nth-child(4) { animation-delay: 0.25s; }
.modern-nav-item:nth-child(5) { animation-delay: 0.3s; }

.modern-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.modern-nav-item:hover::before {
    left: 100%;
}

.modern-nav-item:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.15));
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    color: #a78bfa;
}

.modern-nav-item:active {
    transform: translateY(-2px) scale(1.01);
    transition: all 0.1s ease;
}

.modern-nav-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    opacity: 0.85;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    background-color: currentColor;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.modern-nav-item:hover .modern-nav-icon {
    transform: scale(1.15);
    filter: drop-shadow(0 2px 4px rgba(139, 92, 246, 0.3));
}

.modern-nav-label {
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.modern-nav-indicator {
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 3px;
    border-radius: 10px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transform: translateX(-50%);
    transition: width .25s ease;
}

.modern-nav-item.active .modern-nav-indicator {
    width: 22px;
}

/* === NAV ICONS === */
.modern-nav-item[href="#analizza-scambi"] .modern-nav-icon {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4'/%3E%3C/svg%3E");
}
.modern-nav-item[href="#la-mia-squadra"] .modern-nav-icon {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z' /%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z' /%3E%3C/svg%3E");
}
.modern-nav-item[href="#vibes"] .modern-nav-icon {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9.75 3.104v5.714a2.25 2.25 0 0 1-.659 1.591L5 14.5M9.75 3.104c-.251.023-.501.05-.75.082m.75-.082a24.301 24.301 0 0 1 4.5 0m0 0v5.714c0 .597.237 1.17.659 1.591L19.8 15.3M14.25 3.104c.251.023.501.05.75.082M19.8 15.3l-1.57.393A9.065 9.065 0 0 1 12 15a9.065 9.065 0 0 0-6.23-.693L5 14.5m14.8.8 1.402 1.402c1.232 1.232.65 3.318-1.067 3.611A48.309 48.309 0 0 1 12 21c-2.773 0-5.491-.235-8.135-.687-1.718-.293-2.3-2.379-1.067-3.61L5 14.5' /%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9.75 3.104v5.714a2.25 2.25 0 0 1-.659 1.591L5 14.5M9.75 3.104c-.251.023-.501.05-.75.082m.75-.082a24.301 24.301 0 0 1 4.5 0m0 0v5.714c0 .597.237 1.17.659 1.591L19.8 15.3M14.25 3.104c.251.023.501.05.75.082M19.8 15.3l-1.57.393A9.065 9.065 0 0 1 12 15a9.065 9.065 0 0 0-6.23-.693L5 14.5m14.8.8 1.402 1.402c1.232 1.232.65 3.318-1.067 3.611A48.309 48.309 0 0 1 12 21c-2.773 0-5.491-.235-8.135-.687-1.718-.293-2.3-2.379-1.067-3.61L5 14.5' /%3E%3C/svg%3E");
}
.modern-nav-item[href="#specialisti-squadre"] .modern-nav-icon {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E");
}
.modern-nav-item[href="#osservati"] .modern-nav-icon {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}
.modern-nav-item[href="#scambi-consigliati"] .modern-nav-icon {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456zM16.894 20.567L16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456zM16.894 20.567L16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423z'/%3E%3C/svg%3E");
}
.modern-nav-item[href="#listone-giocatori"] .modern-nav-icon {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='8' y1='6' x2='21' y2='6'/%3E%3Cline x1='8' y1='12' x2='21' y2='12'/%3E%3Cline x1='8' y1='18' x2='21' y2='18'/%3E%3Cline x1='3' y1='6' x2='3.01' y2='6'/%3E%3Cline x1='3' y1='12' x2='3.01' y2='12'/%3E%3Cline x1='3' y1='18' x2='3.01' y2='18'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='8' y1='6' x2='21' y2='6'/%3E%3Cline x1='8' y1='12' x2='21' y2='12'/%3E%3Cline x1='8' y1='18' x2='21' y2='18'/%3E%3Cline x1='3' y1='6' x2='3.01' y2='6'/%3E%3Cline x1='3' y1='12' x2='3.01' y2='12'/%3E%3Cline x1='3' y1='18' x2='3.01' y2='18'/%3E%3C/svg%3E");
}

.modern-navigation::-webkit-scrollbar {
    height: 6px;
}
.modern-navigation::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.3);
    border-radius: 3px;
    margin: 0 4px;
}
.modern-navigation::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.6), rgba(139, 92, 246, 0.6));
    border-radius: 3px;
}
.modern-navigation::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.8), rgba(139, 92, 246, 0.8));
}

/* === SEZIONI APRI/CHIUDI (Modern) === */
.section-toggle {
    background: rgba(45,55,72,0.45);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    font-size: 1.05rem;
    padding: 14px 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.25s ease, transform 0.25s ease;
    width: 100%;
    text-align: left;
    outline: none;
    cursor: pointer;
    font-weight: 600;
    color: #e5e7eb;
}

.section-toggle:hover {
    background: rgba(59,130,246,0.28);
    transform: translateY(-2px);
}

.section-toggle-label {
    flex: 1;
    text-align: center;
    display: block;
    width: 100%;
}

.section-content {
    background: rgba(20,24,35,0.45);
    border-radius: 14px;
    padding: 1rem 1.2rem;
    margin-top: 10px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.05);
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    max-height: 5000px;
    opacity: 1;
    transform: translateY(0);
    will-change: max-height, opacity, padding;
}

.section-content.closed {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    transform: translateY(-5px);
    margin-top: 0;
}

/* === BOTTONI E INPUT === */
.btn-primary, .btn-success {
    transition: all 0.18s ease;
}
.btn-primary {
    background: linear-gradient(90deg, rgba(37,99,235,0.22) 0%, rgba(96,165,250,0.18) 100%);
    border: 1px solid rgba(96,165,250,0.18);
}
.btn-primary:hover {
    background: linear-gradient(90deg, rgba(37,99,235,0.32) 0%, rgba(96,165,250,0.22) 100%);
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 2px 8px rgba(37,99,235,0.10);
}
.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-success {
    background: linear-gradient(90deg, rgba(16,185,129,0.22) 0%, rgba(16,185,129,0.18) 100%);
    border: 1px solid rgba(16,185,129,0.18);
}
.btn-success:hover {
    background: linear-gradient(90deg, rgba(16,185,129,0.32) 0%, rgba(16,185,129,0.22) 100%);
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 2px 8px rgba(16,185,129,0.10);
}

.aggiungi-slot, .toggle-congo {
    background: linear-gradient(90deg, rgba(139,92,246,0.28), rgba(245,158,11,0.22));
    border: 1px solid rgba(255,255,255,0.08);
    padding: 10px 16px;
    border-radius: 12px !important;
    font-weight: 600;
    backdrop-filter: blur(12px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    color: #f3f4f6;
}
.aggiungi-slot:hover, .toggle-congo:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

input, select {
    background: rgba(55, 65, 81, 0.5);
    color: #f3f4f6;
    border: 1px solid rgba(75, 85, 99, 0.5);
    transition: all 0.2s;
    backdrop-filter: blur(5px);
}
input:focus, select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}
input::placeholder {
    color: #9ca3af;
}

/* === TASKBAR (Icon-only, Perfect Blend) === */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100% !important;
    background: rgba(17, 24, 39, 0.98) !important;
    backdrop-filter: blur(20px);
    border-radius: 0 !important;
    border-top-left-radius: 20px !important;
    border-top-right-radius: 20px !important;
    padding: 12px 8px !important;
    z-index: 9999;
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3) !important;
    margin: 0 !important;
    transform: none !important;
    box-sizing: border-box;
    max-width: 100vw !important;
    will-change: transform;
    transform: translateZ(0);
}

.taskbar-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 0 !important;
    max-width: 600px;
    margin: 0 auto;
}

.taskbar-item {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    min-width: 50px !important;
    padding: 8px 4px !important;
    border-radius: 0 !important;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #f3f4f6;
    flex: 1;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    text-decoration: none !important;
    cursor: pointer !important;
    text-shadow: none !important;
    transform: none !important;
    outline: none !important;
}

.taskbar-item:hover {
    background: transparent !important;
}

.taskbar-item:active {
    transform: none !important;
}

.taskbar-item:focus,
.taskbar-item:focus-visible,
.taskbar-item:-moz-focusring,
.taskbar-item::-moz-focus-inner {
    outline: none !important;
    border: 0 !important;
    box-shadow: none !important;
}

.taskbar-item * {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.taskbar-label {
    display: none !important;
}

.taskbar-item::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    background: currentColor;
    transition: all 0.3s ease;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    color: #f3f4f6;
    filter: brightness(1.2);
    transform: translateZ(0);
}

.taskbar-item:hover::before {
    color: #ffffff !important;
    transform: scale(1.1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.taskbar-item:active::before {
    transform: scale(0.95);
}

.taskbar-item.active::after {
    content: "";
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    background: #3b82f6;
    border-radius: 50%;
    opacity: 0.9;
}

.taskbar-item.active::before {
    color: #3b82f6 !important;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.4));
}

/* === TASKBAR ICONS === */
.taskbar-item[href="#analizza-scambi"]::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4'/%3E%3C/svg%3E");
}
.taskbar-item[href="#la-mia-squadra"]::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z' /%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z' /%3E%3C/svg%3E");
}
.taskbar-item[href="#vibes"]::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9.75 3.104v5.714a2.25 2.25 0 0 1-.659 1.591L5 14.5M9.75 3.104c-.251.023-.501.05-.75.082m.75-.082a24.301 24.301 0 0 1 4.5 0m0 0v5.714c0 .597.237 1.17.659 1.591L19.8 15.3M14.25 3.104c.251.023.501.05.75.082M19.8 15.3l-1.57.393A9.065 9.065 0 0 1 12 15a9.065 9.065 0 0 0-6.23-.693L5 14.5m14.8.8 1.402 1.402c1.232 1.232.65 3.318-1.067 3.611A48.309 48.309 0 0 1 12 21c-2.773 0-5.491-.235-8.135-.687-1.718-.293-2.3-2.379-1.067-3.61L5 14.5' /%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9.75 3.104v5.714a2.25 2.25 0 0 1-.659 1.591L5 14.5M9.75 3.104c-.251.023-.501.05-.75.082m.75-.082a24.301 24.301 0 0 1 4.5 0m0 0v5.714c0 .597.237 1.17.659 1.591L19.8 15.3M14.25 3.104c.251.023.501.05.75.082M19.8 15.3l-1.57.393A9.065 9.065 0 0 1 12 15a9.065 9.065 0 0 0-6.23-.693L5 14.5m14.8.8 1.402 1.402c1.232 1.232.65 3.318-1.067 3.611A48.309 48.309 0 0 1 12 21c-2.773 0-5.491-.235-8.135-.687-1.718-.293-2.3-2.379-1.067-3.61L5 14.5' /%3E%3C/svg%3E");
}
.taskbar-item[href="#specialisti-squadre"]::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E");
}
.taskbar-item[href="#osservati"]::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}
.taskbar-item[href="#scambi-consigliati"]::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456zM16.894 20.567L16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456zM16.894 20.567L16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423z'/%3E%3C/svg%3E");
}
.taskbar-item[href="#listone-giocatori"]::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='8' y1='6' x2='21' y2='6'/%3E%3Cline x1='8' y1='12' x2='21' y2='12'/%3E%3Cline x1='8' y1='18' x2='21' y2='18'/%3E%3Cline x1='3' y1='6' x2='3.01' y2='6'/%3E%3Cline x1='3' y1='12' x2='3.01' y2='12'/%3E%3Cline x1='3' y1='18' x2='3.01' y2='18'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='8' y1='6' x2='21' y2='6'/%3E%3Cline x1='8' y1='12' x2='21' y2='12'/%3E%3Cline x1='8' y1='18' x2='21' y2='18'/%3E%3Cline x1='3' y1='6' x2='3.01' y2='6'/%3E%3Cline x1='3' y1='12' x2='3.01' y2='12'/%3E%3Cline x1='3' y1='18' x2='3.01' y2='18'/%3E%3C/svg%3E");
}
.taskbar-item.chat-ai::before {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v14l-4-3H6a2 2 0 0 1-2-2V4Zm2 0v9h8.17L18 15.83V4H6Z'/%3E%3C/svg%3E") no-repeat center / contain;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v14l-4-3H6a2 2 0 0 1-2-2V4Zm2 0v9h8.17L18 15.83V4H6Z'/%3E%3C/svg%3E") no-repeat center / contain;
    opacity: 0.9;
}

/* === IOS SAFE AREA === */
.ios-bottom-safe {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(env(safe-area-inset-bottom, 20px) + 12px);
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    z-index: 996;
    pointer-events: none;
    transition: background 0.3s ease;
}
@supports (padding: max(0px)) {
    .taskbar {
        padding-left: max(8px, env(safe-area-inset-left));
        padding-right: max(8px, env(safe-area-inset-right));
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
}
@supports (padding: max(0px)) {
    body {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.5);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.7);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 114, 128, 0.7);
}

/* === UTILITY === */
.loader {
    border: 3px solid rgba(55, 65, 81, 0.5);
    border-radius: 50%;
    border-top: 3px solid #3b82f6;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
}
.positive {
    color: #10b981;
}
.negative {
    color: #ef4444;
}
.highlight {
    background-color: rgba(245, 158, 11, 0.3);
    padding: 1px 0;
    border-radius: 2px;
    font-weight: 600;
}
.watched-badge::after {
    content: "";
    display: none;
}

/* === FOOTER === */
.footer {
    margin-top: 16px;
    padding-top: 1rem;
    padding-bottom: 1rem;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}
.footer-text {
    color: #9ca3af;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.social-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(55, 65, 81, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}
.social-btn:hover {
    background: rgba(55, 65, 81, 0.8);
    color: #e5e7eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.social-icon {
    width: 16px;
    height: 16px;
}

/* === ANALIZZA SCAMBI === */
.options-toggle {
    position: relative;
    background: rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(5px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-size: 1.2rem;
}
.options-toggle:hover {
    transform: scale(1.05);
}
.options-container {
    transition: max-height 0.3s, opacity 0.3s, padding 0.3s;
    overflow: hidden;
}
.options-container.hidden {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.congo-section {
    background: rgba(20, 24, 36, 0.55);
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-left: 4px solid rgba(245, 158, 11, 0.55);
    padding: 16px 20px;
    border-radius: 16px;
    margin: 14px 0;
    backdrop-filter: blur(14px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.congo-section:not(.congo-visible) {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    display: none;
}
.congo-section input[type="number"],
.congo-section select {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 8px;
    border-radius: 10px;
    color: #f3f4f6;
}
.congo-section input[type="checkbox"],
.congo-section input[type="radio"] {
    accent-color: #f59e0b;
}
.congo-section h3 {
    color: #fbbf24;
    font-weight: 600;
    margin-bottom: 10px;
}

.trade-selection-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.trade-slot {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 360px;
}
.trade-mini-label {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-bottom: 6px;
    text-align: center;
}
.trade-slot:last-child .trade-mini-label {
    margin-top: 6px;
}
.trade-btn {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    border-radius: 16px !important;
    text-align: center !important;
    background: rgba(16, 44, 105, 0.3);
    border: 1px solid rgba(54, 92, 139, 0.3);
}
.trade-btn:hover {
    background: rgba(16, 44, 105, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.trade-center-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    background: rgba(55, 65, 81, 0.45);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px auto;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.center-swap-icon {
    width: 30px;
    height: 30px;
    color: #d1d5db;
}

.player-slot-group {
    /* Styles for dynamically added slots */
}
.player-slot {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 14px;
    border-radius: 14px;
    backdrop-filter: blur(10px);
    margin-bottom: 12px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.player-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.25);
}
.player-slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.remove-slot {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fff;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease;
}
.remove-slot:hover {
    background: rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}
.select-player-btn {
    background: rgba(16, 44, 105, 0.3);
    border: 1px solid rgba(54, 92, 139, 0.3);
}
.select-player-btn:hover {
    background: rgba(16, 44, 105, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.player-details {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(8px);
    border-radius: 14px;
    padding: 14px 18px !important;
    margin-top: 12px;
    border: none !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    animation: fadeInDetails .25s ease;
    display: none; /* Inizia nascosto */
}
.player-details:not(.hidden) {
    display: block !important; /* Mostra quando non ha .hidden */
}
.player-details p {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.9rem;
    color: #e5e7eb;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.player-details p:last-child {
    border-bottom: none;
}
.player-details p span:first-child {
    font-weight: 500;
    opacity: 0.85;
}
.player-details span {
    font-weight: 600;
    color: #93c5fd;
    text-shadow: 0 0 4px rgba(147,197,253,0.4);
}
.player-details .role-value {
    color: #fbbf24;
}

.trade-output-container {
    background: rgba(55, 65, 81, 0.3);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.trade-output-container:not(:empty) {
    background: rgba(55, 65, 81, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-style: solid;
}
.trade-placeholder {
    max-width: 300px;
}
.trade-icon {
    opacity: 0.6;
}
.trade-result {
    width: 100%;
}
.trade-result h4 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #e5e7eb;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}
.trade-details {
    background: rgba(31, 41, 55, 0.4);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}
.trade-verdict {
    font-weight: bold;
    font-size: 1.1rem;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    margin-top: 12px;
}
.verdict-positive {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}
.verdict-negative {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}
.verdict-neutral {
    background: rgba(156, 163, 175, 0.2);
    border: 1px solid rgba(156, 163, 175, 0.3);
    color: #9ca3af;
}

/* === OSSERVATI === */
#watchedPlayersOutput .overflow-x-auto {
    max-height: 70vh;
    overflow-y: auto;
    position: relative;
}
#watchedPlayersTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
#watchedPlayersTable th, #watchedPlayersTable td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
}
#watchedPlayersTable th {
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.875rem;
    cursor: pointer;
    background: rgba(31, 41, 55, 0.7);
    position: sticky;
    top: 0;
    z-index: 10;
}
#watchedPlayersTable th:hover {
    background: rgba(55, 65, 81, 0.5);
}
#watchedPlayersTable tr:hover {
    background: rgba(55, 65, 81, 0.3);
}
.remove-watched-btn {
    background: rgba(239, 68, 68, 0.5);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}

/* === LA MIA SQUADRA (FORMAZIONE) === */
#formationOptionsContainer {
    background: linear-gradient(180deg, rgba(17,24,39,0.6), rgba(20,28,45,0.55));
    border: 1px solid rgba(255,255,255,0.04);
    padding: 14px;
    border-radius: 12px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 14px;
    align-items: start;
    box-shadow: 0 6px 20px rgba(2,6,23,0.55);
}
#formationOptionsContainer::before {
    content: "Configurazioni avanzate — imposta giornata, modulo e gestisci rapidamente Titolari/Indisponibili";
    display: block;
    font-size: 0.86rem;
    color: #cbd5e1;
    margin-bottom: 8px;
    padding: 6px 10px;
    background: linear-gradient(90deg, rgba(59,130,246,0.06), rgba(139,92,246,0.04));
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.02);
}
#formationOptionsContainer label {
    display: block;
    font-size: 0.9rem;
    color: #d1d5db;
    margin-bottom: 6px;
    font-weight: 600;
}
#formationOptionsContainer input[type="number"],
#formationOptionsContainer select,
#formationOptionsContainer input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(31, 41, 55, 0.6);
    color: #e6eef8;
    font-size: 0.95rem;
    box-shadow: none;
    transition: box-shadow 0.18s, transform 0.12s;
}
#formationOptionsContainer input:focus,
#formationOptionsContainer select:focus {
    box-shadow: 0 4px 18px rgba(59,130,246,0.12);
    border-color: rgba(59,130,246,0.45);
    transform: translateY(-1px);
}
#formationOptionsContainer > .controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: end;
}
#formationOptionsContainer .grid.md\:grid-cols-2 {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px;
}
#formationOptionsContainer .btn-primary,
#formationOptionsContainer .btn-success {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
}
#formationOptionsContainer .btn-primary::before,
#formationOptionsContainer .btn-success::before {
    content: "＋";
    display: inline-block;
    margin-right: 8px;
    font-weight: 700;
    transform: translateY(-1px);
}
#formationOptionsContainer .bg-card {
    background: rgba(23, 30, 45, 0.6);
    border-radius: 10px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.03);
    box-shadow: 0 6px 16px rgba(3,6,14,0.5);
}
#formationOptionsContainer .bg-card h3 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: #e6eef8;
}
#formationOptionsContainer .compact-player-list {
    max-height: 180px;
    overflow-y: auto;
    padding-right: 6px;
    margin-top: 6px;
}
#formationOptionsContainer .compact-player-list .flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(31,41,55,0.55);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background 0.15s, transform 0.12s;
}
#formationOptionsContainer .compact-player-list .flex:hover {
    background: rgba(59,130,246,0.06);
    transform: translateX(4px);
}
#formationOptionsContainer .compact-remove-btn {
    width: 28px;
    height: 28px;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(239,68,68,0.12);
    color: #fecaca;
    border: 1px solid rgba(239,68,68,0.08);
}
#formationOptionsContainer > div:first-child {
    padding-right: 6px;
}
#formationOptionsContainer > div:nth-child(2) {
    padding-left: 6px;
}
#formationOptionsContainer .role-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
}
#formationOptionsContainer .select, 
#formationOptionsContainer button,
#formationOptionsContainer input {
    outline-offset: 3px;
}
#formationOptionsContainer .bg-card p.text-center {
    color: #9ca3af;
    font-size: 0.9rem;
    padding: 12px 6px;
}

#myTeamOutput .bg-card {
    background: rgba(55, 65, 81, 0.4);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}
#myTeamOutput .bg-card h4 {
    margin-bottom: 10px;
    font-size: 1rem;
    color: #e5e7eb;
}
#myTeamOutput .bg-card .bg-gray-800 {
    background: rgba(31, 41, 55, 0.6);
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 8px;
}
#goalkeeperCount, #defenderCount, #midfielderCount, #forwardCount {
    font-weight: bold;
    font-size: 1rem;
}
#selectMyPlayers, #addInjuredPlayer, #addEssentialPlayer {
    font-size: 0.85rem;
    padding: 6px 12px;
}
#injuredPlayersOutput .bg-gray-800,
#essentialPlayersOutput .bg-gray-800 {
    background: rgba(31, 41, 55, 0.6);
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#essentialPlayersOutput .bg-gray-800 {
    border-left: 3px solid #ef4444;
}
.remove-injured-btn, .remove-essential-btn {
    background: rgba(239, 68, 68, 0.3);
    border: none;
    color: #ef4444;
    border-radius: 3px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.remove-injured-btn:hover, .remove-essential-btn:hover {
    background: rgba(239, 68, 68, 0.5);
    transform: scale(1.1);
}

.compact-roster {
    background: rgba(55, 65, 81, 0.4);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 15px;
}
.compact-roster-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.compact-role-section {
    background: rgba(31, 41, 55, 0.6);
    border-radius: 6px;
    padding: 8px;
}
.compact-role-section h5 {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 6px;
    text-align: center;
    color: #e5e7eb;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 4px;
}
.compact-role-section:nth-child(1) h5 { color: #3b82f6; }
.compact-role-section:nth-child(2) h5 { color: #10b981; }
.compact-role-section:nth-child(3) h5 { color: #8b5cf6; }
.compact-role-section:nth-child(4) h5 { color: #f59e0b; }

.compact-player-list {
    max-height: 120px;
    overflow-y: auto;
}
.compact-player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 6px;
    margin-bottom: 3px;
    background: rgba(55, 65, 81, 0.5);
    border-radius: 4px;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}
.compact-player-item:hover {
    background: rgba(75, 85, 99, 0.6);
    transform: translateX(2px);
}
.compact-player-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 6px;
}
.compact-remove-btn {
    background: rgba(239, 68, 68, 0.3);
    border: none;
    color: #ef4444;
    border-radius: 3px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.compact-remove-btn:hover {
    background: rgba(239, 68, 68, 0.5);
    transform: scale(1.1);
}
.compact-player-list::-webkit-scrollbar {
    width: 4px;
}
.compact-player-list::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.5);
}
.compact-player-list::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.5);
    border-radius: 2px;
}

/* === CAMPO DA CALCIO (Formazione) === */
.football-field-container {
    background: rgba(20, 23, 36, 0.8);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(11, 15, 30, 0.6);
    overflow: hidden;
}
.vertical-football-field {
    width: 100%;
    aspect-ratio: 2/3;
    background: linear-gradient(135deg, #1a5c1a 0%, #2d7a2d 100%);
    border: 2px solid #fff;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}
.vertical-football-field::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-50%);
}
.center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.goal-area {
    position: absolute;
    width: 30%;
    height: 8%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    left: 50%;
    transform: translateX(-50%);
}
.goal-area.top {
    top: 0;
    border-bottom: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}
.goal-area.bottom {
    bottom: 0;
    border-top: none;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}
.player-line {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 6px;
    padding: 3px 0;
    position: relative;
}
.player-line.portieri { order: 1; }
.player-line.difensori { order: 2; gap: 4px !important; }
.player-line.centrocampisti { order: 3; gap: 4px !important; }
.player-line.attaccanti { order: 4; }
.line-label {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.65rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.5);
    padding: 1px 4px;
    border-radius: 3px;
}
.player-card {
    background: rgba(31, 41, 55, 0.95);
    border: 1px solid;
    border-radius: 6px;
    padding: 6px 4px;
    min-width: 70px;
    text-align: center;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    position: relative;
}
.player-line.difensori .player-card,
.player-line.centrocampisti .player-card {
    min-width: 65px;
    padding: 5px 3px;
}
.player-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}
.player-name {
    font-size: 0.7rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 1px;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 65px;
}
.player-line.difensori .player-name,
.player-line.centrocampisti .player-name {
    font-size: 0.65rem;
    max-width: 60px;
}
.player-details {
    font-size: 0.6rem;
    color: #d1d5db;
    margin-bottom: 2px;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 65px;
}
.player-score {
    font-size: 0.7rem;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.9);
    color: #1f2937;
}
.role-P .player-card { border-color: #3b82f6; }
.role-D .player-card { border-color: #10b981; }
.role-C .player-card { border-color: #8b5cf6; }
.role-A .player-card { border-color: #f59e0b; }

.essential-player .player-name::after {
    content: " ♥";
    color: #ef4444;
    margin-left: 2px;
}
.essential-player .player-card {
    border: 2px solid #ef4444 !important;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

/* === VIBES (FantaNews) === */
#vibes h2 {
    background: linear-gradient(90deg, #ec4899 0%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.vibes-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.vibe-card {
    background: rgba(30,34,48,0.6);
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.06);
    padding: 18px;
    backdrop-filter: blur(12px);
    margin-bottom: 16px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: slideInVibe 0.4s ease-out;
}
.vibe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 26px rgba(0,0,0,0.25);
}
.vibe-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.vibe-avatar {
    width: 48px;
    height: 48px;
    padding: 2px;
    border-radius: 50%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
}
.vibe-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(17, 24, 39, 0.9);
}
.vibe-account {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.vibe-name {
    font-weight: 700;
    font-size: 1rem;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.vibe-time {
    font-size: 0.8rem;
    color: #9ca3af;
}
.vibe-content {
    color: #e5e7eb;
    line-height: 1.5;
    font-size: 0.95rem;
}
.vibe-content p {
    margin: 0;
}
.vibe-content strong {
    color: #a78bfa;
}

/* === SPECIALISTI === */
#specialisti-squadre h2 {
    background: linear-gradient(90deg, #8b5cf6 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
#specialisti-squadre .teams-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 8px 0;
    margin-bottom: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(75, 85, 99, 0.5) rgba(31, 41, 55, 0.3);
}
#specialisti-squadre .teams-scroll-container::-webkit-scrollbar {
    height: 6px;
}
#specialisti-squadre .teams-scroll-container::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.3);
    border-radius: 3px;
}
#specialisti-squadre .teams-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.5);
    border-radius: 3px;
}
#specialisti-squadre .team-selector {
    flex: 0 0 auto;
    background: rgba(55, 65, 81, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 80px;
}
#specialisti-squadre .team-selector:hover {
    background: rgba(75, 85, 99, 0.6);
    transform: translateY(-2px);
}
#specialisti-squadre .team-selector.active {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}
#specialisti-squadre .team-logo-small {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin: 0 auto 4px;
    display: block;
}
#specialisti-squadre .team-name-small {
    font-size: 0.75rem;
    font-weight: 500;
    color: #e5e7eb;
    white-space: nowrap;
}
#specialisti-squadre .specialisti-details {
    background: rgba(55, 65, 81, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
    display: none;
}
#specialisti-squadre .specialisti-details.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}
#specialisti-squadre .specialisti-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
#specialisti-squadre .specialisti-category {
    background: rgba(31, 41, 55, 0.6);
    border-radius: 8px;
    padding: 12px;
}
#specialisti-squadre .specialisti-category h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #f59e0b;
    margin: 0 0 8px 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 6px;
}
#specialisti-squadre .specialisti-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
#specialisti-squadre .specialist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: rgba(55, 65, 81, 0.5);
    border-radius: 6px;
    transition: all 0.2s ease;
}
#specialisti-squadre .specialist-item:hover {
    background: rgba(75, 85, 99, 0.6);
    transform: translateX(4px);
}
#specialisti-squadre .specialist-role {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 20px;
    text-align: center;
}
#specialisti-squadre .specialist-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #e5e7eb;
    flex: 1;
}
#specialisti-squadre .no-team-selected {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    font-style: italic;
}
#specialisti-squadre .no-team-selected .icon {
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.5;
}
#specialisti-squadre .team-card,
#specialisti-squadre #teamsGrid {
    display: none !important;
}

/* === SCAMBI CONSIGLIATI === */
#scambi-consigliati h2 {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.recommended-trade-card {
    background: rgba(55, 65, 81, 0.4);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid;
    transition: all 0.3s ease;
}
.recommended-trade-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.trade-card-weak {
    border-left-color: #ef4444;
}
.trade-card-improve {
    border-left-color: #10b981;
}
.trade-reason {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 10px;
}
.trade-players {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
    margin: 10px 0;
}
.trade-arrow {
    text-align: center;
    color: #f59e0b;
    font-size: 1.5rem;
}
.trade-player {
    background: rgba(31, 41, 55, 0.6);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}
.trade-player-name {
    font-weight: bold;
    margin-bottom: 5px;
}
.trade-player-details {
    font-size: 0.8rem;
    color: #d1d5db;
}
.trade-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.85rem;
}
.trade-stat {
    text-align: center;
}
.trade-stat-value {
    font-weight: bold;
    display: block;
}
.trade-stat-positive {
    color: #10b981;
}
.trade-stat-negative {
    color: #ef4444;
}
.trade-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}
.trade-action-btn {
    flex: 1;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.trade-action-primary {
    background: rgba(37, 99, 235, 0.3);
    border: 1px solid rgba(96, 165, 250, 0.3);
}
.trade-action-primary:hover {
    background: rgba(37, 99, 235, 0.5);
}
.trade-action-secondary {
    background: rgba(55, 65, 81, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.trade-action-secondary:hover {
    background: rgba(75, 85, 99, 0.5);
}

/* === LISTONE GIOCATORI === */
#listone-giocatori h2 {
    background: linear-gradient(90deg, #a78bfa 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.listone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.update-date {
    font-size: 0.875rem;
    color: #9ca3af;
    font-weight: 500;
    text-align: right;
}
.filter-master-btn {
    background: linear-gradient(90deg, rgba(59,130,246,0.25), rgba(139,92,246,0.25));
    padding: 12px 20px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    width: 100%;
    font-size: 1.05rem;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 12px;
    transition: all .25s ease;
    backdrop-filter: blur(6px);
}
.filter-master-btn:hover {
    background: linear-gradient(90deg, rgba(59,130,246,0.4), rgba(139,92,246,0.35));
    transform: translateY(-1px);
}
.filters-hidden {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}
.filters-show {
    max-height: 500px;
}
.filter-buttons {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.filter-button {
    background: rgba(55, 65, 81, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}
.filter-button.active {
    background: rgba(37, 99, 235, 0.5);
    border: 1px solid rgba(96, 165, 250, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}
.filter-button:hover {
    background: rgba(75, 85, 99, 0.5);
}
#searchPlayer {
    background: rgba(55, 65, 81, 0.6);
    border: 1px solid rgba(75, 85, 99, 0.6);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    flex: 1;
}
#searchPlayer:focus {
    background: rgba(55, 65, 81, 0.8);
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
#playersOutput .overflow-x-auto {
    max-height: 60vh;
    overflow-y: auto;
    border-radius: 6px;
}
.player-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.75rem;
    background: rgba(31,41,55,0.4);
    border-radius: 14px;
    overflow: hidden;
}
.player-table th {
    padding: 8px 4px;
    text-align: left;
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    background: rgba(55,65,81,0.35) !important;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}
.player-table th:hover {
    background: rgba(55, 65, 81, 0.5);
}
.player-table th[data-sort] {
    position: relative;
    padding-right: 16px;
    user-select: none;
}
.player-table th[data-sort]::after {
    content: "";
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    opacity: 0.5;
}
.player-table td {
    padding: 6px 4px;
    vertical-align: middle;
    white-space: nowrap;
    font-size: 0.9rem;
}
.player-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(55, 65, 81, 0.3);
}
.player-table tbody tr:hover {
    background: rgba(255,255,255,0.04);
}
.player-table tbody tr:nth-child(even) {
    background: rgba(55, 65, 81, 0.1);
}
.player-table tbody tr:nth-child(even):hover {
    background: rgba(255,255,255,0.06);
}
.role-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}
.role-A { background-color: #ef4444; color: white; }
.role-C { background-color: #3b82f6; color: white; }
.role-D { background-color: #10b981; color: white; }
.role-P { background-color: #f59e0b; color: white; }
.player-name-cell {
    font-weight: 500;
    color: #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.player-name-cell:hover {
    color: #3b82f6;
}
.player-table td:nth-child(3) { min-width: 80px; }
.player-table td:nth-child(4),
.player-table td:nth-child(5),
.player-table td:nth-child(6) {
    text-align: center;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    min-width: 50px;
}
.player-table td:nth-child(5) { color: #f59e0b; }
.player-table td:nth-child(6) { color: #10b981; }
.player-table tbody tr td[colspan="6"] {
    padding: 20px 10px;
    font-size: 0.8rem;
    color: #9ca3af;
    font-style: italic;
    text-align: center;
}

/* === POPUPS (Player Select & Details) === */
.player-select-popup, .player-details-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 24, 38, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s, visibility 0.22s;
}
.player-select-popup.active, .player-details-popup.active {
    opacity: 1;
    visibility: visible;
}
.player-select-container, .player-details-container {
    background: rgba(31,41,55,0.92);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.player-select-header, .player-details-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.player-select-search {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
}
.player-select-results, .player-details-content {
    flex: 1;
    overflow-y: auto;
    max-height: 50vh;
    padding: 1.5rem;
}
.player-select-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.player-select-item:hover {
    background: rgba(55, 65, 81, 0.5);
}
.player-select-info {
    display: flex;
    flex-direction: column;
}
.player-select-name {
    font-weight: bold;
}
.player-select-details {
    font-size: 0.875rem;
    color: #9ca3af;
}
.player-select-price {
    font-weight: bold;
    color: #f59e0b;
}
.close-popup, .close-details-popup {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.5rem;
    cursor: pointer;
}
.player-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.player-detail-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    background: rgba(55, 65, 81, 0.5);
    border-radius: 0.5rem;
}
.detail-label {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}
.detail-value {
    font-weight: 500;
}
.player-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.player-actions .btn-primary {
    background: rgba(37, 99, 235, 0.3);
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: white;
    transition: all 0.2s ease;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-align: center;
}
.player-actions .btn-primary:hover {
    background: rgba(37, 99, 235, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ============================================================
   LIGHT MODE [data-theme="light"]
   ============================================================ */
html[data-theme="light"] {
    --bg: #f3f4f6;
    --bg-card: rgba(255,255,255,0.75);
    --bg-soft: rgba(255,255,255,0.6);
    --text: #1f2937;
    --text-muted: #4b5563;
    --border: rgba(0,0,0,0.10);
    --shadow: rgba(0,0,0,0.15);
    --gradient-logo: linear-gradient(90deg, #3b82f6, #8b5cf6);
}

[data-theme="light"] body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%) !important;
    color: var(--text);
    position: relative;
    overflow-x: hidden;
}

[data-theme="light"] body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(96, 165, 250, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 20%, rgba(167, 139, 250, 0.15) 0%, transparent 50%);
    filter: blur(60px);
    animation: floatBackground 20s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}
[data-theme="light"] body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 60% 40%, rgba(37, 99, 235, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 30% 60%, rgba(124, 58, 237, 0.2) 0%, transparent 50%);
    filter: blur(80px);
    animation: floatBackground 25s ease-in-out infinite reverse;
    z-index: -1;
    pointer-events: none;
    opacity: 0.7;
}
[data-theme="light"] .background-overlay {
    background: 
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.3) 0%, transparent 40%);
    filter: blur(40px);
    opacity: 0.4;
}

[data-theme="light"] .card {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
    color: var(--text);
}
[data-theme="light"] .card:hover {
    background: rgba(255,255,255,0.95);
    box-shadow: 0 8px 25px rgba(0,0,0,0.18);
}
[data-theme="light"] .card h2,
[data-theme="light"] .card h3 {
    background: var(--gradient-logo);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .main-header {
    background: rgba(248, 250, 252, 0.85) !important;
    backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15) !important;
}
[data-theme="light"] .header-content h1 {
    background: linear-gradient(90deg, #2563eb 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
[data-theme="light"] .header-content p {
    color: var(--text-muted);
}
[data-theme="light"] .logo {
    border: 3px solid rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(0, 0, 0, 0.1);
    filter: brightness(1.05) contrast(1.1);
}
[data-theme="light"] .logo:hover {
    border: 3px solid rgba(0, 0, 0, 0.3);
    box-shadow: 
        0 6px 25px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1) contrast(1.15);
}
[data-theme="light"] .version-label {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
}
[data-theme="light"] .theme-toggle {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
}
[data-theme="light"] .theme-toggle:hover {
    background: rgba(255, 255, 255, 1);
}

[data-theme="light"] #main-menu {
    background: rgba(255,255,255,0.6);
}
[data-theme="light"] .modern-navigation {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(248, 250, 252, 0.4));
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .modern-nav-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(248, 250, 252, 0.6));
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .modern-nav-item:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(139, 92, 246, 0.08));
    border-color: rgba(139, 92, 246, 0.2);
    color: var(--accent-purple);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.1);
}
[data-theme="light"] .modern-nav-item::before {
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.05), transparent);
}
[data-theme="light"] .modern-nav-label {
    color: var(--text);
}
[data-theme="light"] .modern-nav-icon {
    opacity: 1;
    background: var(--gradient-logo);
}
[data-theme="light"] .modern-nav-indicator {
    background: var(--gradient-logo);
}
[data-theme="light"] .modern-navigation::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .modern-navigation::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.4), rgba(139, 92, 246, 0.4));
}
[data-theme="light"] .modern-navigation::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.6), rgba(139, 92, 246, 0.6));
}

[data-theme="light"] .section-toggle {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.2) 0%, rgba(139, 92, 246, 0.15) 100%) !important;
    border: 1px solid rgba(37, 99, 235, 0.25) !important;
    color: var(--text) !important;
}
[data-theme="light"] .section-toggle:hover {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.25) 0%, rgba(139, 92, 246, 0.2) 100%) !important;
}
[data-theme="light"] .section-content,
[data-theme="light"] .options-container {
    background: rgba(255,255,255,0.65) !important;
    border-color: rgba(0,0,0,0.08) !important;
    color: var(--text) !important;
    backdrop-filter: blur(10px);
}
[data-theme="light"] .section-group-title {
    background: linear-gradient(90deg, #2563eb 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-success,
[data-theme="light"] .aggiungi-slot,
[data-theme="light"] .toggle-congo {
    background: rgba(255,255,255,0.75);
    color: var(--text);
    border-color: var(--border);
}
[data-theme="light"] .btn-primary {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.25) 0%, rgba(96, 165, 250, 0.2) 100%) !important;
    border: 1px solid rgba(37, 99, 235, 0.35) !important;
    color: var(--accent-blue) !important;
    font-weight: 600;
}
[data-theme="light"] .btn-primary:hover {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.35) 0%, rgba(96, 165, 250, 0.3) 100%) !important;
}
[data-theme="light"] .btn-success {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0.2) 100%) !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
    color: var(--accent-green) !important;
}
[data-theme="light"] .btn-success:hover {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.35) 0%, rgba(16, 185, 129, 0.3) 100%) !important;
}
[data-theme="light"] .aggiungi-slot,
[data-theme="light"] .toggle-congo {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.2) 0%, rgba(139, 92, 246, 0.15) 100%) !important;
    border: 1px solid rgba(37, 99, 235, 0.3) !important;
    color: var(--accent-blue) !important;
    font-weight: 600;
    backdrop-filter: blur(10px);
}
[data-theme="light"] .aggiungi-slot:hover,
[data-theme="light"] .toggle-congo:hover {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.3) 0%, rgba(139, 92, 246, 0.25) 100%) !important;
    color: var(--accent-blue) !important;
}
[data-theme="light"] .btn-primary:disabled {
    background: rgba(0, 0, 0, 0.1) !important;
    border-color: var(--border) !important;
    color: var(--text-muted) !important;
    opacity: 0.7;
}

[data-theme="light"] input,
[data-theme="light"] select {
    background: rgba(255,255,255,0.95) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    font-weight: 500;
}
[data-theme="light"] input:focus,
[data-theme="light"] select:focus {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2) !important;
}
[data-theme="light"] input::placeholder {
    color: #6b7280;
}

[data-theme="light"] .taskbar {
    background: rgba(248, 250, 252, 0.98) !important;
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.15) !important;
}
[data-theme="light"] .taskbar-item {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
[data-theme="light"] .taskbar-item::before {
    color: #6b7280 !important;
    filter: none !important;
}
[data-theme="light"] .taskbar-item:hover {
    background: rgba(226, 232, 240, 0.95) !important;
}
[data-theme="light"] .taskbar-item:hover::before {
    color: #1f2937 !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}
[data-theme="light"] .taskbar-item:active {
    background: rgba(203, 213, 225, 0.95) !important;
}
[data-theme="light"] .taskbar-item.active::after {
    background: #2563eb !important;
    box-shadow: 0 0 6px rgba(37, 99, 235, 0.4);
    bottom: 2px;
    width: 3px;
    height: 3px;
}
[data-theme="light"] .taskbar-item.active::before {
    color: #2563eb !important;
    filter: drop-shadow(0 0 6px rgba(37, 99, 235, 0.3));
}
[data-theme="light"] .taskbar-item.chat-ai::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231e293b'%3E%3Cpath d='M4 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v14l-4-3H6a2 2 0 0 1-2-2V4Zm2 0v9h8.17L18 15.83V4H6Z'/%3E%3C/svg%3E");
    opacity: 0.9;
    filter: none;
}
[data-theme="light"] .taskbar-item.chat-ai:hover::before {
    opacity: 1;
}

[data-theme="light"] .ios-bottom-safe {
    background: rgba(243, 244, 246, 0.92);
}

[data-theme="light"] ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05) !important;
}
[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2) !important;
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3) !important;
}

[data-theme="light"] .loader {
    border: 3px solid rgba(0, 0, 0, 0.1) !important;
    border-top: 3px solid var(--accent-blue) !important;
}
[data-theme="light"] .positive {
    color: var(--accent-green) !important;
    font-weight: 600;
}
[data-theme="light"] .negative {
    color: var(--accent-red) !important;
    font-weight: 600;
}
[data-theme="light"] .highlight {
    background-color: rgba(217, 119, 6, 0.3);
}

[data-theme="light"] .footer {
    background: transparent !important;
    border-top: 1px solid var(--border-light) !important;
    backdrop-filter: blur(10px);
}
[data-theme="light"] .footer-content {
    background: rgba(255, 255, 255, 0.8) !important;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem auto;
    border: 1px solid var(--border) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}
[data-theme="light"] .footer-text {
    color: var(--text) !important;
    font-weight: 600;
    font-size: 1rem;
}
[data-theme="light"] .social-btn {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    font-weight: 500;
    backdrop-filter: blur(10px);
}
[data-theme="light"] .social-btn:hover {
    background: rgba(37, 99, 235, 0.1) !important;
    color: var(--accent-blue) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}
[data-theme="light"] .social-icon {
    color: var(--accent-blue) !important;
}

[data-theme="light"] #analizza-scambi h2 {
    background: linear-gradient(90deg, #c026d3 0%, #a855f7 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}
[data-theme="light"] .options-toggle {
    background: rgba(37, 99, 235, 0.15) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(37, 99, 235, 0.2) !important;
    color: var(--accent-blue) !important;
    font-weight: 600;
}
[data-theme="light"] .options-toggle:hover {
    background: rgba(37, 99, 235, 0.25) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15) !important;
}
[data-theme="light"] .congo-section {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(0,0,0,0.10) !important;
    border-left: 4px solid var(--accent-yellow) !important;
    color: var(--text) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .congo-section h3 {
    color: var(--accent-yellow) !important;
    font-weight: 600;
}
[data-theme="light"] .congo-section label {
    color: var(--text) !important;
    font-weight: 500;
}
[data-theme="light"] .trade-slot,
[data-theme="light"] .player-slot {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(5px);
}
[data-theme="light"] .trade-slot:hover,
[data-theme="light"] .player-slot:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(37, 99, 235, 0.3) !important;
}
[data-theme="light"] .trade-mini-label {
    color: var(--text-muted);
}
[data-theme="light"] .trade-btn,
[data-theme="light"] .select-player-btn {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    color: var(--text) !important;
    font-weight: 500;
}
[data-theme="light"] .trade-btn:hover,
[data-theme="light"] .select-player-btn:hover {
    background: rgba(37, 99, 235, 0.1) !important;
    border-color: #2563eb !important;
    color: #2563eb !important;
}
[data-theme="light"] .trade-center-icon {
    background: rgba(255,255,255,0.8);
    border-color: var(--border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
[data-theme="light"] .center-swap-icon {
    color: var(--text-muted);
}
[data-theme="light"] .player-slot-header label {
    color: var(--text) !important;
    font-weight: 600 !important;
}
[data-theme="light"] .remove-slot,
[data-theme="light"] .remove-watched-btn,
[data-theme="light"] .remove-injured-btn,
[data-theme="light"] .remove-essential-btn,
[data-theme="light"] .compact-remove-btn {
    background: rgba(220, 38, 38, 0.15) !important;
    color: #dc2626 !important;
    border: 1px solid rgba(220, 38, 38, 0.3) !important;
    font-weight: 600;
}
[data-theme="light"] .remove-slot:hover,
[data-theme="light"] .remove-watched-btn:hover,
[data-theme="light"] .remove-injured-btn:hover,
[data-theme="light"] .remove-essential-btn:hover,
[data-theme="light"] .compact-remove-btn:hover {
    background: rgba(220, 38, 38, 0.25) !important;
    transform: scale(1.1);
}
[data-theme="light"] .player-details:not(.hidden) {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 2px solid rgba(37, 99, 235, 0.3) !important;
    color: var(--text) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    padding: 15px !important;
    animation: slideDownLight 0.3s ease-out !important;
}
[data-theme="light"] .player-details p {
    color: var(--text) !important;
    margin: 10px 0 !important;
    padding: 6px 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}
[data-theme="light"] .fantamedia-value,
[data-theme="light"] .price-value,
[data-theme="light"] .media-value,
[data-theme="light"] .team-value,
[data-theme="light"] .role-value {
    color: #2563eb !important;
    font-weight: 700 !important;
    background: rgba(37, 99, 235, 0.1) !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    margin-left: 8px !important;
    display: inline-block;
    min-width: 50px;
    text-align: center;
}
[data-theme="light"] .fantamedia-value {
    color: #d97706 !important;
    background: rgba(217, 119, 6, 0.1) !important;
}
[data-theme="light"] .price-value {
    color: #059669 !important;
    background: rgba(5, 150, 105, 0.1) !important;
}
[data-theme="light"] .media-value {
    color: #7c3aed !important;
    background: rgba(124, 58, 237, 0.1) !important;
}
[data-theme="light"] .team-value {
    color: #475569 !important;
    background: rgba(71, 85, 105, 0.1) !important;
}
[data-theme="light"] .role-value {
    color: #dc2626 !important;
    background: rgba(220, 38, 38, 0.1) !important;
    text-transform: uppercase !important;
}
[data-theme="light"] .trade-output-container {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 2px dashed var(--border) !important;
}
[data-theme="light"] .trade-output-container:not(:empty) {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid var(--border) !important;
}
[data-theme="light"] .trade-placeholder p,
[data-theme="light"] .trade-placeholder h3 {
    color: var(--text-muted) !important;
}
[data-theme="light"] .trade-icon {
    color: var(--text-muted) !important;
}
[data-theme="light"] .trade-result h4 {
    color: var(--text) !important;
    border-bottom: 2px solid var(--border) !important;
    font-weight: 600;
}
[data-theme="light"] .trade-details {
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid var(--border-light) !important;
    color: var(--text) !important;
}

[data-theme="light"] #osservati h2 {
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}
[data-theme="light"] #watchedPlayersTable {
    background: rgba(255, 255, 255, 0.9) !important;
}
[data-theme="light"] #watchedPlayersTable th {
    background: rgba(255, 255, 255, 0.95) !important;
    color: var(--text-muted) !important;
    border-bottom: 1px solid var(--border) !important;
}
[data-theme="light"] #watchedPlayersTable tr:hover {
    background: rgba(37, 99, 235, 0.02) !important;
}
[data-theme="light"] #watchedPlayersTableBody td.text-center.text-gray-300 {
    color: var(--text-muted) !important;
}
[data-theme="light"] #watchedPlayersTable tbody td:first-child {
    color: var(--text) !important;
    font-weight: 500;
}

[data-theme="light"] #la-mia-squadra h2 {
    background: linear-gradient(90deg, #059669 0%, #10b981 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}
[data-theme="light"] #formationOptionsContainer {
    background: rgba(255,255,255,0.8);
    border-color: var(--border);
}
[data-theme="light"] #formationOptionsContainer::before {
    color: var(--text);
    background: rgba(0,0,0,0.03);
    border-color: var(--border-light);
}
[data-theme="light"] #formationOptionsContainer label {
    color: var(--text);
}
[data-theme="light"] #formationOptionsContainer .bg-card {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid var(--border) !important;
    backdrop-filter: blur(10px);
}
[data-theme="light"] #formationOptionsContainer .bg-card h3 {
    color: var(--text) !important;
}
[data-theme="light"] #formationOptionsContainer .compact-player-list .flex {
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid var(--border-light) !important;
    color: var(--text) !important;
}
[data-theme="light"] #formationOptionsContainer .compact-player-list .flex:hover {
    background: rgba(37, 99, 235, 0.1) !important;
    border-color: rgba(37, 99, 235, 0.2) !important;
}
[data-theme="light"] #formationOptionsContainer .bg-card p.text-center {
    color: var(--text-muted);
}
[data-theme="light"] #myTeamOutput .bg-card {
    background: rgba(255, 255, 255, 0.8) !important;
}
[data-theme="light"] #myTeamOutput .bg-card h4 {
    color: var(--text);
}
[data-theme="light"] #myTeamOutput .bg-card .bg-gray-800 {
    background: rgba(0, 0, 0, 0.08) !important;
    color: var(--text) !important;
}
[data-theme="light"] #goalkeeperCount,
[data-theme="light"] #defenderCount,
[data-theme="light"] #midfielderCount,
[data-theme="light"] #forwardCount {
    color: var(--accent-yellow) !important;
    font-weight: 700;
}
[data-theme="light"] .compact-roster {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid var(--border) !important;
}
[data-theme="light"] .compact-role-section {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid var(--border-light) !important;
}
[data-theme="light"] .compact-role-section h5 {
    color: var(--text-primary);
    border-color: var(--border-light);
}
[data-theme="light"] .compact-player-item {
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid var(--border-light) !important;
    color: var(--text-primary);
}
[data-theme="light"] .compact-player-item:hover {
    background: rgba(37, 99, 235, 0.1) !important;
}
[data-theme="light"] #suggestedFormation {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9)) !important;
    border: 1px solid var(--border) !important;
}
[data-theme="light"] .vertical-football-field {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%) !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
[data-theme="light"] .player-card {
    background: rgba(255, 255, 255, 0.95) !important;
    color: var(--text) !important;
    border: 2px solid !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .player-name {
    color: var(--text) !important;
    font-weight: 600;
}
[data-theme="light"] .player-details {
    color: var(--text-muted) !important;
}
[data-theme="light"] .player-score {
    background: rgba(245, 158, 11, 0.95) !important;
    color: #1f2937 !important;
    font-weight: 700;
}
[data-theme="light"] .line-label {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

[data-theme="light"] #vibes h2 {
    background: linear-gradient(90deg, #ec4899 0%, #f472b6 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}
[data-theme="light"] .vibe-card {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: var(--text);
}
[data-theme="light"] .vibe-card:hover {
    border-color: rgba(236, 72, 153, 0.3) !important;
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.1) !important;
}
[data-theme="light"] .vibe-avatar {
    background: var(--gradient-logo);
}
[data-theme="light"] .vibe-avatar img {
    border-color: #ffffff;
}
[data-theme="light"] .vibe-name {
    background: var(--gradient-logo);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
[data-theme="light"] .vibe-time {
    color: var(--text-muted);
}
[data-theme="light"] .vibe-content {
    color: var(--text-muted);
}
[data-theme="light"] .vibe-content strong {
    color: var(--text);
}

[data-theme="light"] #specialisti-squadre h2 {
    background: linear-gradient(90deg, #7c3aed 0%, #a855f7 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}
[data-theme="light"] #specialisti-squadre .team-selector {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border);
    color: var(--text);
}
[data-theme="light"] #specialisti-squadre .team-selector:hover {
    background: rgba(255, 255, 255, 0.9);
}
[data-theme="light"] #specialisti-squadre .team-selector.active {
    background: rgba(37, 99, 235, 0.15);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}
[data-theme="light"] #specialisti-squadre .team-name-small {
    color: var(--text);
}
[data-theme="light"] #specialisti-squadre .specialisti-details {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
}
[data-theme="light"] #specialisti-squadre .specialisti-category {
    background: rgba(248, 250, 252, 0.8);
}
[data-theme="light"] #specialisti-squadre .specialisti-category h4 {
    color: var(--accent-yellow);
    border-color: var(--border-light);
}
[data-theme="light"] #specialisti-squadre .specialist-item {
    background: rgba(255, 255, 255, 0.7);
    color: var(--text);
}
[data-theme="light"] #specialisti-squadre .specialist-item:hover {
    background: rgba(37, 99, 235, 0.1);
}
[data-theme="light"] #specialisti-squadre .specialist-name {
    color: var(--text);
}
[data-theme="light"] #specialisti-squadre .no-team-selected {
    color: var(--text-muted);
}

[data-theme="light"] #scambi-consigliati h2 {
    background: linear-gradient(90deg, #d97706 0%, #f59e0b 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}
[data-theme="light"] #scambi-consigliati .recommended-trade-card {
    background: rgba(255, 255, 255, 0.9) !important;
    border-left: 4px solid !important;
    color: var(--text) !important;
}
[data-theme="light"] #scambi-consigliati .trade-reason {
    color: var(--text-muted) !important;
}
[data-theme="light"] #scambi-consigliati .trade-player {
    background: rgba(248, 250, 252, 0.8) !important;
    color: var(--text) !important;
}
[data-theme="light"] #scambi-consigliati .trade-player-name {
    color: var(--text) !important;
}
[data-theme="light"] #scambi-consigliati .trade-player-details {
    color: var(--text-muted) !important;
}
[data-theme="light"] .trade-card-weak {
    border-left-color: #dc2626 !important;
}
[data-theme="light"] .trade-card-improve {
    border-left-color: #059669 !important;
}
[data-theme="light"] #scambi-consigliati .btn-primary {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.15) 0%, rgba(96, 165, 250, 0.12) 100%) !important;
    border: 1px solid rgba(37, 99, 235, 0.2) !important;
    color: #2563eb !important;
}
[data-theme="light"] #scambi-consigliati .btn-primary:hover {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.25) 0%, rgba(96, 165, 250, 0.2) 100%) !important;
}
[data-theme="light"] #scambi-consigliati .trade-placeholder h3,
[data-theme="light"] #scambi-consigliati .trade-placeholder p {
    color: var(--text-muted) !important;
}

[data-theme="light"] #listone-giocatori h2 {
    background: linear-gradient(90deg, #7c3aed 0%, #a855f7 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}
[data-theme="light"] .update-date {
    color: var(--text-muted);
}
[data-theme="light"] .filter-button {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    font-weight: 500;
}
[data-theme="light"] .filter-button.active {
    background: rgba(37, 99, 235, 0.2) !important;
    border-color: var(--accent-blue) !important;
    color: var(--accent-blue) !important;
    font-weight: 600;
}
[data-theme="light"] .filter-button:hover {
    background: rgba(37, 99, 235, 0.1) !important;
}
[data-theme="light"] #searchPlayer {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
}
[data-theme="light"] #searchPlayer:focus {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}
[data-theme="light"] #listone-giocatori .player-table {
    background: rgba(255,255,255,0.75);
    border-color: var(--border);
}
[data-theme="light"] #listone-giocatori .player-table th {
    background: rgba(255, 255, 255, 0.95) !important;
    color: var(--text-muted) !important;
    border-bottom: 2px solid var(--border) !important;
}
[data-theme="light"] #listone-giocatori .player-table td {
    background: transparent !important;
    color: var(--text) !important;
    border-bottom: 1px solid var(--border-light) !important;
}
[data-theme="light"] #listone-giocatori .player-table tr:hover {
    background: rgba(37, 99, 235, 0.08) !important;
}
[data-theme="light"] #listone-giocatori .player-table tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02) !important;
}
[data-theme="light"] #listone-giocatori .player-name-cell {
    color: var(--text) !important;
}
[data-theme="light"] #listone-giocatori .player-table td:nth-child(5) {
    color: #d97706 !important;
}
[data-theme="light"] #listone-giocatori .player-table td:nth-child(6) {
    color: #059669 !important;
}
[data-theme="light"] #listone-giocatori .player-table tbody tr td[colspan="6"] {
    color: var(--text-muted) !important;
}

[data-theme="light"] .player-select-popup,
[data-theme="light"] .player-details-popup {
    background: rgba(240, 244, 248, 0.95) !important;
    backdrop-filter: blur(20px);
}
[data-theme="light"] .player-select-container,
[data-theme="light"] .player-details-container {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}
[data-theme="light"] .player-select-header,
[data-theme="light"] .player-details-header {
    border-bottom: 1px solid var(--border-light) !important;
    color: var(--text) !important;
}
[data-theme="light"] .player-select-search {
    border-bottom: 1px solid var(--border-light) !important;
}
[data-theme="light"] .player-select-item {
    color: var(--text) !important;
    border-bottom: 1px solid var(--border-light) !important;
}
[data-theme="light"] .player-select-item:hover {
    background: rgba(37, 99, 235, 0.08) !important;
}
[data-theme="light"] .player-select-name {
    color: var(--text) !important;
    font-weight: 600;
}
[data-theme="light"] .player-select-details {
    color: var(--text-muted) !important;
}
[data-theme="light"] .player-select-price {
    color: #d97706 !important;
    font-weight: 600;
}
[data-theme="light"] .close-popup,
[data-theme="light"] .close-details-popup {
    color: var(--text-muted) !important;
}
[data-theme="light"] .player-detail-item {
    background: rgba(248, 250, 252, 0.8) !important;
    border: 1px solid var(--border-light) !important;
    color: var(--text) !important;
}
[data-theme="light"] .detail-label {
    color: var(--text-muted) !important;
    font-weight: 500;
}
[data-theme="light"] .detail-value {
    color: var(--text) !important;
    font-weight: 600;
}
[data-theme="light"] .role-badge {
    color: white !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
[data-theme="light"] .role-A { background: linear-gradient(135deg, #dc2626, #b91c1c) !important; }
[data-theme="light"] .role-C { background: linear-gradient(135deg, #2563eb, #1d4ed8) !important; }
[data-theme="light"] .role-D { background: linear-gradient(135deg, #059669, #047857) !important; }
[data-theme="light"] .role-P { background: linear-gradient(135deg, #d97706, #b45309) !important; }

/* ============================================================
   MEDIA QUERIES (Responsive)
   ============================================================ */

/* === Tablet (Medium) === */
@media (max-width: 768px) {
    .header-content {
        min-height: 100px;
    }
    .main-header.scrolled .header-content {
        min-height: 50px;
    }
    .header-title-container {
        gap: 10px;
    }
    .logo {
        height: 45px;
        width: 45px;
    }
    .header-content h1 {
        font-size: 2.2rem;
        font-weight: 700;
        letter-spacing: -0.2px;
    }
    .main-header.scrolled .logo {
        height: 30px;
        width: 30px;
    }
    .main-header.scrolled .header-content h1 {
        font-size: 1.5rem;
        font-weight: 700;
        letter-spacing: -0.1px;
    }
    .theme-toggle-container {
        right: 15px;
    }
    .version-label {
        left: 15px;
        font-size: 0.8rem;
        padding: 3px 8px;
    }
    
    .menu-navigation-section {
        margin-top: 30px;
    }
    .modern-navigation {
        gap: 6px;
        padding: 6px 3px;
    }
    .modern-nav-item {
        min-width: 80px;
        padding: 14px 8px;
    }
    .modern-nav-icon {
        width: 20px;
        height: 20px;
        margin-bottom: 6px;
    }
    .modern-nav-label {
        font-size: 0.75rem;
    }
    
    .section-group-title {
        font-size: 1.5rem;
        margin: 1.5rem 0 0.75rem 0;
    }
    .principali-section .card,
    .tools-section .card {
        margin-bottom: 1rem;
    }
    
    .taskbar {
        padding: 10px 6px !important;
    }
    .taskbar-item {
        min-width: 45px !important;
        padding: 6px 2px !important;
    }
    .taskbar-item::before {
        font-size: 1.3rem !important;
        width: 22px;
        height: 22px;
    }
    
    .footer-social {
        flex-direction: column;
        align-items: center;
    }
    .social-btn {
        width: 200px;
        justify-content: center;
    }
    
    #formationOptionsContainer {
        grid-template-columns: 1fr;
    }
    #formationOptionsContainer .btn-primary,
    #formationOptionsContainer .btn-success {
        width: 100%;
        display: block;
    }
    #formationOptionsContainer .compact-player-list {
        max-height: 220px;
    }
    
    .compact-roster-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .compact-player-list {
        max-height: 80px;
    }
    
    .vertical-football-field {
        aspect-ratio: 3/4;
        padding: 8px 0;
    }
    .player-card {
        min-width: 60px;
        padding: 5px 3px;
    }
    .player-name {
        font-size: 0.65rem;
        max-width: 55px;
    }
    .player-details {
        font-size: 0.55rem;
        max-width: 55px;
    }
    .player-score {
        font-size: 0.65rem;
    }
    .player-line {
        gap: 4px;
    }
    .line-label {
        font-size: 0.6rem;
        left: 4px;
    }
    .player-line.difensori .player-card,
    .player-line.centrocampisti .player-card {
        min-width: 55px;
        padding: 4px 2px;
    }
    .player-line.difensori .player-name,
    .player-line.centrocampisti .player-name {
        font-size: 0.6rem;
        max-width: 50px;
    }

    .vibe-card {
        padding: 12px;
    }
    .vibe-avatar {
        width: 40px;
        height: 40px;
    }
    .vibe-icon {
        width: 28px;
        height: 28px;
    }
    .vibe-content {
        font-size: 0.85rem;
    }
    
    #specialisti-squadre .specialisti-columns {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    #specialisti-squadre .team-selector {
        min-width: 70px;
        padding: 6px 8px;
    }
    #specialisti-squadre .team-logo-small {
        width: 28px;
        height: 28px;
    }
    #specialisti-squadre .team-name-small {
        font-size: 0.7rem;
    }
    
    #listone-giocatori .player-table {
        font-size: 0.95rem;
    }
    #listone-giocatori .player-table th,
    #listone-giocatori .player-table td {
        padding: 14px 6px;
        min-height: 65px;
    }
    #listone-giocatori .player-table tbody tr {
        height: 70px;
    }
    #listone-giocatori .player-name-cell {
        font-size: 0.95rem;
        max-width: 120px;
    }
    #listone-giocatori .role-badge {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    #listone-giocatori .filter-button {
        padding: 10px 14px;
        font-size: 0.9rem;
        min-height: 44px;
    }
    #listone-giocatori #searchPlayer {
        padding: 14px 18px;
        font-size: 1rem;
    }
}

/* === Small Phone === */
@media (max-width: 480px) {
    .header-content {
        min-height: 90px;
    }
    .header-title-container {
        gap: 8px;
    }
    .logo {
        height: 40px;
        width: 40px;
        border-radius: 8px;
    }
    .header-content h1 {
        font-size: 1.9rem;
        font-weight: 700;
    }
    .main-header.scrolled .header-content {
        min-height: 45px;
    }
    .main-header.scrolled .logo {
        height: 25px;
        width: 25px;
        border-radius: 6px;
    }
    .main-header.scrolled .header-content h1 {
        font-size: 1.3rem;
        font-weight: 700;
    }
    .theme-toggle-container {
        right: 10px;
    }
    .version-label {
        left: 10px;
        font-size: 0.75rem;
        padding: 2px 6px;
    }
    
    .menu-navigation-section {
        margin-top: 25px;
    }
    .modern-navigation {
        gap: 4px;
        padding: 4px 2px;
    }
    .modern-nav-item {
        min-width: 70px;
        padding: 12px 6px;
    }
    .modern-nav-icon {
        width: 18px;
        height: 18px;
        margin-bottom: 4px;
    }
    .modern-nav-label {
        font-size: 0.7rem;
    }
    
    .taskbar {
        padding: 8px 4px !important;
    }
    .taskbar-item {
        min-width: 40px !important;
        padding: 5px 1px !important;
    }
    .taskbar-item::before {
        font-size: 1.2rem !important;
        width: 20px;
        height: 20px;
    }
    
    .splash-logo-img {
        width: 60px;
        height: 60px;
    }
    .splash-logo-text {
        font-size: 2rem;
    }
    .splash-subtitle {
        font-size: 1rem;
        max-width: 250px;
    }
    
    .vertical-football-field {
        aspect-ratio: 1/1.2;
        padding: 6px 0;
    }
    .player-card {
        min-width: 55px;
        padding: 4px 2px;
    }
    .player-name {
        font-size: 0.6rem;
        max-width: 50px;
    }
    .player-details {
        font-size: 0.5rem;
        max-width: 50px;
    }
    .player-score {
        font-size: 0.6rem;
    }
    .player-line {
        gap: 3px;
        flex-wrap: wrap;
    }
    .line-label {
        position: relative;
        left: 0;
        top: 0;
        transform: none;
        width: 100%;
        text-align: center;
        margin-bottom: 3px;
        order: -1;
    }
    
    #specialisti-squadre .teams-scroll-container {
        gap: 6px;
    }
    #specialisti-squadre .team-selector {
        min-width: 65px;
        padding: 5px 6px;
    }
    #specialisti-squadre .team-logo-small {
        width: 24px;
        height: 24px;
    }
    #specialisti-squadre .team-details {
        padding: 12px;
    }
}

/* === Ultra-Small Phone === */
@media (max-width: 380px) {
    .header-title-container {
        gap: 6px;
    }
    .logo {
        height: 35px;
        width: 35px;
    }
    .header-content h1 {
        font-size: 1.7rem;
    }
    .main-header.scrolled .logo {
        height: 22px;
        width: 22px;
    }
    .main-header.scrolled .header-content h1 {
        font-size: 1.2rem;
    }
}

/* === High-contrast logo for light mode === */
[data-theme="light"].high-contrast .logo,
[data-theme="light"] .logo.high-contrast {
    border: 3px solid #374151;
    background: #ffffff;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.15),
        0 0 0 2px rgba(255, 255, 255, 0.5);
    filter: contrast(1.2) saturate(1.1);
}

/* === High-res logo sharpening === */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    [data-theme="light"] .logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* === Safari iOS Fix === */
@supports (-webkit-touch-callout: none) {
    .taskbar {
        -webkit-backdrop-filter: blur(20px);
    }
    .taskbar-item::before {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* =========================================
   iOS 26 LIQUID GLASS SYSTEM (CORE)
   ========================================= */
:root {
    /* --- Dark Mode (Default) --- */
    --liquid-bg: rgba(20, 25, 40, 0.65);
    --liquid-border: rgba(255, 255, 255, 0.12);
    --liquid-shine: rgba(255, 255, 255, 0.15);
    --liquid-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --liquid-blur: blur(25px) saturate(190%) contrast(110%);
    --liquid-inner-glow: inset 0 1px 1px rgba(255, 255, 255, 0.25), inset 0 0 20px rgba(255, 255, 255, 0.02);
    --pill-radius: 50px;
    --card-radius: 24px;
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --accent-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --bg-body: #050505;
}

[data-theme="light"] {
    /* --- Light Mode (Water Effect) --- */
    --liquid-bg: rgba(255, 255, 255, 0.65);
    --liquid-border: rgba(255, 255, 255, 0.6);
    --liquid-shine: rgba(255, 255, 255, 0.8);
    --liquid-shadow: 0 10px 40px -10px rgba(0, 100, 255, 0.15);
    --liquid-blur: blur(30px) saturate(220%);
    --liquid-inner-glow: inset 0 2px 4px rgba(255, 255, 255, 0.9), inset 0 -2px 4px rgba(0, 0, 0, 0.02);
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --bg-body: #f0f4f8;
}

/* === BASE & ANIMATIONS === */
body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'SF Pro Display', 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    /* Spazio extra per le pillole fluttuanti */
    padding-top: 140px; 
    padding-bottom: 120px;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.5s ease;
}

/* Sfondo Animato Fluido */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -999;
    background: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
    filter: blur(60px);
    animation: floatBackground 20s ease-in-out infinite alternate;
}

@keyframes floatBackground {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

/* === LIQUID CARD (Universal Class) === */
.card, .section-content, #main-menu, .player-slot {
    background: var(--liquid-bg);
    backdrop-filter: var(--liquid-blur);
    -webkit-backdrop-filter: var(--liquid-blur);
    border: 1px solid var(--liquid-border);
    border-top: 1px solid var(--liquid-shine);
    box-shadow: var(--liquid-shadow), var(--liquid-inner-glow);
    border-radius: var(--card-radius);
    color: var(--text-main);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px) scale(1.005);
    box-shadow: 0 15px 40px rgba(0,0,0,0.25), var(--liquid-inner-glow);
}

/* === HEADER (Floating Pill Style) === */
.main-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    height: auto;
    background: var(--liquid-bg) !important;
    backdrop-filter: var(--liquid-blur) !important;
    -webkit-backdrop-filter: var(--liquid-blur) !important;
    border: 1px solid var(--liquid-border) !important;
    border-top: 1px solid var(--liquid-shine) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2), var(--liquid-inner-glow) !important;
    border-radius: 32px !important; /* Pillola grande */
    z-index: 1000;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Header Scrolled (Mini Pill) */
.main-header.scrolled {
    top: 10px;
    width: auto;
    min-width: 180px;
    padding: 8px 20px !important;
    border-radius: 50px !important; /* Pillola stretta */
    background: rgba(20, 25, 40, 0.85) !important;
}

[data-theme="light"] .main-header.scrolled {
    background: rgba(255, 255, 255, 0.85) !important;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    transition: all 0.4s ease;
}

.header-title-container {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.4s ease;
}

/* Logo Logic */
.logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.4s ease;
}

.main-header.scrolled .header-title-container {
    flex-direction: row;
    gap: 8px;
}

.main-header.scrolled .logo {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.main-header.scrolled .header-content h1 {
    font-size: 1.1rem !important;
    background: var(--text-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: var(--text-main);
    margin: 0;
}

.main-header.scrolled .header-content p,
.main-header.scrolled .version-label {
    display: none;
    opacity: 0;
}

/* Titolo Header */
.header-content h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 5px 0;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: font-size 0.4s ease;
}

.header-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    transition: opacity 0.3s ease;
}

/* Theme Toggle in Header */
.theme-toggle-container {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.theme-toggle {
    background: rgba(255,255,255,0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    transition: background 0.3s;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.2);
}

/* === TASKBAR (Floating Pill Style) === */
.taskbar {
    position: fixed;
    bottom: 30px; /* Staccata dal fondo */
    left: 50%;
    transform: translateX(-50%) !important;
    width: auto !important;
    max-width: 90% !important;
    background: var(--liquid-bg) !important;
    backdrop-filter: var(--liquid-blur) !important;
    -webkit-backdrop-filter: var(--liquid-blur) !important;
    border: 1px solid var(--liquid-border) !important;
    border-top: 1px solid var(--liquid-shine) !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3), var(--liquid-inner-glow) !important;
    border-radius: 50px !important; /* Pillola perfetta */
    padding: 8px 20px !important;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.taskbar-content {
    display: flex;
    gap: 25px; /* Spazio tra le icone */
    justify-content: center;
    align-items: center;
}

.taskbar-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
}

.taskbar-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Icone Taskbar */
.taskbar-item::before {
    content: '';
    width: 26px;
    height: 26px;
    background-color: var(--text-muted);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    transition: background-color 0.3s ease;
}

.taskbar-item.active::before,
.taskbar-item:hover::before {
    background-color: #3b82f6; /* Colore attivo */
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
}

/* Nascondi etichette testuali nella taskbar pill */
.taskbar-label {
    display: none !important;
}

/* Indicatore attivo (dot sotto icona) */
.taskbar-item.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    background: #3b82f6;
    border-radius: 50%;
    box-shadow: 0 0 6px #3b82f6;
}

/* === SPLASH SCREEN (Liquid Mode) === */
#splash-screen {
    background: var(--bg-body);
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

/* Light Mode Splash Overlay */
[data-theme="light"] #splash-screen {
    background: radial-gradient(circle at center, #ffffff 0%, #e0f2fe 100%);
}

.splash-logo-img {
    width: 100px;
    height: 100px;
    filter: drop-shadow(0 10px 20px rgba(59, 130, 246, 0.4));
    animation: liquidBounce 3s ease-in-out infinite;
}

@keyframes liquidBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
}

.splash-logo-text {
    font-size: 2.8rem;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 20px;
    letter-spacing: -1px;
}

.bar-loader {
    background: rgba(139, 92, 246, 0.2);
    height: 6px;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 30px;
}

.bar-loader::before {
    background: var(--accent-gradient);
    box-shadow: 0 0 15px #3b82f6;
}

/* === MODERN NAVIGATION (Menu Orizzontale) === */
.modern-navigation {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 5px;
    scrollbar-width: none; /* Firefox */
}
.modern-navigation::-webkit-scrollbar { display: none; }

.modern-nav-item {
    flex: 0 0 auto;
    min-width: 90px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--liquid-border);
    border-radius: 20px;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modern-nav-item:hover, .modern-nav-item:active {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    transform: scale(1.05);
}

.modern-nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    background: var(--accent-gradient);
    margin-bottom: 8px;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.modern-nav-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-main);
}

/* === ELEMENTS & INPUTS === */
input, select, .btn-primary, .btn-success, .section-toggle {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--liquid-border) !important;
    border-radius: 16px !important;
    color: var(--text-main) !important;
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* Input Light Mode Adjustment */
[data-theme="light"] input, 
[data-theme="light"] select {
    background: rgba(255, 255, 255, 0.5) !important;
    border-color: rgba(0,0,0,0.1) !important;
    color: #000 !important;
}

input:focus, select:focus {
    outline: none;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), inset 0 1px 2px rgba(0,0,0,0.1);
}

.btn-primary {
    background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(139,92,246,0.2)) !important;
    border: 1px solid rgba(139,92,246,0.3) !important;
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(59,130,246,0.4), rgba(139,92,246,0.4)) !important;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

/* === FOOTBALL FIELD (Formazione) === */
.football-field-container {
    background: rgba(0,0,0,0.2);
    border-radius: 24px;
    padding: 10px;
}

.vertical-football-field {
    background: linear-gradient(180deg, #1a4a2e 0%, #256a3e 100%);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.5);
}

[data-theme="light"] .vertical-football-field {
    background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
    border: 4px solid #fff;
}

/* Player Card inside Field */
.player-card {
    background: var(--liquid-bg);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* === SEZIONI & DETTAGLI === */
.section-group-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 40px 0 20px;
    padding-left: 10px;
    border-left: 4px solid #3b82f6;
    background: linear-gradient(90deg, var(--text-main), transparent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Toggles */
.section-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-align: left;
    margin-bottom: 10px;
}

.section-content {
    overflow: hidden;
    max-height: 2000px;
    opacity: 1;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-content.closed {
    max-height: 0;
    opacity: 0;
    padding: 0;
    border: none;
    margin: 0;
}

/* === RESPONSIVE (Mobile) === */
@media (max-width: 768px) {
    .main-header {
        width: 92%;
        padding: 12px 16px;
    }
    
    .header-content h1 {
        font-size: 1.6rem;
    }
    
    .taskbar {
        bottom: 20px;
        padding: 6px 15px !important;
        gap: 15px;
    }
    
    .taskbar-item {
        width: 38px;
        height: 38px;
    }
    
    .card {
        border-radius: 20px;
        padding: 16px;
    }
    
    .modern-nav-item {
        min-width: 80px;
        padding: 12px 8px;
    }
}

@media (max-width: 380px) {
    .header-content h1 { font-size: 1.4rem; }
    .taskbar-content { gap: 15px; }
}

/* === UTILITIES === */
.highlight { color: #fbbf24; font-weight: bold; }
.positive { color: #34d399; }
.negative { color: #f87171; }

/* Scrollbar invisibile ma funzionale */
::-webkit-scrollbar {
    width: 6px;
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 10px;
}