/**
 * AI 编辑器样式
 */

/* AI 工具栏容器 - 已禁用，功能已集成到顶部工具栏 */
.ai-toolbar {
    display: none !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    animation: slideIn 0.5s ease-out;
}

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

/* 工具栏头部 */
.ai-toolbar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.ai-toolbar-title {
    display: flex;
    align-items: center;
    color: white;
    font-size: 1.2em;
    font-weight: 600;
}

.ai-toolbar-title i {
    margin-right: 10px;
    font-size: 1.3em;
    animation: pulse 2s infinite;
}

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

.vip-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    margin-left: 10px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* 配额信息 */
.ai-quota-info {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 15px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.quota-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
    margin-right: 8px;
}

.quota-number {
    color: #fff;
    font-size: 1.5em;
    font-weight: bold;
    margin: 0 5px;
}

.quota-total {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95em;
}

/* 工具栏按钮组 */
.ai-toolbar-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ai-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ai-btn i {
    font-size: 1.1em;
}

.ai-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ai-btn:active {
    transform: translateY(0);
}

.ai-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* 按钮颜色 */
.ai-btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

.ai-btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
}

.ai-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.ai-btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

.ai-btn-vip {
    background: linear-gradient(135deg, #ffd700 0%, #ff6b00 100%);
    position: relative;
    overflow: hidden;
}

.ai-btn-vip::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ai-toolbar {
        padding: 15px;
    }
    
    .ai-toolbar-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .ai-quota-info {
        width: 100%;
        justify-content: center;
    }
    
    .ai-toolbar-buttons {
        flex-direction: column;
    }
    
    .ai-btn {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .ai-toolbar-title {
        font-size: 1em;
    }
    
    .quota-number {
        font-size: 1.3em;
    }
    
    .ai-btn {
        padding: 10px 15px;
        font-size: 0.9em;
    }
}

/* 加载动画 */
.ai-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* 提示气泡 */
.ai-tooltip {
    position: relative;
}

.ai-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 0.85em;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    margin-bottom: 5px;
}

.ai-tooltip:hover::after {
    opacity: 1;
}

/* 配额警告 */
.quota-warning .quota-number {
    color: #fbbf24 !important;
    animation: blink 1s infinite;
}

.quota-danger .quota-number {
    color: #ef4444 !important;
    animation: blink 0.5s infinite;
}

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

