@charset "utf-8";

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #6c5ce7;
    --primary-hover: #5a4bd1;
    --secondary-color: #a29bfe;
    --text-main: #2d3436;
    --text-light: #636e72;
    --text-muted: #95a5a6;
    --bg-body: #f0f2f5;
    --input-bg: #f5f6fa;
    --card-bg: #ffffff;
    --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.05), 0 6px 6px rgba(0, 0, 0, 0.05);
    --card-hover-shadow: 0 15px 30px rgba(108, 92, 231, 0.15);
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --success-text: #16a34a;
    --warning-text: #ca8a04;
    --danger-text: #ef4444;
    --info-text: #0284c7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
}

html {
    min-height: 100vh;
    background-color: var(--bg-body);
    background-image:
        radial-gradient(at 0% 0%, rgba(108, 92, 231, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(118, 75, 162, 0.15) 0px, transparent 50%);
}

body {
    min-height: 100vh;
    background: transparent;
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
}

/* --- 滚动条（对齐 DMS echatOpenApi/main.css） --- */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
    background: transparent;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    transition: background 0.3s;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
    background: #888;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

/* --- 按钮 --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(108, 92, 231, 0.4);
}

.btn-ghost {
    background: var(--input-bg);
    color: var(--text-light);
}

.btn-ghost:hover {
    background: #eceff4;
    color: var(--text-main);
}

/* --- 表单控件（工具页复用） --- */
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid transparent;
    background: var(--input-bg);
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-main);
    transition: all 0.25s;
    font-weight: 500;
}

.form-control:focus {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.15);
}

textarea.form-control {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
}

/* --- Toast --- */
.toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    min-width: 280px;
    max-width: 90vw;
    padding: 14px 20px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    animation: toastIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
}

.toast i { font-size: 16px; }
.toast.info { border-left: 4px solid var(--primary-color); }
.toast.info i { color: var(--primary-color); }
.toast.fade-out { animation: toastOut 0.3s forwards; }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(-12px); }
}

/* --- 交互类型标签 --- */
.tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.tool-badge--transform {
    background: #ede9fe;
    color: #6c5ce7;
}

.tool-badge--compute {
    background: #e0f2fe;
    color: var(--info-text);
}

.tool-badge--format {
    background: #dcfce7;
    color: var(--success-text);
}

.tool-badge--api {
    background: #f3e8ff;
    color: #7c3aed;
}

.tool-badge--soon {
    background: #fef9c3;
    color: var(--warning-text);
}
