﻿:root {
    --primary-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #667eea 100%);
    --primary-light: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --secondary-gradient: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 50%, #ff6b9d 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --info-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
}

body {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 100vh;
}

.text-gradient {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.hero-section {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 30%, #667eea 70%, #764ba2 100%);
    padding: 60px 0 40px 0;
    position: relative;
    overflow: hidden;
}

    .hero-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
        opacity: 0.8;
    }

    .hero-section h1 {
        position: relative;
        z-index: 1;
    }

.badge-free {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
    display: inline-block;
    margin-left: 12px;
}

.editor-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 2rem;
}

.editor-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.editor-title {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.editor-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-editor {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

    .btn-editor.btn-split {
        background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
        color: white;
        box-shadow: 0 4px 12px rgba(17, 153, 142, 0.3);
    }

        .btn-editor.btn-split:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(17, 153, 142, 0.4);
        }

    .btn-editor.btn-add-prefix {
        background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
        color: white;
        box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
    }

        .btn-editor.btn-add-prefix:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
        }

    .btn-editor.btn-add-suffix {
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        color: white;
        box-shadow: 0 4px 12px rgba(240, 147, 251, 0.3);
    }

        .btn-editor.btn-add-suffix:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(240, 147, 251, 0.4);
        }

    .btn-editor.btn-add-both {
        background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
        color: #333;
        box-shadow: 0 4px 12px rgba(255, 154, 158, 0.3);
    }

        .btn-editor.btn-add-both:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(255, 154, 158, 0.4);
        }

    .btn-editor.btn-copy {
        background: white;
        color: #667eea;
        border: 2px solid rgba(255, 255, 255, 0.5);
    }

        .btn-editor.btn-copy:hover {
            background: rgba(255, 255, 255, 0.9);
            transform: translateY(-2px);
        }

    .btn-editor.btn-clear {
        background: rgba(255, 255, 255, 0.2);
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

        .btn-editor.btn-clear:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }

    .btn-editor.btn-history {
        background: rgba(255, 255, 255, 0.2);
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.3);
        position: relative;
    }

        .btn-editor.btn-history:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }

.history-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff6b6b;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.editor-body {
    padding: 0;
    position: relative;
}

.text-textarea {
    width: 100%;
    min-height: 400px;
    padding: 20px;
    border: none;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    background: #f8fafc;
    color: #1e293b;
}

    .text-textarea:focus {
        background: #ffffff;
    }

.split-container {
    display: flex;
    gap: 0;
    min-height: 400px;
}

.split-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.pane-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 10px 16px;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.split-pane:first-child {
    border-right: 2px solid #e2e8f0;
}

.pane-content {
    flex: 1;
    overflow: auto;
}

.options-bar {
    background: #f1f5f9;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.option-group {
    margin-bottom: 16px;
}

    .option-group:last-child {
        margin-bottom: 0;
    }

.option-label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.option-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

    .option-input:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

.option-hint {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
}

.status-bar {
    background: #f1f5f9;
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    height: 100%;
}

    .feature-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    }

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 24px;
    color: white;
}

.toast-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

    .toast-message.show {
        opacity: 1;
        transform: translateX(0);
    }

    .toast-message.success {
        border-left: 4px solid #11998e;
    }

    .toast-message.error {
        border-left: 4px solid #f5576c;
    }

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
}

.toast-message.success .toast-icon {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.toast-message.error .toast-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* 历史记录模态框样式 */
.history-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

    .history-modal.show {
        display: flex;
    }

.history-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.history-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 24px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .history-header h3 {
        margin: 0;
        font-size: 1.3rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 10px;
    }

.history-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

    .history-close:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: rotate(90deg);
    }

.history-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.history-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

    .history-empty i {
        font-size: 3rem;
        margin-bottom: 20px;
        opacity: 0.5;
    }

.history-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

    .history-item:hover {
        border-color: #667eea;
        background: #f1f5f9;
        transform: translateX(5px);
    }

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-item-time {
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-item-actions {
    display: flex;
    gap: 8px;
}

.history-item-btn {
    padding: 4px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

    .history-item-btn.restore {
        background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
        color: white;
    }

        .history-item-btn.restore:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(17, 153, 142, 0.3);
        }

    .history-item-btn.delete {
        background: #fee;
        color: #dc2626;
    }

        .history-item-btn.delete:hover {
            background: #dc2626;
            color: white;
        }

.history-item-preview {
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.85rem;
    color: #1e293b;
    background: white;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #667eea;
    max-height: 100px;
    overflow: hidden;
    position: relative;
}

    .history-item-preview::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 30px;
        background: linear-gradient(to bottom, transparent, white);
    }

.history-item-stats {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 0.8rem;
    color: #64748b;
}

    .history-item-stats span {
        display: flex;
        align-items: center;
        gap: 4px;
    }

.history-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-clear-all {
    padding: 8px 16px;
    background: #fee;
    color: #dc2626;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .history-clear-all:hover {
        background: #dc2626;
        color: white;
    }

@media (max-width: 992px) {
    .split-container {
        flex-direction: column;
    }

    .split-pane:first-child {
        border-right: none;
        border-bottom: 2px solid #e2e8f0;
    }

    .split-pane {
        min-height: 300px;
    }

    .text-textarea {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0 30px 0;
    }

        .hero-section h1 {
            font-size: 1.8rem;
        }

    .editor-header {
        padding: 12px 16px;
    }

    .editor-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .btn-editor {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .text-textarea {
        min-height: 300px;
        font-size: 13px;
        padding: 15px;
    }

    .status-bar {
        padding: 10px 16px;
        font-size: 0.8rem;
    }

    .split-pane {
        min-height: 300px;
    }
}
