/* 自定义样式文件 */

/* 全局样式 */
* {
    box-sizing: border-box;
}

/* 字体优化 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    line-height: 1.6;
}

/* Tab切换样式 */
.tab-button {
    transition: all 0.3s ease;
    cursor: pointer;
}

.tab-button:hover {
    color: #5C00CB;
}

.tab-button.active {
    color: #5C00CB;
    border-bottom-color: #5C00CB;
}

/* 步骤区域样式 */
.step-section {
    border-left: 4px solid #E5E7EB;
    padding-left: 1rem;
    margin-bottom: 2rem;
}

.step-section:last-child {
    margin-bottom: 0;
}

/* 表单样式增强 */
input:focus, 
textarea:focus, 
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(92, 0, 203, 0.1);
}

/* 复选框样式 */
input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: #5C00CB;
}

input[type="radio"] {
    accent-color: #5C00CB;
}

/* 加载动画 */
.loading-spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #5C00CB;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

/* 脚本内容样式 */
.script-content {
    font-family: 'Courier New', Consolas, monospace;
    line-height: 1.8;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.script-content h1,
.script-content h2,
.script-content h3 {
    color: #5C00CB;
    font-weight: bold;
    margin: 1rem 0 0.5rem 0;
}

.script-content h1 {
    font-size: 1.5rem;
    border-bottom: 2px solid #5C00CB;
    padding-bottom: 0.5rem;
}

.script-content h2 {
    font-size: 1.3rem;
}

.script-content h3 {
    font-size: 1.1rem;
}

/* 高亮保留元素 */
.preserved-element {
    background-color: rgba(92, 0, 203, 0.1);
    border-left: 3px solid #5C00CB;
    padding-left: 0.5rem;
    margin: 0.5rem 0;
}

/* 对比视图样式 */
.comparison-highlight {
    background-color: rgba(16, 185, 129, 0.2);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    margin: 0.1rem 0;
}

.difference-highlight {
    background-color: rgba(245, 158, 11, 0.2);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    margin: 0.1rem 0;
}

/* 统计卡片样式 */
.stat-card {
    background: linear-gradient(135deg, #5C00CB 0%, #7C3AED 100%);
    color: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* 建议卡片样式 */
.suggestion-item {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.suggestion-item:hover {
    border-color: #5C00CB;
    box-shadow: 0 2px 4px rgba(92, 0, 203, 0.1);
}

.suggestion-item::before {
    content: "💡";
    position: absolute;
    left: 1rem;
    top: 1rem;
}

.suggestion-item .content {
    margin-left: 2rem;
}

/* 平台图标样式 */
.platform-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: inline-block;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .tab-button {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .step-section {
        padding-left: 0.5rem;
        border-left-width: 2px;
    }
    
    .grid.md\\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .grid.md\\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .flex.flex-wrap {
        flex-direction: column;
        align-items: stretch;
    }
    
    .flex.flex-wrap > * {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .text-4xl {
        font-size: 2rem;
    }
    
    .text-2xl {
        font-size: 1.5rem;
    }
    
    .text-xl {
        font-size: 1.25rem;
    }
    
    .px-8 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .py-8 {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5C00CB;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
    
    .script-content {
        background: white !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    body {
        background: white !important;
    }
}

/* 工具提示样式 */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* 错误状态样式 */
.error-state input,
.error-state textarea,
.error-state select {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
    color: #EF4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
}

.error-message::before {
    content: "⚠️";
    margin-right: 0.25rem;
}

/* 成功状态样式 */
.success-state input,
.success-state textarea,
.success-state select {
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.success-message {
    color: #10B981;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
}

.success-message::before {
    content: "✅";
    margin-right: 0.25rem;
}

/* 特殊效果 */
.gradient-text {
    background: linear-gradient(135deg, #5C00CB 0%, #7C3AED 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* 骨架屏加载效果 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 模态框样式 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* 拖拽区域样式 */
.drop-zone {
    border: 2px dashed #E5E7EB;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #5C00CB;
    background-color: rgba(92, 0, 203, 0.05);
}

.drop-zone.drag-over {
    border-style: solid;
}
