* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid #eaeaea;
}

header h1 {
    color: #1e88e5;
    margin-bottom: 10px;
}

.input-section {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.text-input {
    flex: 1;
}

.text-input h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

textarea {
    width: 100%;
    height: 200px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #1e88e5;
    box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.2);
}

.control-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 15px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.1s;
}

button:active {
    transform: translateY(1px);
}

#calculate-btn {
    background-color: #1e88e5;
    color: white;
    margin-left: auto;
}

#calculate-btn:hover {
    background-color: #1976d2;
}

#clear-btn {
    background-color: #f5f5f5;
    color: #666;
}

#clear-btn:hover {
    background-color: #e0e0e0;
}

.result-section {
    background-color: #fff;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.result-section h2 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eaeaea;
    color: #333;
}

.hidden {
    display: none;
}

.result-card {
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.result-card h3 {
    margin-bottom: 10px;
    color: #666;
}

.result-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1e88e5;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

#comparison-view {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
}

#comparison-view h3 {
    margin-bottom: 15px;
    color: #333;
}

#text-comparison {
    font-family: monospace;
    white-space: pre-wrap;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border-left: 3px solid #1e88e5;
    line-height: 1.8;
}

.char-equal {
    color: #333;
}

.char-substitution {
    color: #f57c00;
    background-color: rgba(245, 124, 0, 0.1);
    text-decoration: line-through;
    padding: 0 2px;
}

.char-insertion {
    color: #d32f2f;
    background-color: rgba(211, 47, 47, 0.1);
    text-decoration: underline;
    padding: 0 2px;
}

.char-deletion {
    color: #388e3c;
    background-color: rgba(56, 142, 60, 0.1);
    padding: 0 2px;
}

.highlighted-text {
    display: inline-block;
    margin-right: 5px;
}

footer {
    margin-top: 40px;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

footer a {
    color: #1e88e5;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .input-section {
        flex-direction: column;
    }
    
    .control-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    button {
        width: 100%;
    }
    
    #calculate-btn {
        margin-left: 0;
    }
} 