/* ===== 平台选择器样式 ===== */
.platform-selector {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    justify-content: center;
}

.platform-btn {
    padding: 10px 20px;
    border-radius: 12px;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid transparent;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    color: var(--text);
}

.platform-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

.platform-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #5a67d8;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.platform-btn[data-platform="openai"] {
    background: rgba(23, 92, 194, 0.1);
}

.platform-btn[data-platform="openai"].active {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    border-color: #1e3a8a;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

/* ===== 双密钥区域样式 ===== */
.key-section {
    display: none;
    margin-bottom: 10px;
}

.key-section.active {
    display: block;
    animation: fadeIn 0.3s;
}

.key-status {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.85rem;
    padding: 0 5px;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.status-indicator::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
}

.status-indicator.valid::before {
    background: #10b981;
}

/* ===== 平台专属提示 ===== */
.platform-note {
    margin: 15px 0;
    padding: 14px;
    border-radius: 12px;
    border-left: 3px solid #667eea;
    background: rgba(102, 126, 234, 0.08);
    display: none;
}

.platform-note.deepseek-note {
    display: block;
    border-color: #667eea;
}

.platform-note.openai-note {
    border-color: #1e3a8a;
    background: rgba(30, 58, 138, 0.08);
}

/* ===== 历史记录平台标识 ===== */
.history-item::before {
    content: "🤖";
    margin-right: 6px;
    font-size: 0.9em;
}

.history-item[data-platform="openai"]::before {
    content: "🟦";
}

.history-item[data-platform="deepseek"]::before {
    content: "🟪";
}

/* ===== 动画 ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 深色模式适配 */
[data-theme="dark"] .platform-btn:not(.active) {
    background: rgba(100, 116, 139, 0.2);
    color: var(--text);
}

[data-theme="dark"] .key-status {
    color: #cbd5e1;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .platform-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .platform-btn {
        justify-content: center;
        font-size: 1.05rem;
    }
    
    .key-section {
        margin-bottom: 15px;
    }
}