/* 文案铺统一平台 - 公共样式 */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(to bottom right, #eef2ff, #fce7f3);
    min-height: 100vh;
}

/* Vue隐藏未编译模板 */
[v-cloak] {
    display: none;
}

/* 导航栏样式 */
.navbar {
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
}

/* 页面容器 */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* 按钮样式 */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(to right, #8b5cf6, #ec4899);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* 输入框样式 */
.input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input:focus {
    outline: none;
    border-color: #8b5cf6;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #8b5cf6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 消息提示 */
.message {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 100;
    animation: slideIn 0.3s ease;
}

.message-success {
    background: #10b981;
    color: white;
}

.message-error {
    background: #ef4444;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== Toast 通知系统样式 ===== */
.toast-container {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    min-width: 300px;
    max-width: 500px;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    margin-bottom: 1rem;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Toast位置 */
.toast-top-right {
    position: fixed;
    top: 20px;
    right: 20px;
}

.toast-top-left {
    position: fixed;
    top: 20px;
    left: 20px;
    transform: translateX(-400px);
}

.toast-bottom-right {
    position: fixed;
    bottom: 20px;
    right: 20px;
}

.toast-bottom-left {
    position: fixed;
    bottom: 20px;
    left: 20px;
    transform: translateX(-400px);
}

.toast-top-center {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
}

/* Toast显示/隐藏动画 */
.toast-show {
    opacity: 1;
    transform: translateX(0) !important;
}

.toast-show.toast-top-center {
    transform: translateX(-50%) translateY(0) !important;
}

.toast-hide {
    opacity: 0;
    transform: translateY(-20px);
}

/* Toast关闭按钮 */
.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    line-height: 1;
    font-size: 24px;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

/* ===== Job组件样式 ===== */
.job-component-container {
    margin: 1.5rem 0;
}

.job-status-card {
    transition: all 0.3s ease;
}

.job-status-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 小型Spinner用于Job组件 */
.spinner-sm {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #8b5cf6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}

/* 响应式 */
@media (max-width: 768px) {
    .page-container {
        padding: 1rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    /* Toast 移动端适配 */
    .toast {
        min-width: calc(100vw - 40px);
        max-width: calc(100vw - 40px);
        left: 20px !important;
        right: 20px !important;
    }
    
    .toast-top-center {
        left: 20px !important;
        right: 20px !important;
        transform: translateX(0) translateY(-100px) !important;
    }
    
    .toast-show.toast-top-center {
        transform: translateX(0) translateY(0) !important;
    }
}

