/* Floating Widget Styles */
#llm-token-widget {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 200px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    cursor: move;
    transition: all 0.3s ease;
}

#llm-token-widget:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.widget-content {
    padding: 12px;
}

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

.platform-indicator {
    font-size: 16px;
    font-weight: 600;
}

.platform-indicator.claude::after {
    content: " Claude";
    font-size: 12px;
    color: #8b5cf6;
    margin-left: 4px;
}

.platform-indicator.chatgpt::after {
    content: " ChatGPT";
    font-size: 12px;
    color: #10b981;
    margin-left: 4px;
}

.platform-indicator.gemini::after {
    content: " Gemini";
    font-size: 12px;
    color: #f59e0b;
    margin-left: 4px;
}

.token-percentage {
    font-weight: 700;
    font-size: 16px;
    color: #4a5568;
}

.token-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.token-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #38a169);
    border-radius: 3px;
    transition: all 0.3s ease;
    width: 0%;
}

.widget-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.widget-btn {
    background: rgba(74, 85, 104, 0.1);
    border: none;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    flex: 1;
}

.widget-btn:hover {
    background: rgba(74, 85, 104, 0.2);
    transform: scale(1.05);
}

/* Status-based styling */
.llm-token-widget.safe .token-fill {
    background: linear-gradient(90deg, #48bb78, #38a169);
}

.llm-token-widget.safe .token-percentage {
    color: #2d3748;
}

.llm-token-widget.warning .token-fill {
    background: linear-gradient(90deg, #ed8936, #dd6b20);
}

.llm-token-widget.warning .token-percentage {
    color: #c05621;
}

.llm-token-widget.warning {
    border-left: 4px solid #ed8936;
}

.llm-token-widget.danger .token-fill {
    background: linear-gradient(90deg, #f56565, #e53e3e);
}

.llm-token-widget.danger .token-percentage {
    color: #c53030;
}

.llm-token-widget.danger {
    border-left: 4px solid #f56565;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: 0 8px 32px rgba(245, 101, 101, 0.3); }
    100% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); }
}

/* Responsive design */
@media (max-width: 768px) {
    #llm-token-widget {
        width: 160px;
        top: 10px;
        right: 10px;
    }
    
    .widget-content {
        padding: 8px;
    }
    
    .platform-indicator.claude::after,
    .platform-indicator.chatgpt::after,
    .platform-indicator.gemini::after {
        display: none;
    }
}