/**
 * AI Agent Systems CSS
 * Styling for leaderboard, changelog, and AI agent UI elements
 */

/* Leaderboard Styles */
.leaderboard-container {
    color: white;
    max-width: 800px;
    margin: 0 auto;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-header h2 {
    font-size: 36px;
    margin: 0 0 15px 0;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.leaderboard-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.leaderboard-entry:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(5px);
}

.leaderboard-entry.top-three {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
}

.leaderboard-entry .rank {
    font-size: 24px;
    font-weight: bold;
    min-width: 60px;
    text-align: center;
}

.leaderboard-entry .avatar {
    font-size: 36px;
}

.leaderboard-entry .info {
    flex: 1;
}

.leaderboard-entry .name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-badge {
    background: rgba(100, 200, 255, 0.2);
    color: #64c8ff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
}

.personality-badge {
    background: rgba(255, 100, 255, 0.2);
    color: #ff64ff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: capitalize;
}

.leaderboard-entry .stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* Changelog Styles */
.changelog-container {
    color: white;
    max-width: 900px;
    margin: 0 auto;
}

.changelog-header {
    text-align: center;
    margin-bottom: 40px;
}

.changelog-header h2 {
    font-size: 36px;
    margin: 0 0 10px 0;
    background: linear-gradient(45deg, #00d4ff, #7b2ff7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.changelog-header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
}

.changelog-timeline {
    position: relative;
    padding-left: 40px;
}

.changelog-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #00d4ff, #7b2ff7);
}

.changelog-entry {
    position: relative;
    margin-bottom: 40px;
}

.changelog-entry::before {
    content: '📅';
    position: absolute;
    left: -30px;
    top: 5px;
    font-size: 20px;
}

.changelog-date {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
}

.changelog-content {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.changelog-content h3 {
    font-size: 22px;
    margin: 0 0 20px 0;
    color: #00d4ff;
}

.changelog-section {
    margin-bottom: 20px;
}

.changelog-section:last-child {
    margin-bottom: 0;
}

.changelog-section h4 {
    font-size: 16px;
    margin: 0 0 10px 0;
    color: rgba(255, 255, 255, 0.9);
}

.changelog-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.changelog-section ul li {
    padding: 5px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.6;
}

.changelog-section ul li::before {
    content: '• ';
    color: #00d4ff;
    font-weight: bold;
    margin-right: 8px;
}

/* Modal Content Sizing */
.leaderboard-modal-content {
    width: 900px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
}

.changelog-modal-content {
    width: 1000px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
}

/* AI Agent Status Indicator */
.ai-agent-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid rgba(0, 212, 255, 0.5);
    border-radius: 12px;
    padding: 15px 20px;
    color: white;
    font-size: 14px;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
    z-index: 9998;
}

.ai-agent-status h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #00d4ff;
}

.ai-agent-status .stat {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
}

.ai-agent-status .stat-label {
    color: rgba(255, 255, 255, 0.6);
}

.ai-agent-status .stat-value {
    color: #00ff88;
    font-weight: bold;
}

/* Notification Toast */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(0, 212, 255, 0.5);
    border-radius: 12px;
    padding: 15px 20px;
    color: white;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
    z-index: 10000;
    animation: slideInRight 0.5s ease, fadeOut 0.5s ease 4.5s forwards;
}

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

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(450px);
    }
}

.notification-toast.achievement {
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.notification-toast.error {
    border-color: rgba(255, 50, 50, 0.5);
    box-shadow: 0 10px 30px rgba(255, 50, 50, 0.3);
}

.notification-toast .icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.notification-toast .title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.notification-toast .message {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .leaderboard-entry {
        padding: 10px 15px;
    }
    
    .leaderboard-entry .rank {
        font-size: 18px;
        min-width: 40px;
    }
    
    .leaderboard-entry .avatar {
        font-size: 28px;
    }
    
    .leaderboard-entry .name {
        font-size: 16px;
    }
    
    .leaderboard-entry .stats {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 12px;
    }
    
    .changelog-timeline {
        padding-left: 30px;
    }
    
    .changelog-entry::before {
        left: -25px;
        font-size: 16px;
    }
    
    .changelog-content {
        padding: 15px;
    }
    
    .changelog-content h3 {
        font-size: 18px;
    }
    
    .ai-agent-status {
        bottom: 10px;
        right: 10px;
        padding: 10px 15px;
        font-size: 12px;
    }
    
    .notification-toast {
        top: 10px;
        right: 10px;
        max-width: calc(100vw - 20px);
        padding: 12px 16px;
    }
}

/* Loading Animation for AI Agents */
.ai-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 212, 255, 0.3);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* AI Activity Indicator */
.ai-activity-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #00ff88;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s ease infinite;
}

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