body {
    background: #f5f7fa;
}

.diff-tool-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.diff-tool-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.input-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.input-panel {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.panel-header h2 {
    color: #444;
    font-size: 1.2rem;
    margin: 0;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.input-info {
    margin-top: 0.75rem;
    color: #718096;
    font-size: 0.9rem;
    font-weight: 500;
}

.action-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.btn-primary {
    padding: 1rem 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102,126,234,0.4);
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

.btn-secondary.copied {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: transparent;
}

.result-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.result-header h2 {
    color: #444;
    font-size: 1.2rem;
    margin: 0;
}

.result-stats {
    display: flex;
    gap: 1.5rem;
}

.stat {
    font-size: 0.95rem;
    color: #666;
    padding: 0.5rem 1rem;
    background: #f7fafc;
    border-radius: 8px;
}

.stat em {
    font-style: normal;
    font-weight: bold;
    margin-left: 0.3rem;
}

.stat.added em {
    color: #10b981;
}

.stat.added {
    background: #f0fdf4;
    border: 1px solid #d1fae5;
}

.stat.removed em {
    color: #ef4444;
}

.stat.removed {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.stat.unchanged em {
    color: #666;
}

.diff-output {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    max-height: 500px;
    overflow: auto;
}

.diff-placeholder {
    color: #888;
    text-align: center;
    padding: 3rem;
}

.diff-content {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
}

.diff-line {
    display: flex;
    padding: 0.3rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.diff-line:last-child {
    border-bottom: none;
}

.diff-line.added {
    background: #d4edda;
}

.diff-line.removed {
    background: #f8d7da;
}

.diff-line.unchanged {
    background: white;
}

.line-nums {
    display: flex;
    flex-direction: column;
    min-width: 60px;
    color: #888;
    font-size: 0.85rem;
    text-align: right;
    padding-right: 0.5rem;
    border-right: 1px solid #e0e0e0;
    margin-right: 0.5rem;
}

.line-num {
    line-height: 1.6;
}

.line-prefix {
    width: 20px;
    text-align: center;
    font-weight: bold;
    margin-right: 0.5rem;
}

.diff-line.added .line-prefix {
    color: #10b981;
}

.diff-line.removed .line-prefix {
    color: #dc3545;
}

.diff-line.unchanged .line-prefix {
    color: #888;
}

.line-content {
    flex: 1;
    white-space: pre-wrap;
    word-break: break-all;
}

.result-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.info-section {
    background: #f0fdf4;
    border: 1px solid #d1fae5;
    border-radius: 16px;
    padding: 1.75rem;
    margin-top: 2rem;
}

.info-section h3 {
    color: #065f46;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.info-section ul {
    padding-left: 1.5rem;
}

.info-section li {
    color: #374151;
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.highlight-green {
    background: #d4edda;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

.highlight-red {
    background: #f8d7da;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

@media (max-width: 768px) {
    .diff-tool-container {
        padding: 1rem;
    }
    
    .input-panels {
        grid-template-columns: 1fr;
    }
    
    .input-panel {
        padding: 1.25rem;
    }
    
    textarea {
        min-height: 150px;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .result-stats {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .diff-output {
        max-height: 300px;
    }
    
    .line-nums {
        min-width: 40px;
    }
    
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .action-buttons {
        width: 100%;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .btn-secondary {
        width: 100%;
    }
}
