:root {
    --purple: #6B73FF;
    --purple-dark: #5158E0;
    --purple-light: #8B7FD4;
    --coral: #E76F51;
    --coral-dark: #D45A3F;
    --dark: #000000;
    --dark-panel: #0a0a0a;
    --panel: rgba(255, 255, 255, 0.02);
    --border: rgba(255, 255, 255, 0.08);
    --text: #f8f9fb;
    --muted: rgba(255, 255, 255, 0.6);
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #000000;
    color: var(--text);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    opacity: 1 !important;
    transition: none !important;
    animation: none !important;
}

/* Grid Background */
body::before {
    content: "";
    position: fixed;
    inset: 0;
        background-image:
            linear-gradient(rgba(107, 115, 255, 0.02) 1px, transparent 1px),
            linear-gradient(90deg, rgba(107, 115, 255, 0.02) 1px, transparent 1px);
        background-size: 120px 120px;
        opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1400px, 95vw);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Loading States */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(107, 115, 255, 0.2);
    border-top-color: var(--purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-skeleton {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.03) 0%, 
        rgba(255, 255, 255, 0.06) 50%, 
        rgba(255, 255, 255, 0.03) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

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

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

.toast {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(107, 115, 255, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    animation: slideInRight 0.3s ease forwards;
}

@keyframes slideInRight {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-color: rgba(74, 222, 128, 0.3);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.3);
}

.toast.warning {
    border-color: rgba(251, 191, 36, 0.3);
}

.toast.info {
    border-color: rgba(107, 115, 255, 0.3);
}

/* Toast icons now use the icon system from icons.css */

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--text);
}

.toast-message {
    font-size: 0.85rem;
    color: var(--muted);
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-trigger {
    cursor: help;
    margin-left: 6px;
    opacity: 0.7;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tooltip-trigger:hover {
    opacity: 1;
}

.tooltip-content {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(107, 115, 255, 0.2);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--text);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    max-width: 250px;
    white-space: normal;
}

.tooltip:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(107, 115, 255, 0.2);
}

/* Help Text */
.help-text {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.help-text::before {
    content: 'i';
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--purple);
    border-radius: 50%;
    color: var(--purple);
    font-weight: bold;
    font-size: 11px;
    font-style: italic;
    margin-right: 6px;
    flex-shrink: 0;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 500;
}

.breadcrumbs a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: var(--purple);
}

.breadcrumbs span {
    color: var(--muted);
    opacity: 0.5;
}

.breadcrumbs .current {
    color: var(--text);
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}

.section-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.section-title {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Smooth Transitions */
* {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Focus States for Accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 2px solid var(--purple);
    outline-offset: 2px;
}

/* Better Button States */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: scale(0.98);
}

/* Navigation */
/* Connection Status Indicator */
.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    margin-left: auto;
    margin-right: 16px;
    transition: all 0.3s ease;
}

.connection-status-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--muted);
    transition: all 0.3s ease;
}

.connection-status-connected .connection-status-icon {
    background: var(--success);
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.connection-status-online .connection-status-icon {
    background: var(--warning);
}

.connection-status-limited .connection-status-icon {
    background: var(--warning);
    animation: blink 1s ease-in-out infinite;
}

.connection-status-offline .connection-status-icon {
    background: var(--danger);
    animation: blink 1s ease-in-out infinite;
}

.connection-status-text {
    color: var(--muted);
    font-weight: 500;
}

.connection-status-connected .connection-status-text {
    color: var(--success);
}

.connection-status-online .connection-status-text {
    color: var(--warning);
}

.connection-status-limited .connection-status-text {
    color: var(--warning);
}

.connection-status-offline .connection-status-text {
    color: var(--danger);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.85);
    border-bottom: 1px solid rgba(107, 115, 255, 0.15);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1400px, 95vw);
    margin: 0 auto;
    gap: 24px;
}

.brand,
a.brand {
    display: inline-flex;
    align-items: center;
    gap: 0;
    position: relative;
    cursor: pointer;
    transition: opacity 0.2s ease;
    text-decoration: none;
    color: inherit;
}

a.brand:hover {
    /* No visual change on hover - keep it subtle */
}

.logo-wrapper {
    position: relative;
    display: inline-block;
    overflow: visible;
}

.brand img {
    height: 34px;
    width: auto;
    display: block;
    margin-right: 2px;
    padding: 0;
    position: relative;
    mask-image: linear-gradient(to right, black 0%, black 80%, rgba(0,0,0,0.98) 88%, rgba(0,0,0,0.9) 92%, rgba(0,0,0,0.7) 96%, rgba(0,0,0,0.4) 98%, rgba(0,0,0,0.15) 99.5%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 0%, black 80%, rgba(0,0,0,0.98) 88%, rgba(0,0,0,0.9) 92%, rgba(0,0,0,0.7) 96%, rgba(0,0,0,0.4) 98%, rgba(0,0,0,0.15) 99.5%, transparent 100%);
    mask-size: 100% 100%;
    -webkit-mask-size: 100% 100%;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
}

.logo {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.4rem;
    font-weight: 900;
    background: linear-gradient(90deg, #ffffff 0%, #c4c7ff 40%, #9b8fe0 70%, #8b7fd4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.02em;
    margin-left: 0;
}

.nav-links {
    display: flex;
    gap: 6px;
    align-items: center;
    color: var(--muted);
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-link {
    padding: 8px 14px;
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--muted);
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.01em;
    will-change: transform, color;
}

.notification-badge,
.risk-alert-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--coral);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    min-width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    z-index: 10;
    line-height: 1;
    font-family: 'Inter', sans-serif;
}

.notification-badge.critical,
.risk-alert-badge.critical {
    background: #ef4444;
    animation: pulse 2s infinite;
}

.notification-badge.warning,
.risk-alert-badge.warning {
    background: var(--coral);
}

/* Notifications Panel - Unified with Risk Alerts */
.notifications-panel {
    position: fixed;
    top: 80px;
    right: 24px;
    width: 380px;
    max-height: calc(100vh - 120px);
    background: rgba(20, 20, 25, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(107, 115, 255, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    visibility: hidden;
}

.notifications-panel.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    visibility: visible;
}

.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(107, 115, 255, 0.2);
    background: rgba(107, 115, 255, 0.05);
}

.notifications-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.3px;
    font-family: 'Inter', sans-serif;
}

.close-btn,
.risk-alerts-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--muted);
    padding: 0;
}

.close-btn:hover,
.risk-alerts-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text);
}

.notifications-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    min-height: 200px;
    max-height: calc(100vh - 280px);
}

.notifications-content::-webkit-scrollbar {
    width: 6px;
}

.notifications-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.notifications-content::-webkit-scrollbar-thumb {
    background: rgba(107, 115, 255, 0.4);
    border-radius: 3px;
}

.notifications-content::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 115, 255, 0.6);
}

.empty-notifications {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
    min-height: 200px;
}

.empty-notifications .icon {
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-notifications p {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.empty-notifications small {
    font-size: 12px;
    color: var(--muted);
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification-item {
    background: rgba(20, 20, 25, 0.8);
    border-left: 3px solid rgba(107, 115, 255, 0.5);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
    animation: slideIn 0.3s ease;
}

.notification-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, rgba(107, 115, 255, 0.8), rgba(139, 92, 246, 0.8));
    border-radius: 0 2px 2px 0;
}

.notification-item:hover {
    background: rgba(20, 20, 25, 0.9);
    transform: translateX(2px);
}

.notification-item.critical {
    border-left-color: rgba(239, 68, 68, 0.6);
    background: rgba(20, 20, 25, 0.85);
}

.notification-item.critical::before {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.8), rgba(220, 38, 38, 0.8));
}

.notification-item.warning {
    border-left-color: rgba(231, 111, 81, 0.6);
    background: rgba(20, 20, 25, 0.85);
}

.notification-item.warning::before {
    background: linear-gradient(180deg, rgba(231, 111, 81, 0.8), rgba(217, 70, 70, 0.8));
}

.notification-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.9;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.2px;
}

.notification-message {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--text);
    line-height: 1.5;
}

.notification-time {
    font-size: 12px;
    color: var(--muted);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.2px;
}

.notification-dismiss {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--muted);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.notification-dismiss:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text);
    transform: scale(1.05);
}

.notifications-footer {
    padding: 12px 20px;
    border-top: 1px solid rgba(107, 115, 255, 0.2);
    background: rgba(107, 115, 255, 0.03);
}

@media (max-width: 768px) {
    .notifications-panel,
    .risk-alerts-panel {
        right: 10px;
        left: 10px;
        width: auto;
        max-height: calc(100vh - 90px);
    }
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, var(--purple), var(--coral));
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.nav-link.active {
    color: var(--text);
    background: rgba(107, 115, 255, 0.12);
    font-weight: 600;
}

.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        gap: 12px;
        border-bottom: 1px solid rgba(107, 115, 255, 0.15);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-links.mobile-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 14px 16px;
    }
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid rgba(107, 115, 255, 0.2);
    position: relative;
}

.user-menu::after {
    content: '';
    position: absolute;
    right: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 24px;
    background: rgba(107, 115, 255, 0.2);
}

.logout-btn {
    margin-left: 12px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(231, 111, 81, 0.3);
    border-radius: 8px;
    color: var(--coral);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.logout-btn:hover {
    background: rgba(231, 111, 81, 0.1);
    border-color: var(--coral);
}

.user-profile-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.25s ease;
    cursor: pointer;
}

.user-profile-link:hover {
    background: rgba(107, 115, 255, 0.1);
}

.user-profile-link:hover .user-name {
    color: var(--text);
}

.user-profile-link:hover .user-avatar {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(107, 115, 255, 0.3);
}

.user-name {
    color: var(--muted);
    font-size: 0.9rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--coral));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 0.9rem;
}

/* Main Content */
.main-content {
    margin-top: 80px;
    padding: 40px 0;
    min-height: calc(100vh - 80px);
    opacity: 1;
}

/* Sport Selection Panel */
.sport-selection-panel {
    padding: 60px 0;
}

.panel-header {
    text-align: center;
    margin-bottom: 50px;
}

.panel-header h1 {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 12px;
    background: linear-gradient(90deg, #ffffff 0%, #c4c7ff 40%, #9b8fe0 70%, #8b7fd4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.panel-header p {
    color: var(--muted);
    font-size: 1.1rem;
}

.sports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.sport-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.sport-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--purple), var(--coral));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.sport-card:hover {
    border-color: var(--purple);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.sport-card:hover::before {
    transform: scaleX(1);
}

.sport-card.active {
    border-color: var(--purple);
    background: rgba(107, 115, 255, 0.1);
}

.sport-card.active::before {
    transform: scaleX(1);
}

.sport-card h3 {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.25rem;
    margin-bottom: 6px;
    color: var(--text);
    letter-spacing: -0.02em;
}

.sport-card p {
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.sport-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--purple), var(--coral));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1.5rem;
}

/* Dashboard View */
.dashboard-view {
    padding: 40px 0;
}

.dashboard-view.hidden {
    display: none;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 16px;
}

.dashboard-header h1 {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.subtitle {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--coral);
    color: white;
    box-shadow: 0 8px 24px rgba(231, 111, 81, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(231, 111, 81, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--purple);
    background: rgba(107, 115, 255, 0.1);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Metrics Section */
.metric-group {
    margin-bottom: 24px;
}

.metric-group-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
}

.metrics-section {
    margin-bottom: 50px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 20px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.4s ease;
    min-height: auto;
    cursor: pointer;
}

.metric-card:hover {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(107, 115, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(107, 115, 255, 0.1);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 10px;
}

.metric-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
    letter-spacing: 0.01em;
}

.metric-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-good {
    background: rgba(74, 222, 128, 0.2);
    color: var(--success);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.badge-warning {
    background: rgba(251, 191, 36, 0.2);
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.metric-value {
    font-family: 'Unbounded', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--coral);
    margin-bottom: 12px;
}

.metric-unit {
    color: var(--muted);
    font-size: 0.85rem;
    margin-left: 4px;
}

.metric-description {
    display: none; /* Hidden for cleaner, more concise cards */
}

.metric-trend {
    display: none; /* Hidden for cleaner, more concise cards */
}

.trend-up {
    color: var(--danger);
}

.trend-down {
    color: var(--success);
}

/* Visualization Section */
.visualization-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
    margin-top: 50px;
}

.chart-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-container:hover {
    border-color: rgba(107, 115, 255, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.chart-title {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    margin: 0 0 20px 0;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.chart-placeholder {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px dashed var(--border);
    color: var(--muted);
}

/* Dashboard Header Enhancements */
.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.2rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.athlete-selector {
    position: relative;
}

.select-input {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 16px;
    color: var(--text);
    font-size: 0.95rem;
    cursor: pointer;
    min-width: 200px;
    transition: all 0.25s ease;
}

.select-input:hover {
    border-color: var(--purple);
}

.select-input:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(107, 115, 255, 0.1);
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card-mini {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px 18px;
    text-align: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.stat-card-mini:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(107, 115, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(107, 115, 255, 0.1);
}

.stat-label {
    color: var(--muted);
    font-size: 0.7rem;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.stat-value {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--coral);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.metric-progress {
    margin-top: 16px;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.metric-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--purple), var(--coral));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.metric-sparkline {
    margin-top: 12px;
    height: 40px;
    opacity: 0.6;
}

/* Chart Enhancements */
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.chart-controls {
    display: flex;
    gap: 8px;
}

.chart-btn {
    padding: 6px 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.chart-btn:hover {
    border-color: var(--purple);
    color: var(--text);
}

.chart-btn.active {
    background: var(--purple);
    border-color: var(--purple);
    color: white;
}

.chart-wrapper {
    position: relative;
    height: 300px;
    padding: 10px;
}

.chart-wrapper canvas {
    max-height: 100%;
}

.chart-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--muted);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* Session History */
.session-history-section {
    margin-top: 50px;
}

.notes-section {
    margin-top: 50px;
}

.notes-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.note-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
}

.note-card:hover {
    border-color: var(--purple);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.note-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.note-date {
    color: var(--muted);
    font-size: 0.8rem;
}

.note-content {
    color: var(--text);
    line-height: 1.6;
    font-size: 0.9rem;
    margin-bottom: 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.note-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.note-actions button {
    padding: 6px 12px;
    font-size: 0.8rem;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.note-actions button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.empty-notes {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
}

.empty-notes p {
    margin-top: 12px;
    font-size: 0.9rem;
}

/* Note Modal */
.note-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.note-modal.active {
    display: flex;
}

.note-modal-content {
    background: var(--dark-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.note-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.note-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.note-modal-close {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s ease;
}

.note-modal-close:hover {
    color: var(--text);
}

.note-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.note-form textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
}

.note-form textarea:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(107, 115, 255, 0.1);
}

.note-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.sessions-list {
    display: grid;
    gap: 16px;
}

.session-item {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.session-item:hover {
    border-color: var(--purple);
    transform: translateX(4px);
}

.session-info {
    flex: 1;
}

.session-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.session-meta {
    display: flex;
    gap: 16px;
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 8px;
}

.session-actions {
    display: flex;
    gap: 8px;
}

.session-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.session-btn:hover {
    border-color: var(--purple);
    color: var(--text);
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--purple);
    animation: spin 1s linear infinite;
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sport-card {
    animation: fadeIn 0.3s ease;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--dark-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

/* Search and Filter */
.search-container {
    position: relative;
    flex: 1;
}

.search-bar {
    position: relative;
    margin-bottom: 0;
}

.search-input {
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px 10px 40px;
    color: var(--text);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.search-input:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(107, 115, 255, 0.1);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.search-results {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--dark-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    margin-top: 4px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(107, 115, 255, 0.1);
}

.search-result-item.no-results {
    cursor: default;
    color: var(--muted);
    justify-content: center;
    padding: 20px;
}

.search-result-item.no-results:hover {
    background: transparent;
}

.search-result-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--coral));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.search-result-details {
    font-size: 0.85rem;
    color: var(--muted);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 20px;
}

.page-header > div:first-child {
    flex: 1;
    min-width: 0;
}

.page-header h1 {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    margin: 0 0 6px 0;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.page-header .subtitle {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    letter-spacing: 0.01em;
}

/* Section Controls */
.section-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.search-bar {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-input {
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px 10px 40px;
    color: var(--text);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.search-input:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(107, 115, 255, 0.1);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

/* Athletes Grid */
.athletes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.athlete-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.athlete-card:hover {
    border-color: var(--purple);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.athlete-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.athlete-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--coral));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1.2rem;
}

.athlete-info h3 {
    font-size: 1.05rem;
    margin-bottom: 3px;
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.athlete-info p {
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.01em;
}

.athlete-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.athlete-stat {
    text-align: center;
}

.athlete-stat-fpi-web {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0;
    min-height: 120px;
    position: relative;
}

.athlete-stat-fpi-web canvas {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.athlete-stat-value {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--coral);
    margin-bottom: 3px;
    letter-spacing: -0.02em;
}

.athlete-stat-label {
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Analytics Grid */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
}

.chart-container.large {
    grid-column: 1 / -1;
}

/* Sessions Filters */
.sessions-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.sessions-filters .select-input {
    min-width: 200px;
}

/* Foot Pressure Heat Map */
.heatmap-container {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    margin-top: 24px;
}

.heatmap-wrapper {
    display: flex;
    justify-content: center;
    gap: 60px;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.foot-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.foot-label {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.foot-canvas {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.heatmap-legend {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.85rem;
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.2s ease;
}

.modal[style*="flex"],
.modal[style*="display: flex"],
.modal.modal-visible {
    display: flex !important;
}

.modal[style*="flex"] {
    display: flex !important;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: rgba(15, 15, 20, 0.98);
    border: 1px solid rgba(107, 115, 255, 0.2);
    border-radius: 16px;
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.modal-header h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.2s ease;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    transform: scale(1.05);
}

.modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
}

.form-input,
.input-field {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
    letter-spacing: 0.01em;
}

.form-input:hover,
.input-field:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
}

.form-input:focus,
.input-field:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(107, 115, 255, 0.15);
}

.form-input::placeholder,
.input-field::placeholder {
    color: var(--muted);
    opacity: 0.6;
}

textarea.input-field {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-help {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.85rem;
}

.modal-actions,
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.form-actions .btn {
    min-width: 120px;
    justify-content: center;
}

/* Player Search Results */
.player-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--dark-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    margin-top: 4px;
    display: none;
}

.player-search-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border);
}

.player-search-item:last-child {
    border-bottom: none;
}

.player-search-item:hover {
    background: rgba(107, 115, 255, 0.1);
}

.player-search-item.no-results {
    cursor: default;
    color: var(--muted);
    text-align: center;
    padding: 20px;
}

.player-search-item.no-results:hover {
    background: transparent;
}

.player-search-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.player-search-meta {
    font-size: 0.85rem;
    color: var(--muted);
}

.selected-player-card {
    background: rgba(107, 115, 255, 0.1);
    border: 1px solid var(--purple);
    border-radius: 12px;
    padding: 16px;
    margin-top: 8px;
}

.selected-player-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.selected-player-name {
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
}

.selected-player-details {
    font-size: 0.85rem;
    color: var(--muted);
}

/* Placeholder Styles */
.placeholder-metric {
    grid-column: 1 / -1;
    background: var(--panel);
    border: 1px dashed var(--border);
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.placeholder-metric:hover {
    border-color: var(--purple);
    background: rgba(107, 115, 255, 0.05);
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.placeholder-icon {
    font-size: 3rem;
    opacity: 0.5;
}

.placeholder-content p {
    color: var(--muted);
    font-size: 1rem;
    margin: 0;
}

.placeholder-content small {
    color: var(--muted);
    font-size: 0.85rem;
    opacity: 0.7;
}

.placeholder-session {
    background: var(--panel);
    border: 1px dashed var(--border);
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.placeholder-session:hover {
    border-color: var(--purple);
    background: rgba(107, 115, 255, 0.05);
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* Placeholder icons now use the icon system from icons.css */

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

.placeholder-content p {
    color: var(--muted);
    font-size: 1rem;
    margin: 0;
}

.placeholder-content small {
    color: var(--muted);
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Settings Page Styles */
.settings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.settings-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 16px 24px;
    color: var(--muted);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    bottom: -1px;
}

.settings-tab:hover {
    color: var(--text);
    background: rgba(107, 115, 255, 0.05);
}

.settings-tab.active {
    color: var(--purple);
    border-bottom-color: var(--purple);
    background: transparent;
}

.settings-tab-content {
    display: none;
}

.settings-tab-content.active {
    display: block;
}

.settings-section {
    margin-bottom: 50px;
}

.profile-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--coral));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 2rem;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
    min-width: 200px;
}

.profile-info h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text);
}

.profile-info p {
    color: var(--muted);
    margin-bottom: 4px;
}

.profile-sport {
    color: var(--purple) !important;
    font-weight: 600;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.overview-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.overview-card:hover {
    border-color: var(--purple);
    transform: translateY(-2px);
}

.overview-card.danger {
    border-color: rgba(239, 68, 68, 0.3);
}

.overview-card.danger:hover {
    border-color: var(--danger);
}

.overview-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(107, 115, 255, 0.15), rgba(231, 111, 81, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.overview-content {
    flex: 1;
}

.overview-value {
    font-family: 'Unbounded', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--coral);
    margin-bottom: 4px;
}

.overview-label {
    color: var(--muted);
    font-size: 0.9rem;
}

.players-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.player-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.player-card:hover {
    border-color: var(--purple);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.player-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--coral));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.player-info {
    flex: 1;
    min-width: 0;
}

.player-info h4 {
    font-size: 0.95rem;
    margin-bottom: 2px;
    color: var(--text);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-info p {
    color: var(--muted);
    font-size: 0.75rem;
}

.player-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.player-stat {
    text-align: center;
}

.player-stat .stat-label {
    display: block;
    color: var(--muted);
    font-size: 0.7rem;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.player-stat .stat-value {
    display: block;
    font-family: 'Unbounded', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.settings-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text);
}

.setting-info p {
    color: var(--muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 14px 0;
    }

    .nav-container {
        flex-wrap: wrap;
    }

    .nav-links {
        width: 100%;
        margin-top: 12px;
        justify-content: space-between;
    }

    .main-content {
        margin-top: 120px;
    }

    .sports-grid {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .visualization-section {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
    }

    .header-left,
    .header-right {
        width: 100%;
    }

    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-wrapper {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .quick-stats {
        grid-template-columns: 1fr;
    }

    .header-actions {
        width: 100%;
    }

    .header-actions .btn {
        flex: 1;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .players-list {
        grid-template-columns: 1fr;
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Analytics Page Styles */
.analytics-filters {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--dark-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 500;
}

.date-input {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
}

.date-input:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(107, 115, 255, 0.1);
}

.trend-summary-container,
.risk-summary-container {
    padding: 16px;
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border-top: 1px solid var(--border);
}

.trend-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
}

.trend-item.positive {
    border-left: 3px solid var(--success);
}

.trend-item.negative {
    border-left: 3px solid var(--danger);
}

.trend-item.neutral {
    border-left: 3px solid var(--muted);
}

.trend-label {
    font-size: 0.9rem;
    color: var(--muted);
}

.trend-value {
    font-weight: 600;
    font-size: 0.95rem;
}

.trend-item.positive .trend-value {
    color: var(--success);
}

.trend-item.negative .trend-value {
    color: var(--danger);
}

.trend-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.trend-stat {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.trend-stat.positive {
    background: rgba(74, 222, 128, 0.1);
    color: var(--success);
}

.trend-stat.negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.trend-stat.neutral {
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
}

.risk-summary {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.risk-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    border-radius: 8px;
    flex: 1;
    min-width: 120px;
}

.risk-item.high {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.risk-item.medium {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.risk-item.low {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.risk-label {
    font-size: 0.85rem;
    color: var(--muted);
}

.risk-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.risk-item.high .risk-value {
    color: var(--danger);
}

.risk-item.medium .risk-value {
    color: var(--warning);
}

.risk-item.low .risk-value {
    color: var(--success);
}

.comparison-selectors {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.selector-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selector-group label {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 500;
}

.player-select {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
}

.player-select:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(107, 115, 255, 0.1);
}

.player-comparison-container {
    padding: 20px;
    min-height: 200px;
}

.comparison-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.comparison-header h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
}

.comparison-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.comparison-metric {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    border-left: 3px solid var(--muted);
}

.comparison-metric.player1 {
    border-left-color: var(--purple);
}

.comparison-metric.player2 {
    border-left-color: var(--coral);
}

.comparison-metric.similar {
    border-left-color: var(--muted);
}

.metric-name {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.metric-values .value {
    font-size: 1.2rem;
    font-weight: 600;
}

.metric-values .value.player1 {
    color: var(--purple);
}

.metric-values .value.player2 {
    color: var(--coral);
}

.metric-diff {
    font-size: 0.9rem;
    color: var(--muted);
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.placeholder-text {
    text-align: center;
    color: var(--muted);
    padding: 40px 20px;
    font-style: italic;
}

/* Virtual Scroll Styles */
.virtual-scroll-viewport {
    position: relative;
    overflow: hidden;
}

.virtual-scroll-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.virtual-item {
    position: absolute;
    left: 0;
    right: 0;
    will-change: transform;
}

/* Lazy Loading Styles */
[data-lazy-chart],
[data-lazy-component] {
    min-height: 200px;
    position: relative;
}

[data-lazy-chart]::before,
[data-lazy-component]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

[data-lazy-chart].loaded::before,
[data-lazy-component].loaded::before {
    opacity: 0;
    pointer-events: none;
}

/* Performance Optimizations */
.chart-container canvas {
    will-change: contents;
}

.player-card {
    will-change: transform;
}

/* Schedule Page Styles */
.schedule-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn.active {
    color: var(--text);
    border-bottom-color: var(--primary);
}

.schedule-content {
    display: none;
}

.schedule-content.active {
    display: block;
}

.plans-section {
    margin-top: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
}

.plan-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.plan-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(107, 115, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.plan-card:hover::before {
    opacity: 1;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.plan-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    flex: 1;
    line-height: 1.4;
}

.plan-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.plan-status.status-active {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.plan-status.status-upcoming {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.plan-status.status-completed {
    background: rgba(107, 115, 255, 0.15);
    color: var(--primary);
    border: 1px solid rgba(107, 115, 255, 0.3);
}

.plan-player {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.875rem;
    margin-bottom: 12px;
}

.plan-description {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.plan-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.plan-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.875rem;
}

.plan-focus {
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.plan-focus strong {
    display: block;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.focus-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.focus-tag {
    padding: 4px 10px;
    background: rgba(107, 115, 255, 0.1);
    border: 1px solid rgba(107, 115, 255, 0.2);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 500;
}

.plan-actions {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 1;
}

.plan-actions .btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.875rem;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 2;
}

.placeholder-plan {
    grid-column: 1 / -1;
    padding: 60px 20px;
    text-align: center;
}

.placeholder-plan .placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.placeholder-plan .icon {
    opacity: 0.3;
}

.placeholder-plan p {
    color: var(--muted);
    font-size: 0.95rem;
}

/* Session Detail Styles */
.session-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.session-header-left h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--text);
}

.session-meta-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.9rem;
}

.session-header-right {
    display: flex;
    gap: 12px;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}


.session-notes-section {
    margin-top: 40px;
}

.notes-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 24px;
}

.notes-text {
    color: var(--text);
    line-height: 1.7;
    font-size: 0.95rem;
}

.session-form-section {
    margin-top: 40px;
}

.session-form-container {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-top: 20px;
}

.session-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Plan View Modal Styles */
.plan-view-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.plan-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.plan-view-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.plan-view-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.plan-view-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-view-value {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.6;
}

/* Responsive Schedule Styles */
@media (max-width: 768px) {
    .plans-grid {
        grid-template-columns: 1fr;
    }
    
    .schedule-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        white-space: nowrap;
        padding: 10px 20px;
    }
    
    .session-detail-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Simulation Mode Panel */
.simulation-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 400px;
    max-height: calc(100vh - 100px);
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(107, 115, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    z-index: 10000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    font-size: 0.9rem;
}

.simulation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.simulation-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.simulation-close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.simulation-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.simulation-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.simulation-controls .btn {
    width: 100%;
    padding: 10px;
    font-size: 0.9rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--muted);
    font-size: 0.85rem;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.simulation-status {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.status-value.active {
    color: var(--warning);
}

.status-value.completed {
    color: var(--success);
}

.status-value.success {
    color: var(--success);
}

.status-value.error {
    color: var(--danger);
}

.simulation-scenarios {
    margin-bottom: 20px;
}

.simulation-scenarios h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.scenario-select {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
}

.scenario-select:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(107, 115, 255, 0.1);
}

.simulation-results {
    margin-top: 20px;
}

.simulation-results h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.results-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-item {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    border-left: 3px solid var(--muted);
}

.result-item.passed {
    border-left-color: var(--success);
}

.result-item.failed {
    border-left-color: var(--danger);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.result-name {
    font-size: 0.85rem;
    color: var(--text);
    font-weight: 500;
}

.result-status {
    font-size: 1rem;
    font-weight: 600;
}

.result-item.passed .result-status {
    color: var(--success);
}

.result-item.failed .result-status {
    color: var(--danger);
}

.result-error {
    font-size: 0.75rem;
    color: var(--danger);
    margin-top: 4px;
    padding: 6px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 4px;
}

.result-meta {
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 4px;
}

/* Scrollbar styling for simulation panel */
.simulation-panel::-webkit-scrollbar,
.results-list::-webkit-scrollbar {
    width: 6px;
}

.simulation-panel::-webkit-scrollbar-track,
.results-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.simulation-panel::-webkit-scrollbar-thumb,
.results-list::-webkit-scrollbar-thumb {
    background: rgba(107, 115, 255, 0.3);
    border-radius: 3px;
}

.simulation-panel::-webkit-scrollbar-thumb:hover,
.results-list::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 115, 255, 0.5);
}

/* Simulation Mode Button removed - use CMD+Shift+S keyboard shortcut instead */

/* ========================================
   Atlas AI Helper Styles
   ======================================== */

/* Atlas Button (Floating) */
.atlas-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--coral));
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 8px 24px rgba(107, 115, 255, 0.4), 0 4px 12px rgba(231, 111, 81, 0.3);
    z-index: 9998;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Unbounded', sans-serif;
    font-weight: 700;
    font-size: 0.7rem;
}

.atlas-button:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 32px rgba(107, 115, 255, 0.5), 0 6px 16px rgba(231, 111, 81, 0.4);
}

.atlas-button.active {
    background: linear-gradient(135deg, var(--purple-dark), var(--coral-dark));
    transform: scale(0.95);
}

.atlas-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.atlas-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.atlas-button-text {
    font-size: 0.65rem;
    letter-spacing: 0.5px;
    line-height: 1;
}

/* Atlas Panel */
.atlas-panel {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 420px;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 140px);
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(107, 115, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(107, 115, 255, 0.1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.atlas-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Atlas Header */
.atlas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(107, 115, 255, 0.05);
}

.atlas-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.atlas-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--purple), var(--coral));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
    padding: 4px;
}

.atlas-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.atlas-header h3 {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--text);
    letter-spacing: -0.01em;
}

.atlas-subtitle {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 2px 0 0 0;
}

.atlas-close {
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.atlas-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

/* Atlas Content */
.atlas-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.atlas-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 200px;
    max-height: 400px;
}

.atlas-messages::-webkit-scrollbar {
    width: 6px;
}

.atlas-messages::-webkit-scrollbar-track {
    background: transparent;
}

.atlas-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.atlas-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Atlas Messages */
.atlas-message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: fadeInMessage 0.3s ease;
}

.atlas-message-user {
    flex-direction: row-reverse;
}

.atlas-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--purple), var(--coral));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
    padding: 2px;
}

.atlas-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.atlas-message-content {
    flex: 1;
    min-width: 0;
}

.atlas-message-user .atlas-message-content {
    display: flex;
    justify-content: flex-end;
}

.atlas-message-text {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.atlas-message-user .atlas-message-text {
    background: rgba(107, 115, 255, 0.15);
    border-color: rgba(107, 115, 255, 0.3);
}

.atlas-message.typing .atlas-message-text {
    animation: typing 1.5s ease-in-out infinite;
}

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

@keyframes typing {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Atlas Input */
.atlas-input-container {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.3);
}

.atlas-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.atlas-input:focus {
    outline: none;
    border-color: var(--purple);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(107, 115, 255, 0.1);
}

.atlas-input::placeholder {
    color: var(--muted);
}

.atlas-send {
    background: linear-gradient(135deg, var(--purple), var(--coral));
    border: none;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.atlas-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(107, 115, 255, 0.4);
}

.atlas-send:active {
    transform: scale(0.95);
}

/* Atlas Quick Actions */
.atlas-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.atlas-quick-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text);
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    pointer-events: auto;
    z-index: 1;
    position: relative;
}

.atlas-quick-action:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--purple);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 115, 255, 0.2);
}

.atlas-quick-action:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.1);
}

.atlas-quick-action-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.atlas-quick-action-label {
    flex: 1;
    font-weight: 500;
}

/* Atlas Highlight (for onboarding) */
.atlas-highlight {
    position: relative;
    z-index: 9997;
    outline: 3px solid var(--purple);
    outline-offset: 4px;
    border-radius: 8px;
    animation: pulseHighlight 2s ease-in-out infinite;
}

@keyframes pulseHighlight {
    0%, 100% {
        outline-color: var(--purple);
        box-shadow: 0 0 0 0 rgba(107, 115, 255, 0.7);
    }
    50% {
        outline-color: var(--coral);
        box-shadow: 0 0 0 8px rgba(107, 115, 255, 0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .atlas-panel {
        width: calc(100vw - 32px);
        right: 16px;
        bottom: 80px;
        max-height: calc(100vh - 100px);
    }

    .atlas-button {
        right: 16px;
        bottom: 16px;
        width: 56px;
        height: 56px;
    }

    .atlas-button-text {
        font-size: 0.6rem;
    }

    .atlas-quick-actions {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   NEW FEATURES - Risk Alerts & Player Comparison
   ============================================================================ */

/* Risk Alert System */
.risk-alert-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--coral);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    min-width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    z-index: 10;
    line-height: 1;
    font-family: 'Inter', sans-serif;
}

.risk-alert-badge.critical {
    background: #ef4444;
    animation: pulse 2s infinite;
}

.risk-alert-badge.warning {
    background: var(--coral);
}

.risk-alert {
    background: rgba(20, 20, 25, 0.8);
    border-left: 3px solid rgba(107, 115, 255, 0.5);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.risk-alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, rgba(107, 115, 255, 0.8), rgba(139, 92, 246, 0.8));
    border-radius: 0 2px 2px 0;
}

.risk-alert-critical {
    border-left-color: rgba(239, 68, 68, 0.6);
    background: rgba(20, 20, 25, 0.85);
}

.risk-alert-critical::before {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.8), rgba(220, 38, 38, 0.8));
}

.risk-alert-warning {
    border-left-color: rgba(231, 111, 81, 0.6);
    background: rgba(20, 20, 25, 0.85);
}

.risk-alert-warning::before {
    background: linear-gradient(180deg, rgba(231, 111, 81, 0.8), rgba(217, 70, 70, 0.8));
}

.risk-alert-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.risk-alert-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.9;
}

.risk-alert-player {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    flex: 1;
    letter-spacing: -0.2px;
}

.risk-alert-dismiss {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.risk-alert-dismiss:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    transform: scale(1.05);
}

.risk-alert-message {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--text-primary);
    line-height: 1.5;
}

.risk-alert-metric {
    display: none; /* Hidden for cleaner, more concise alerts */
}

.risk-alert-recommendation {
    display: none; /* Hidden for cleaner, more concise alerts */
}

.risk-alert-critical .risk-alert-recommendation {
    background: rgba(239, 68, 68, 0.08);
    border-left-color: rgba(239, 68, 68, 0.3);
}

.risk-alert-warning .risk-alert-recommendation {
    background: rgba(231, 111, 81, 0.08);
    border-left-color: rgba(231, 111, 81, 0.3);
}

.risk-alert-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

/* Risk Alerts Panel (Top Right) */
.risk-alerts-panel {
    position: fixed;
    top: 80px;
    right: 24px;
    width: 380px;
    max-height: calc(100vh - 120px);
    background: rgba(20, 20, 25, 0.95);
    border: 1px solid rgba(107, 115, 255, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
}

.risk-alerts-panel.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    visibility: hidden;
}

.risk-alerts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(107, 115, 255, 0.2);
    background: rgba(107, 115, 255, 0.05);
}

.risk-alerts-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.risk-alerts-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.risk-alerts-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.risk-alerts-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    min-height: 200px;
    max-height: calc(100vh - 280px);
}

.risk-alerts-body::-webkit-scrollbar {
    width: 6px;
}

.risk-alerts-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.risk-alerts-body::-webkit-scrollbar-thumb {
    background: rgba(107, 115, 255, 0.4);
    border-radius: 3px;
}

.risk-alerts-body::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 115, 255, 0.6);
}

.risk-alerts-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    min-height: 200px;
}

.risk-alerts-empty .icon {
    margin-bottom: 12px;
    opacity: 0.5;
}

.risk-alerts-empty p {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.risk-alerts-empty small {
    font-size: 12px;
    color: var(--text-secondary);
}

.risk-alerts-body:not(:empty) .risk-alerts-empty {
    display: none;
}

.risk-alerts-footer {
    padding: 12px 20px;
    border-top: 1px solid rgba(107, 115, 255, 0.2);
    background: rgba(107, 115, 255, 0.03);
    display: flex;
    justify-content: flex-end;
}

/* Player Comparison */
.comparison-bar {
    background: rgba(20, 20, 25, 0.95);
    border: 1px solid rgba(107, 115, 255, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.comparison-bar-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.comparison-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-selected {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.comparison-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(107, 115, 255, 0.2);
    border: 1px solid rgba(107, 115, 255, 0.4);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--text-primary);
}

.comparison-chip-remove {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.comparison-chip-remove:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.comparison-actions {
    display: flex;
    gap: 8px;
}

.athlete-card.selected-for-comparison {
    border: 2px solid var(--purple);
    box-shadow: 0 0 0 4px rgba(107, 115, 255, 0.2);
}

.comparison-table-wrapper {
    overflow-x: auto;
    margin-bottom: 24px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(20, 20, 25, 0.5);
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(107, 115, 255, 0.2);
}

.comparison-table th {
    background: rgba(107, 115, 255, 0.2);
    font-weight: 600;
    color: var(--text-primary);
    position: sticky;
    left: 0;
    z-index: 1;
}

.comparison-table td.metric-name {
    font-weight: 500;
    color: var(--text-primary);
    background: rgba(107, 115, 255, 0.1);
    position: sticky;
    left: 0;
    z-index: 1;
}

.comparison-table td.metric-value {
    text-align: center;
    color: var(--text-secondary);
}

.comparison-table td.metric-value.excellent {
    color: #10b981;
}

.comparison-table td.metric-value.good {
    color: #3b82f6;
}

.comparison-table td.metric-value.fair {
    color: #f59e0b;
}

.comparison-table td.metric-value.poor {
    color: #ef4444;
}

.comparison-section-header {
    background: rgba(107, 115, 255, 0.3);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.comparison-section-header td {
    padding: 16px 12px;
    border-bottom: 2px solid rgba(107, 115, 255, 0.4);
}

.comparison-charts {
    margin-top: 24px;
    height: 400px;
    position: relative;
}

.modal-large {
    max-width: 90vw;
    width: 1200px;
}

.athlete-compare-btn {
    background: rgba(107, 115, 255, 0.2);
    border: 1px solid rgba(107, 115, 255, 0.4);
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--purple);
}

.athlete-compare-btn:hover {
    background: rgba(107, 115, 255, 0.3);
    border-color: var(--purple);
    transform: scale(1.1);
}

.athlete-header {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.athlete-header .athlete-compare-btn {
    margin-left: auto;
}

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

/* Performance Optimizations */
* {
    will-change: auto;
}

.interactive-element,
.btn,
.nav-link,
.metric-card,
.plan-card,
.athlete-card {
    will-change: transform, opacity;
}

/* Optimize animations for better performance */
@media (prefers-reduced-motion: no-preference) {
    .metric-card,
    .plan-card,
    .athlete-card,
    .chart-container {
        transform: translateZ(0);
        backface-visibility: hidden;
        perspective: 1000px;
    }
}

/* Improve touch targets for mobile */
@media (max-width: 768px) {
    .btn,
    .nav-link,
    button,
    a[role="button"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better tap feedback */
    .btn:active,
    .nav-link:active,
    button:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* Font loading optimization - fonts are loaded via Google Fonts link in HTML */
/* Using font-display: swap in the Google Fonts URL parameters for better performance */

/* Reduce repaints on scroll */
.main-content {
    contain: layout style paint;
}

/* Optimize chart rendering */
.chart-container canvas {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Lazy load images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}
