/* AI Assistant Styles - Chatbot + Analytics Dashboard */
.ai-assistant-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
}

.ai-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ai-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.ai-toggle-btn .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    animation: pulse 1.5s infinite;
}

.ai-panel {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 400px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideInUp 0.3s ease;
}

.ai-panel.active {
    display: flex;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.ai-header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-header h3 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-header h3 i {
    font-size: 20px;
}

.ai-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ai-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Tabs */
.ai-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e3e7f0;
}

.ai-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.3s ease;
}

.ai-tab.active {
    color: #3498db;
    border-bottom: 2px solid #3498db;
    background: white;
}

.ai-tab:hover:not(.active) {
    background: rgba(52, 152, 219, 0.05);
}

/* Chat Messages Area */
.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f9fafb;
}

.message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: #3498db;
    color: white;
}

.message.bot .message-avatar {
    background: #2ecc71;
    color: white;
}

.message-content {
    flex: 1;
    background: white;
    padding: 10px 15px;
    border-radius: 15px;
    border-top-left-radius: 5px;
    font-size: 13px;
    line-height: 1.5;
    color: #111827;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.message.user .message-content {
    background: #3498db;
    color: white;
    border-top-left-radius: 15px;
    border-top-right-radius: 5px;
}

.message-time {
    font-size: 10px;
    color: #9ca3af;
    margin-top: 5px;
}

/* Chat Input */
.ai-chat-input {
    padding: 15px;
    border-top: 1px solid #e3e7f0;
    display: flex;
    gap: 10px;
    background: white;
}

.ai-chat-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e3e7f0;
    border-radius: 25px;
    outline: none;
    font-size: 13px;
    transition: all 0.3s ease;
}

.ai-chat-input input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.ai-chat-input button {
    background: #3498db;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-chat-input button:hover {
    background: #2980b9;
    transform: scale(1.05);
}

.ai-chat-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 15px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-10px); opacity: 1; }
}

/* Quick Actions */
.ai-quick-actions {
    padding: 10px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid #e3e7f0;
    background: #f8fafc;
}

.quick-action-btn {
    background: white;
    border: 1px solid #e3e7f0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4b5563;
}

.quick-action-btn:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Analytics Dashboard */
.ai-analytics {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f9fafb;
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e3e7f0;
}

.stat-card i {
    font-size: 24px;
    color: #3498db;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.stat-label {
    font-size: 11px;
    color: #6b7280;
    margin-top: 5px;
}

.sport-breakdown {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #e3e7f0;
}

.sport-breakdown h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #111827;
}

.sport-bar {
    margin-bottom: 10px;
}

.sport-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-bottom: 4px;
}

.sport-bar-fill {
    height: 6px;
    background: #e3e7f0;
    border-radius: 3px;
    overflow: hidden;
}

.sport-bar-progress {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2c3e50);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.fixtures-list {
    background: white;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #e3e7f0;
}

.fixtures-list h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #111827;
}

.fixture-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f2f7;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fixture-item:last-child {
    border-bottom: none;
}

.fixture-sport {
    background: #e8f6f3;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    color: #16a085;
}

/* Settings Tab */
.ai-settings {
    padding: 15px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e3e7f0;
}

.setting-item label {
    font-size: 13px;
    color: #111827;
}

.setting-item select {
    padding: 6px 12px;
    border: 1px solid #e3e7f0;
    border-radius: 8px;
    font-size: 12px;
}

/* Loading Overlay */
.ai-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Scrollbar */
.ai-chat-messages::-webkit-scrollbar,
.ai-analytics::-webkit-scrollbar {
    width: 6px;
}

.ai-chat-messages::-webkit-scrollbar-track,
.ai-analytics::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.ai-chat-messages::-webkit-scrollbar-thumb,
.ai-analytics::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 10px;
}

/* Responsive */
@media (max-width: 480px) {
    .ai-panel {
        width: calc(100vw - 20px);
        right: 10px;
        bottom: 80px;
        height: calc(100vh - 100px);
    }
    
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .stat-card {
        padding: 10px;
    }
    
    .stat-value {
        font-size: 20px;
    }
}